We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python withPackages will reset/disable override of package.
override
Consider following nix scripts:
let pkgs = import <nixpkgs> { }; myPython = ((pkgs.python311.override (oldAttr: { sourceVersion = { major = "3"; minor = "11"; patch = "1"; suffix = ""; }; })).overrideAttrs(oldAttrs: { src = pkgs.fetchFromGitHub { owner = "python"; repo = "cpython"; rev = "v3.11.8"; }; })); myPythonWithPackages = myPython.withPackages (pypkgs: with pypkgs; [pip]); in pkgs.mkShell { packages = [ myPython ]; }
let pkgs = import <nixpkgs> { }; myPython = ((pkgs.python311.override (oldAttr: { sourceVersion = { major = "3"; minor = "11"; patch = "1"; suffix = ""; }; })).overrideAttrs(oldAttrs: { src = pkgs.fetchFromGitHub { owner = "python"; repo = "cpython"; rev = "v3.11.8"; }; })); myPythonWithPackages = myPython.withPackages (pypkgs: with pypkgs; [pip]); in pkgs.mkShell { packages = [ myPythonWithPackages ]; }
the first one will result in 3.11.8 but the second one is 3.11.9 which is the original one pkgs.python311 (w/o any override)
pkgs.python311
Both of above scripts should result in a 3.11.8 python.
If applicable, add screenshots to help explain your problem.
Add any other context about the problem here.
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
nix-shell -p nix-info --run "nix-info -m"
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m" this path will be fetched (0.00 MiB download, 0.00 MiB unpacked): /nix/store/kjhgwsnn7wkacncxhrcgc4mx0v82kbdf-nix-info copying path '/nix/store/kjhgwsnn7wkacncxhrcgc4mx0v82kbdf-nix-info' from 'https://cache.nixos.org'... - system: `"x86_64-linux"` - host os: `Linux 6.9.7-arch1-1, Arch Linux, noversion, rolling` - multi-user?: `yes` - sandbox: `yes` - version: `nix-env (Nix) 2.23.1` - channels(root): `"nixpkgs"` - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Python withPackages will reset/disable
override
of package.Steps To Reproduce
Consider following nix scripts:
the first one will result in 3.11.8 but the second one is 3.11.9 which is the original one
pkgs.python311
(w/o any override)Expected behavior
Both of above scripts should result in a 3.11.8 python.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: