pdm: add rudimentary devShell

Also fix lock script to not swallow error messages
This commit is contained in:
DavHau 2024-02-20 18:44:47 +07:00 committed by mergify[bot]
parent 5a5ae25b04
commit 3308e05808
2 changed files with 9 additions and 2 deletions

View File

@ -75,6 +75,7 @@ in {
buildPackages
curl
jq
mkShell
runCommand
stdenvNoCC
stdenv
@ -100,6 +101,12 @@ in {
# all packages attrs prefixed with version
(lib.attrValues config.groups.default.packages);
};
public.devShell = let
interpreter = config.deps.python.withPackages (ps: config.mkDerivation.propagatedBuildInputs);
in
config.deps.mkShell {
packages = [interpreter];
};
groups = let
groupNames = lib.attrNames groups_with_deps;
populateGroup = groupname: let
@ -131,7 +138,7 @@ in {
(dream2nix.overrides.python.${name} or {})
];
inherit name;
version = pkg.version;
version = lib.mkDefault pkg.version;
buildPythonPackage = {
format = lib.mkDefault (
if lib.hasSuffix ".whl" source.file

View File

@ -27,7 +27,7 @@
repo_path = Path(subprocess.run(
['${config.paths.findRoot}'], # noqa: E501
check=True, text=True, capture_output=True
check=True, text=True, stdout=subprocess.PIPE
).stdout.strip())
lock_path_rel = Path('${config.paths.package}/${config.paths.lockFile}') # noqa: E501
lock_path = repo_path / lock_path_rel.relative_to(lock_path_rel.anchor)