diff --git a/v1/nix/modules/drv-parts/mach-nix-xs/default.nix b/v1/nix/modules/drv-parts/mach-nix-xs/default.nix index 88e604e8..126a6416 100644 --- a/v1/nix/modules/drv-parts/mach-nix-xs/default.nix +++ b/v1/nix/modules/drv-parts/mach-nix-xs/default.nix @@ -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 diff --git a/v1/nix/modules/drvs/ansible/default.nix b/v1/nix/modules/drvs/ansible/default.nix index 2d08c9d7..790a9d42 100644 --- a/v1/nix/modules/drvs/ansible/default.nix +++ b/v1/nix/modules/drvs/ansible/default.nix @@ -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; }; }; }