poetry2nix/tests/override-support/default.nix

25 lines
538 B
Nix
Raw Permalink Normal View History

{ lib, python3, poetry2nix, runCommand }:
let
p = poetry2nix.mkPoetryApplication {
python = python3;
src = ./.;
poetrylock = ./poetry.lock;
pyproject = ./pyproject.toml;
2020-05-19 21:06:02 +01:00
overrides = poetry2nix.overrides.withDefaults (
self: super: {
alembic = super.alembic.overrideAttrs (
old: {
TESTING_FOOBAR = 42;
}
);
}
);
};
in
2020-05-19 21:06:02 +01:00
runCommand "test"
{ } ''
2019-12-17 15:06:09 +01:00
x=${builtins.toString (p.python.pkgs.alembic.TESTING_FOOBAR)}
2019-12-11 13:31:22 +01:00
[ "$x" = "42" ] || exit 1
mkdir $out
''