I’m trying to troubleshoot building of a python package and I’ve ran into an issue that I’d like to understand before I go back to the troubleshooting at hand.
I have a flake.nix
that I use to rebuild my NixOS system. It’s organized something like:
{
inputs = { ... };
outputs = inputs: {
nixosConfigurations = {
hostXyz = import ./hostXyz inputs;
};
};
}
Then in hostXyz/default.nix
I have:
{ nixpkgs, ... }@inputs:
nixpkgs.lib.nixosSystem {
...
modules = [
./python/default.nix
];
}
Then in python/default.nix
I have
{ config, pkgs, ... }@inputs:
{
environment.systemPackages = with pkgs; [
python3.withPackages (python-packages: with python-packages; [
...
(callPackage ./some-python-package {})
])
];
}
This seems to be working fine when I do nixos-rebuild switch --flake .#hostXyz
- I’m able to import this package in python
just fine and it has the expected version.
However, when I fire up a nix repl
session in the same folder flake.nix
is and load the flake with :lf .
, the load succeeds fine, but outputs.nixosConfigurations.hostXyz.pkgs.python3Packages.some-python-package
either does not exist (if it’s a new package not already in nixpkgs) or points to a previous version (the one that’s in nixpkgs that is - not the new one I’m trying to upgrade it to).
What am I missing?