I’m roughly stealing the code from Installing only a single package from `unstable` - #3 by fosskers to try to pull one package from unstable (this is shell.nix
btw not NixOS):
unstableTarball = builtins.fetchTarball {
url = "https://github.com/nixos/nixpkgs/tarball/266ea7a68284945f04d8b78ad31e355bccd005d0";
sha256 = "1jk6955blbqdfwb4d89ri3bakizbzf9k07nrg6pnbv8vl5445k6c";
};
unstablePackages = import
unstableTarball
{ config = config.nixpkgs.config; };
I’m getting the error
undefined variable 'config'
If I change the line at the top of shell.nix
from:
{ pkgs ? import <nixpkgs>, system }:
to
{ pkgs ? import <nixpkgs>, system, config }:
I then get the error
shell.nix:1:1 called without required argument 'config'
Note there is a line in flake.nix
that is:
devShell =
import ./nix/shell.nix { inherit pkgs system; };
So perhaps I need to change this to pass in the config?
Note if I change:
unstablePackages = import
unstableTarball
{ config = config.nixpkgs.config; };
to
unstablePackages = import
unstableTarball
{ };
I get the error:
error: attribute 'currentSystem' missing
Anyone got any guidance?