From 8b25e766546ec131b154e20b0a28dc9dfc450a8c Mon Sep 17 00:00:00 2001 From: Florian Friesdorf Date: Wed, 18 Sep 2024 18:26:08 +0200 Subject: [PATCH] Enable building python reuse from source --- overrides/python/reuse/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 overrides/python/reuse/default.nix diff --git a/overrides/python/reuse/default.nix b/overrides/python/reuse/default.nix new file mode 100644 index 0000000000..0c8560aec2 --- /dev/null +++ b/overrides/python/reuse/default.nix @@ -0,0 +1,12 @@ +{ + config, + lib, + dream2nix, + ... +}: let + isSdist = lib.hasSuffix ".tar.gz" config.mkDerivation.src; + python = config.deps.python; +in { + buildPythonPackage.pyproject = lib.mkIf isSdist true; + mkDerivation.nativeBuildInputs = lib.mkIf isSdist [ python.pkgs.poetry-core ]; +}