From 8759480041dd950a19deabb6d96878f9647f7aa4 Mon Sep 17 00:00:00 2001 From: DavHau Date: Sat, 4 Mar 2023 20:44:10 +0700 Subject: [PATCH] feat(mkDerivation-based): use mkDerivation-based helper from drv-parts --- .../drv-parts/buildPythonPackage/default.nix | 17 ----------------- .../modules/drv-parts/mach-nix-xs/default.nix | 3 ++- 2 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 v1/nix/modules/drv-parts/buildPythonPackage/default.nix diff --git a/v1/nix/modules/drv-parts/buildPythonPackage/default.nix b/v1/nix/modules/drv-parts/buildPythonPackage/default.nix deleted file mode 100644 index c228bcea..00000000 --- a/v1/nix/modules/drv-parts/buildPythonPackage/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{config, lib, drv-parts, ...}: { - - # import the drv-parts core - imports = [drv-parts.modules.drv-parts.core]; - - # provide options for buildPythonPackage - options.buildPythonPackage = lib.mkOption { - type = with lib.types; attrsOf anything; - default = {}; - }; - - # pass options for buildPythonPackage to the final function call - config.package-func.args = config.buildPythonPackage; - - # set nixpkgs.buildPythonPackage as the final package function - config.package-func.func = config.deps.python.pkgs.buildPythonPackage; -} 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 792e256d..40dda860 100644 --- a/v1/nix/modules/drv-parts/mach-nix-xs/default.nix +++ b/v1/nix/modules/drv-parts/mach-nix-xs/default.nix @@ -150,8 +150,8 @@ in { imports = [ drv-parts.modules.drv-parts.mkDerivation + (drv-parts.lib.mkDerivation-based "buildPythonPackage") ./interface.nix - ../buildPythonPackage ../eval-cache ]; @@ -183,6 +183,7 @@ in { stdenv ; python = nixpkgs.python3; + buildPythonPackage = config.deps.python.pkgs.buildPythonPackage; manylinuxPackages = nixpkgs.pythonManylinuxPackages.manylinux1; fetchPythonRequirements = nixpkgs.callPackage ../../../pkgs/fetchPythonRequirements {}; }