conda: rebase on current nixpkgs PR https://github.com/NixOS/nixpkgs/pull/123323
This commit is contained in:
parent
8bbb6f63f2
commit
dc9b7d0c2b
7 changed files with 22 additions and 20 deletions
|
@ -1,14 +1,8 @@
|
|||
let
|
||||
nixpkgs_commit = builtins.readFile ../mach_nix/nix/NIXPKGS_COMMIT; # nixpkgs version to use python packages from
|
||||
nixpkgs_tarball_sha256 = builtins.readFile ../mach_nix/nix/NIXPKGS_SHA256;
|
||||
pkgs = import (builtins.fetchTarball {
|
||||
name = "nixpkgs";
|
||||
url = "https://github.com/nixos/nixpkgs/tarball/${builtins.readFile ../mach_nix/nix/NIXPKGS_COMMIT}";
|
||||
sha256 = "${builtins.readFile ../mach_nix/nix/NIXPKGS_SHA256}";
|
||||
}) { config = {}; overlays = []; };
|
||||
pkgs = import (import ../mach_nix/nix/nixpkgs-src.nix) { config = {}; overlays = []; };
|
||||
python = pkgs.python37;
|
||||
manylinux1 = [ pkgs.pythonManylinuxPackages.manylinux1 ];
|
||||
result = import ./overrides.nix;
|
||||
result = import ./overrides.nix { inherit pkgs python; };
|
||||
overrides = result.overrides manylinux1 pkgs.autoPatchelfHook;
|
||||
py = pkgs.python37.override { packageOverrides = overrides; };
|
||||
in
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
description = "Create highly reproducible python environments";
|
||||
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/873c294e03c";
|
||||
inputs.pypi-deps-db = {
|
||||
url = "github:DavHau/pypi-deps-db";
|
||||
flake = false;
|
||||
|
|
|
@ -17,16 +17,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1615259932,
|
||||
"narHash": "sha256-IXecmbqCr+XCtFwzBO3tHEd8PoJ4X4EyPZebKbV2ioE=",
|
||||
"lastModified": 1621687574,
|
||||
"narHash": "sha256-d5GSlJC3fJqsq0nfaBrB3vN3Am2+E0AhqC6ZWS2a4qs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "29b0d4d0b600f8f5dd0b86e3362a33d4181938f9",
|
||||
"rev": "873c294e03ccefb4ef4693a6a6258a2c75d44b80",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"ref": "873c294e03c",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
@ -264,7 +264,13 @@ class OverridesGenerator(ExpressionGenerator):
|
|||
url = "{src_url}";
|
||||
sha256 = "{src_sha256}";
|
||||
}};
|
||||
format = "condabin";
|
||||
format = "other";
|
||||
nativeBuildInputs = with python.pkgs; [
|
||||
autoPatchelfHook
|
||||
condaUnpackHook
|
||||
condaInstallHook
|
||||
];
|
||||
buildInputs = pkgs.pythonCondaPackages.condaPatchelfLibs;
|
||||
passthru = (get_passthru "{name}" "{nix_name}") // {{
|
||||
provider = "conda";
|
||||
allCondaDeps = allCondaDepsRec pSelf;
|
||||
|
|
|
@ -61,7 +61,6 @@ let
|
|||
};
|
||||
py_final = python_pkg.override { packageOverrides = l.mergeOverrides (
|
||||
overridesPre
|
||||
++ [ (import ./mk-python-derivation-overlay.nix pkgs python_pkg) ]
|
||||
++ [ result.overrides ]
|
||||
++ (l.fixes_to_overrides _fixes)
|
||||
++ overridesPost ++ (l.simple_overrides _)
|
||||
|
|
|
@ -27,18 +27,22 @@ pkgs: python: with pkgs.lib;
|
|||
in
|
||||
pySelf: pySuper: {
|
||||
buildPythonPackage = makeOverridablePythonPackage (
|
||||
makeOverridable (callPackage ./from-nixpkgs/mk-python-derivation.nix {
|
||||
makeOverridable (callPackage "${pkgs.path}/pkgs/development/interpreters/python/mk-python-derivation.nix" {
|
||||
inherit namePrefix; # We want Python libraries to be named like e.g. "python3.6-${name}"
|
||||
inherit toPythonModule; # Libraries provide modules
|
||||
autoPatchelfHook = callPackage ./auto_patchelf_hook.nix {};
|
||||
|
||||
# this prevents infinite recursions when overriding setuptools later
|
||||
setuptools = python.pkgs.setuptools;
|
||||
})
|
||||
);
|
||||
|
||||
buildPythonApplication = makeOverridablePythonPackage (
|
||||
makeOverridable (callPackage ./from-nixpkgs/mk-python-derivation.nix {
|
||||
makeOverridable (callPackage "${pkgs.path}/pkgs/development/interpreters/python/mk-python-derivation.nix" {
|
||||
namePrefix = ""; # Python applications should not have any prefix
|
||||
toPythonModule = x: x; # Application does not provide modules.
|
||||
autoPatchelfHook = callPackage ./auto_patchelf_hook.nix {};
|
||||
|
||||
# this prevents infinite recursions when overriding setuptools later
|
||||
setuptools = python.pkgs.setuptools;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
@ -112,7 +112,6 @@ let
|
|||
all_overrides = l.mergeOverrides (
|
||||
overridesPre ++ overrides_pre_extra
|
||||
++ extra_pkgs_py_overrides
|
||||
++ [ (import ./mk-python-derivation-overlay.nix pkgs python_pkg) ]
|
||||
++ [ result.overrides ]
|
||||
++ (l.fixes_to_overrides _fixes)
|
||||
++ overrides_post_extra ++ overridesPost
|
||||
|
|
Loading…
Reference in a new issue