numtide’s nixpkgs-unfree could help here as a drop in method.
looking at the example in the read me, this may also work
# ./flake/outputs.nix
{
self,
nixpkgs, # <---- This `nixpkgs` has systems removed e.g. legacyPackages.zlib
...,
}: let
# this is what was originally used
# inherit (nixpkgs.legacyPackages) pkgs;
#
pkgs = import nixpkgs {
inherit (nixpkgs.legacyPackages) system;
config.allowUnfree = true;
};
in {
# system dependant outputs
devShells.default = self.devShells.dev;
devShells.dev = pkgs.mkShell {
buildInputs = with pkgs; [/* ... */];
};
}
import takes a path to a file; surely the nixpkgs which is passed into this function (output.nix) has already been imported (the fact that we can inherit from it, seems to confirm this) so how can it be imported again?
There must be something that I’m missing about the capabilities of import and/or inherit.