mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-29 23:35:33 +03:00
feat(pip): add option ignoredDependencies, to ignore dependencies like wheel
also add unzip to native build inputs to allow .zip sdist files
This commit is contained in:
parent
919cd21990
commit
b58cc53fac
@ -9,6 +9,20 @@
|
|||||||
python = config.deps.python;
|
python = config.deps.python;
|
||||||
metadata = config.lock.content.fetchPipMetadata;
|
metadata = config.lock.content.fetchPipMetadata;
|
||||||
|
|
||||||
|
ignored = l.genAttrs cfg.ignoredDependencies (name: true);
|
||||||
|
|
||||||
|
filterTarget = target:
|
||||||
|
l.filterAttrs (name: target: ! ignored ? ${name}) target;
|
||||||
|
|
||||||
|
# filter out ignored dependencies
|
||||||
|
targets = l.flip l.mapAttrs metadata.targets (
|
||||||
|
targetName: target:
|
||||||
|
l.flip l.mapAttrs (filterTarget target) (
|
||||||
|
packageName: deps:
|
||||||
|
l.filter (dep: ! ignored ? ${dep}) deps
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
writers = import ../../../pkgs/writers {
|
writers = import ../../../pkgs/writers {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
inherit
|
inherit
|
||||||
@ -64,6 +78,7 @@
|
|||||||
gawk
|
gawk
|
||||||
path
|
path
|
||||||
stdenv
|
stdenv
|
||||||
|
unzip
|
||||||
writeScript
|
writeScript
|
||||||
writeScriptBin
|
writeScriptBin
|
||||||
;
|
;
|
||||||
|
@ -16,6 +16,13 @@ in {
|
|||||||
'';
|
'';
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
|
ignoredDependencies = l.mkOption {
|
||||||
|
type = t.listOf t.str;
|
||||||
|
description = ''
|
||||||
|
list of dependencies to ignore
|
||||||
|
'';
|
||||||
|
default = ["wheel"];
|
||||||
|
};
|
||||||
pypiSnapshotDate = l.mkOption {
|
pypiSnapshotDate = l.mkOption {
|
||||||
type = t.str;
|
type = t.str;
|
||||||
description = ''
|
description = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user