poetry2nix/tests/override-support/default.nix
adisbladis 9b33e9e3b6
Make overrides export the overlay function
This is preparation work for providing a function that allows
customising the overrides.
2020-01-02 18:07:14 +00:00

27 lines
574 B
Nix

{ lib, python3, poetry2nix, runCommand }:
let
p = poetry2nix.mkPoetryApplication {
python = python3;
src = ./.;
poetrylock = ./poetry.lock;
pyproject = ./pyproject.toml;
overrides = [
poetry2nix.defaultPoetryOverrides
(
self: super: {
alembic = super.alembic.overrideAttrs (
old: {
TESTING_FOOBAR = 42;
}
);
}
)
];
};
in
runCommand "test" {} ''
x=${builtins.toString (p.python.pkgs.alembic.TESTING_FOOBAR)}
[ "$x" = "42" ] || exit 1
mkdir $out
''