packages/build-support/buildPythonPackage: fix for new drv-parts version

This commit is contained in:
Max Headroom 2023-03-21 16:51:59 +01:00
parent ed094531dc
commit 97ded90c9e
2 changed files with 64 additions and 55 deletions

View file

@ -1,4 +1,4 @@
{ config, dependencySets, lib, ... }:
{ config, dependencySets, drv-parts, lib, ... }:
let
inherit (config) deps;
@ -19,7 +19,11 @@ let
in
{
pname = lib.mkIf hasPyproject (lib.mkDefault pyproject.tool.poetry.name);
imports = [
drv-parts.modules.drv-parts.mkDerivation
];
name = lib.mkIf hasPyproject (lib.mkDefault pyproject.tool.poetry.name);
version = lib.mkIf hasPyproject (lib.mkDefault pyproject.tool.poetry.version);
deps = { pkgs, python3Packages, ... }: {
@ -46,6 +50,12 @@ in
;
};
env = {
LANG = "${if deps.python.stdenv.isDarwin then "en_US" else "C"}.UTF-8";
};
mkDerivation = {
nativeBuildInputs = with deps; [
python
wrapPython
@ -83,10 +93,6 @@ in
python
];
env = {
LANG = "${if deps.python.stdenv.isDarwin then "en_US" else "C"}.UTF-8";
};
doCheck = false;
doInstallCheck = lib.mkDefault true;
installCheckInputs = lib.optionals (config.format == "setuptools") [
@ -98,4 +104,5 @@ in
'');
outputs = [ "out" ] ++ lib.optional withDistOutput "dist";
};
}

View file

@ -25,6 +25,7 @@
];
pyprojectToml = ./pyproject.toml;
mkDerivation = {
propagatedBuildInputs = deps;
src = with inputs.nix-filter.lib; filter {
@ -36,4 +37,5 @@
};
};
};
};
}