dream2nix/tests/nix-unit/test_python-pdm/default.nix
DavHau 3f6c7cbd80 python/pdm: several improvements
- infer build-systems from pyproject.toml
- add more generic getClosure lib function to get the closure of any given dependency + extra
- resolve extras correctly for each computed closure
- overhaul some of the existing tests
2023-12-10 05:47:44 +00:00

30 lines
746 B
Nix

{
pkgs ? import <nixpkgs> {},
lib ? import <nixpkgs/lib>,
dream2nix ? import ../../../. inputs,
inputs ? (import ../../../.).inputs,
}: let
eval = module:
(lib.evalModules {
modules = [
dream2nix.modules.dream2nix.WIP-python-pdm
module
];
specialArgs = {
dream2nix = dream2nix // {inherit inputs;};
packageSets.nixpkgs = pkgs;
};
})
.config;
in {
test_pdm = let
config = eval {
pdm.lockfile = ./../test_python-pdm-lib/fixtures/pdm-example1.lock;
pdm.pyproject = ./../test_python-pdm-lib/fixtures/pyproject.toml;
};
in {
expr = (lib.head (lib.attrValues config.groups.default.packages.certifi)).public ? drvPath;
expected = true;
};
}