mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-22 06:32:21 +03:00
pdm: add rudimentary devShell
Also fix lock script to not swallow error messages
This commit is contained in:
parent
5a5ae25b04
commit
3308e05808
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user