poetry2nix/tests/git-subdirectory-hook/default.nix
2024-05-03 08:28:47 -04:00

19 lines
475 B
Nix

{ poetry2nix, python3, runCommand }:
let
env = poetry2nix.mkPoetryEnv {
python = python3;
projectDir = ./.;
overrides = [
(final: prev: {
trivial = prev.trivial.overridePythonAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ final.poetry-core ];
});
})
poetry2nix.defaultPoetryOverrides
];
};
in
runCommand "git-subdirectory" { } ''
${env}/bin/python -c 'import trivial'
touch $out
''