poetry2nix/hooks/default.nix
adisbladis 0367b93492
Turn pyproject.toml patching into a hook
We should not be setting pre/post phases as it's counter intuitive
when working with overrides.
2020-02-23 14:37:01 +00:00

25 lines
476 B
Nix

{ python
, callPackage
, makeSetupHook
, yj
}:
let
pythonInterpreter = python.pythonForBuild.interpreter;
in
{
removePathDependenciesHook = callPackage (
{}:
makeSetupHook {
name = "remove-path-dependencies.sh";
deps = [];
substitutions = {
inherit pythonInterpreter;
yj = "${yj}/bin/yj";
pyprojectPatchScript = "${./pyproject-without-path.py}";
};
} ./remove-path-dependencies.sh
) {};
}