mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-25 23:41:42 +03:00
feat(mach-nix): use fetch-pip and set defaults
This commit is contained in:
parent
1e4e1cdaf5
commit
96873569bf
@ -157,6 +157,11 @@ in {
|
||||
];
|
||||
|
||||
config = {
|
||||
# use lock file to manage hash for fetchPip
|
||||
lock.fields.fetchPipHash =
|
||||
config.lock.lib.computeFODHash
|
||||
config.mach-nix.pythonSources;
|
||||
|
||||
mach-nix.drvs = (l.mapAttrs makeModuleFromDerivation preparedWheels.patchedWheels) // preparedWheels.builtWheels;
|
||||
mach-nix.dists =
|
||||
l.mapAttrs
|
||||
@ -165,6 +170,14 @@ in {
|
||||
|
||||
mach-nix.dependencyTree = dependencyTree;
|
||||
|
||||
mach-nix.pythonSources = {
|
||||
imports = [../../drv-parts/fetch-pip];
|
||||
deps.python = config.deps.python;
|
||||
fetch-pip = {
|
||||
hash = config.lock.content.fetchPipHash;
|
||||
};
|
||||
};
|
||||
|
||||
deps = {nixpkgs, ...}:
|
||||
l.mapAttrs (_: l.mkDefault) {
|
||||
inherit
|
||||
|
@ -10,11 +10,6 @@ in {
|
||||
../../drv-parts/mach-nix-xs
|
||||
];
|
||||
|
||||
# use lock file to manage hash for fetchPip
|
||||
lock.fields.fetchPipHash =
|
||||
config.lock.lib.computeFODHash
|
||||
config.mach-nix.pythonSources;
|
||||
|
||||
deps = {nixpkgs, ...}: {
|
||||
python = nixpkgs.python39;
|
||||
inherit (nixpkgs.writers) writePython3;
|
||||
@ -38,12 +33,9 @@ in {
|
||||
};
|
||||
|
||||
mach-nix.pythonSources = {
|
||||
imports = [../../drv-parts/fetch-pip];
|
||||
deps.python = config.deps.python;
|
||||
fetch-pip = {
|
||||
maxDate = "2023-01-01";
|
||||
requirementsList = ["${config.name}==${config.version}"];
|
||||
hash = config.lock.content.fetchPipHash;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user