From 1e4e1cdaf575fe9e7c08ab5775e2c18d707bb3fb Mon Sep 17 00:00:00 2001 From: DavHau Date: Thu, 23 Mar 2023 14:31:22 +0800 Subject: [PATCH] chore(ansible): make use of fetch-pip module --- v1/nix/modules/drvs/ansible/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/v1/nix/modules/drvs/ansible/default.nix b/v1/nix/modules/drvs/ansible/default.nix index 76b8c070..2d08c9d7 100644 --- a/v1/nix/modules/drvs/ansible/default.nix +++ b/v1/nix/modules/drvs/ansible/default.nix @@ -12,7 +12,8 @@ in { # use lock file to manage hash for fetchPip lock.fields.fetchPipHash = - config.lock.lib.computeFODHash config.mach-nix.pythonSources; + config.lock.lib.computeFODHash + config.mach-nix.pythonSources; deps = {nixpkgs, ...}: { python = nixpkgs.python39; @@ -36,11 +37,13 @@ in { ]; }; - mach-nix.pythonSources = config.deps.fetchPip { - inherit python; - name = config.name; - requirementsList = ["${config.name}==${config.version}"]; - hash = config.lock.content.fetchPipHash; - maxDate = "2023-01-01"; + 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; + }; }; }