poetry2nix/tests/override-default-support/default.nix

29 lines
682 B
Nix
Raw Permalink Normal View History

2020-01-02 22:02:08 +00:00
{ lib, python3, poetry2nix, runCommand }:
let
p = poetry2nix.mkPoetryApplication {
python = python3;
src = ./.;
poetrylock = ./poetry.lock;
pyproject = ./pyproject.toml;
overrides = [
((
2020-05-19 21:06:02 +01:00
poetry2nix.defaultPoetryOverrides.overrideOverlay (
self: super: {
alembic = super.alembic.overrideAttrs (
old: {
TESTING_FOOBAR = 42;
}
);
}
)
).extend (pyself: pysuper: { })) # Test .extend for good measure
2020-01-02 22:02:08 +00:00
];
};
in
2020-05-19 21:06:02 +01:00
runCommand "test"
{ } ''
2020-01-02 22:02:08 +00:00
x=${builtins.toString (p.python.pkgs.alembic.TESTING_FOOBAR)}
[ "$x" = "42" ] || exit 1
mkdir $out
''