poetry2nix/tests/override-support/default.nix

22 lines
490 B
Nix
Raw Normal View History

{ lib, python3, poetry2nix, runCommand }:
let
python = poetry2nix.mkPoetryPython {
python = python3;
poetryLock = ./poetry.lock;
src = lib.cleanSource ./.;
overrides = poetry2nix.defaultPoetryOverrides // {
2019-12-11 13:31:22 +01:00
alembic = self: super: drv: drv.overrideAttrs (
old: {
TESTING_FOOBAR = 42;
}
);
};
};
in
2019-12-11 13:31:22 +01:00
runCommand "test" {} ''
x=${builtins.toString (python.pkgs.alembic.TESTING_FOOBAR)}
2019-12-11 13:31:22 +01:00
[ "$x" = "42" ] || exit 1
mkdir $out
''