Nixpkgs.follows and breaking change in (a Python) library

I have this small Python script that has a flake.nix in its repo, so that I can add it as a package to my system:

Relevant part of my system’s flake.nix:

  inputs = {
    nixpkgs-unstable.url     = "github:NixOS/nixpkgs/nixpkgs-unstable";
    nixpkgs-24-05-darwin.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin";
    nixpkgs-24-11-darwin.url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin";
    nixpkgs-25-05-darwin.url = "github:NixOS/nixpkgs/nixpkgs-25.05-darwin";

    check-unicode-coverage = {
      url                    = "github:anderslundstedt/check-unicode-coverage";
      inputs.nixpkgs.follows = "nixpkgs-24-11-darwin";
    };

    ...

  }

If I change

inputs.nixpkgs.follows = "nixpkgs-24-11-darwin";

into

inputs.nixpkgs.follows = "nixpkgs-25-05-darwin";

the the package no longer works (due to some breaking changes in python313Packages.python-fontconfig).

Now, knowing this, there is no problem for me to change back. However, other users of my package using inputs.nixpkgs.follows (as one should?) might simply conclude that my package does not work.

One solution would perhaps be to change the following in flake.nix in the GitHub repo:

inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable";

But do I then need to have different nixpkgs inputs for different systems? For example:

inputs.nixpkgs-24-11-darwin = "...";
inputs.nixpkgs-24-11-linux  = "...";

And then make my flake.nix more complicated?

Help much appreciated!

Tell the users to not use follows. Or explicitly specify the python version to use. Or update your package to work with current python.

1 Like