mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-24 23:14:12 +03:00
feat(mkDerivation-based): use mkDerivation-based helper from drv-parts
This commit is contained in:
parent
51c92b53b4
commit
8759480041
@ -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;
|
||||
}
|
@ -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 {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user