mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-25 23:41:42 +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 = [
|
imports = [
|
||||||
drv-parts.modules.drv-parts.mkDerivation
|
drv-parts.modules.drv-parts.mkDerivation
|
||||||
|
(drv-parts.lib.mkDerivation-based "buildPythonPackage")
|
||||||
./interface.nix
|
./interface.nix
|
||||||
../buildPythonPackage
|
|
||||||
../eval-cache
|
../eval-cache
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -183,6 +183,7 @@ in {
|
|||||||
stdenv
|
stdenv
|
||||||
;
|
;
|
||||||
python = nixpkgs.python3;
|
python = nixpkgs.python3;
|
||||||
|
buildPythonPackage = config.deps.python.pkgs.buildPythonPackage;
|
||||||
manylinuxPackages = nixpkgs.pythonManylinuxPackages.manylinux1;
|
manylinuxPackages = nixpkgs.pythonManylinuxPackages.manylinux1;
|
||||||
fetchPythonRequirements = nixpkgs.callPackage ../../../pkgs/fetchPythonRequirements {};
|
fetchPythonRequirements = nixpkgs.callPackage ../../../pkgs/fetchPythonRequirements {};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user