feat(mkDerivation-based): use mkDerivation-based helper from drv-parts

This commit is contained in:
DavHau 2023-03-04 20:44:10 +07:00
parent 51c92b53b4
commit 8759480041
2 changed files with 2 additions and 18 deletions

View File

@ -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;
}

View File

@ -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 {};
}