poetry2nix/tests/path-deps-develop/default.nix
K900 673ba1f7cc treewide: another pile of assorted changes
- update pinned nixpkgs used for tests
- fix the rest of the setuptools fallout
- add and test some scientific packages
2022-10-09 11:33:01 +13:00

28 lines
637 B
Nix

{ lib, poetry2nix, python3, runCommand }:
let
env = poetry2nix.mkPoetryEnv {
python = python3;
projectDir = ./.;
editablePackageSources = {
dep1 = null;
};
overrides = poetry2nix.overrides.withDefaults (self: super: {
dep1 = super.dep1.overridePythonAttrs (old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
});
});
};
in
lib.debug.runTests {
testDepFound = {
expected = "0\n";
expr = builtins.readFile (runCommand "path-deps-develop-import" { } ''
echo using ${env}
${env}/bin/python -c 'import dep1'
echo $? > $out
'');
};
}