Open asymmetric opened 1 year ago
If I copy that to my browser it works. Do you have problems with networking?
@asymmetric could you provide exact steps and files how to reproduce it?
Same issue as https://github.com/cachix/nixpkgs-python/issues/14
Should be fixed on main, can you try?
I'm not currently using this anymore, so I won't be able to investigate further, but running nix develop
with the following flake.nix
errors with a different error:
flake.nix
{
inputs.nixpkgs.url = "github:nixos/nixpkgs";
inputs.nixpkgs-python.url = "github:cachix/nixpkgs-python";
outputs = inputs:
let
system = "x86_64-linux";
pkgs = inputs.nixpkgs.legacyPackages.${system};
in
{
devShells.${system}.default = pkgs.mkShell {
packages = (inputs.nixpkgs-python.packages.${system}."3.9.2".withPackages (ps: with ps; [ requests ]));
};
};
}
nix develop
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'nix-shell'
whose name attribute is located at /nix/store/sf3hbz4qg3wkii2hx9lfixf4srkd89y1-source/pkgs/stdenv/generic/make-derivation.nix:352:7
… while evaluating attribute 'nativeBuildInputs' of derivation 'nix-shell'
at /nix/store/sf3hbz4qg3wkii2hx9lfixf4srkd89y1-source/pkgs/stdenv/generic/make-derivation.nix:396:7:
395| depsBuildBuild = elemAt (elemAt dependencies 0) 0;
396| nativeBuildInputs = elemAt (elemAt dependencies 0) 1;
| ^
397| depsBuildTarget = elemAt (elemAt dependencies 0) 2;
… while calling 'chooseDevOutputs'
at /nix/store/sf3hbz4qg3wkii2hx9lfixf4srkd89y1-source/lib/attrsets.nix:1146:5:
1145| # List of packages to pick `dev` outputs from
1146| drvs:
| ^
1147| builtins.map getDev drvs;
… from call site
at /nix/store/sf3hbz4qg3wkii2hx9lfixf4srkd89y1-source/pkgs/stdenv/generic/make-derivation.nix:293:51:
292| (map (drv: drv.__spliced.buildBuild or drv) (checkDependencyList "depsBuildBuild" depsBuildBuild))
293| (map (drv: drv.__spliced.buildHost or drv) (checkDependencyList "nativeBuildInputs" nativeBuildInputs'))
| ^
294| (map (drv: drv.__spliced.buildTarget or drv) (checkDependencyList "depsBuildTarget" depsBuildTarget))
… while calling 'checkDependencyList''
at /nix/store/sf3hbz4qg3wkii2hx9lfixf4srkd89y1-source/pkgs/stdenv/generic/make-derivation.nix:265:43:
264| checkDependencyList = checkDependencyList' [];
265| checkDependencyList' = positions: name: deps: flip imap1 deps (index: dep:
| ^
266| if isDerivation dep || dep == null || builtins.isString dep || builtins.isPath dep then dep
… from call site
at /nix/store/sf3hbz4qg3wkii2hx9lfixf4srkd89y1-source/pkgs/stdenv/generic/make-derivation.nix:265:49:
264| checkDependencyList = checkDependencyList' [];
265| checkDependencyList' = positions: name: deps: flip imap1 deps (index: dep:
| ^
266| if isDerivation dep || dep == null || builtins.isString dep || builtins.isPath dep then dep
… while calling 'flip'
at /nix/store/sf3hbz4qg3wkii2hx9lfixf4srkd89y1-source/lib/trivial.nix:148:16:
147| */
148| flip = f: a: b: f b a;
| ^
149|
… from call site
at /nix/store/sf3hbz4qg3wkii2hx9lfixf4srkd89y1-source/lib/trivial.nix:148:19:
147| */
148| flip = f: a: b: f b a;
| ^
149|
… while calling 'imap1'
at /nix/store/sf3hbz4qg3wkii2hx9lfixf4srkd89y1-source/lib/lists.nix:165:14:
164| */
165| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
166|
error: value is a set while a list was expected
I'm not currently using this anymore, so I won't be able to investigate further, but running
nix develop
with the followingflake.nix
errors with a different error:
I was getting hit by the same error, then realized I was using a flake based on a template that still was on nixpkgs nixos-23.05. Once I updated to 23.11, this seems to be working. Sample config:
Edit: Not really related to this issue, but just in case anyone tries the below code: My example actually must specify python 3.11.6 or below for the time being (which is the version in nixpkgs 23.11), because of some annoying issues with a bug in pytest-mock (which is a transitive dependency of practically everything). See:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs-python.url = "github:cachix/nixpkgs-python";
systems.url = "github:nix-systems/default";
devenv.url = "github:cachix/devenv";
};
outputs = { self, nixpkgs, devenv, systems, nixpkgs-python, ... }@inputs:
let forEachSystem = nixpkgs.lib.genAttrs (import systems);
in {
devShells = forEachSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
default = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [{
languages.python.enable = true;
languages.python.version = "3.11.6";
languages.python.venv.enable = true;
packages = with pkgs; [
postgresql
playwright
(nixpkgs-python.packages.${system}."3.11.6".withPackages (ps:
with ps; [
requests
pyyaml
]))
];
enterShell = ''pip install -r requirements.txt -e .'';
}];
};
});
};
}
I have the following in my
flake.nix
:which fails to build:
If I try adding
matplotlib
instead, the error is different: