wip: use new drv-parts mkDerivation interface

This commit is contained in:
phaer 2023-03-05 14:08:02 +01:00 committed by DavHau
parent b2024ad22e
commit 123e6cfe7a

View File

@ -137,6 +137,7 @@
# install manualSetupDeps
pipInstallFlags =
map (distDir: "--find-links ${distDir}") manualSetupDeps.${pname} or [];
nativeBuildInputs = [config.deps.autoPatchelfHook];
}
# If setup deps have been specified manually, we need to remove the
@ -151,16 +152,24 @@
inherit (config) deps;
}
({config, ...}: let
src = distFile name;
version = getVersion src;
file = distFile name;
version = getVersion file;
src =
if isWheel file
then file
else mkWheelDist name version (getFetchedDistPath name);
in {
imports = [drv-parts.modules.drv-parts.mkDerivation];
inherit name src version;
deps = {deps, ...}: {
inherit (deps) stdenv autoPatchelfHook python pip;
};
unpackPhase = "true";
public = {
inherit name version;
};
mkDerivation = {
inherit src;
nativeBuildInputs = [
config.deps.autoPatchelfHook
@ -174,6 +183,7 @@
config.deps.pip
];
unpackPhase = "true";
installPhase = let
pythonInterpreter = config.deps.python.pythonForBuild.interpreter;
pythonSitePackages = config.deps.python.sitePackages;