lib/removePackages: Allow removal by package
This commit is contained in:
parent
59a47afe61
commit
87b5490592
3 changed files with 11 additions and 12 deletions
|
@ -1,9 +0,0 @@
|
||||||
{ nixpkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (builtins) elem filter;
|
|
||||||
inherit (nixpkgs.lib.strings) getName;
|
|
||||||
in {
|
|
||||||
remove = nameList: pkgList:
|
|
||||||
filter (pkg: !elem (getName pkg) nameList) pkgList;
|
|
||||||
}
|
|
8
lib/removePackages.nix
Normal file
8
lib/removePackages.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ nixpkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (builtins) elem filter;
|
||||||
|
inherit (nixpkgs.lib.strings) getName;
|
||||||
|
in pkgOrNameList: pkgList:
|
||||||
|
let nameList = map (pkg: getName pkg) pkgOrNameList;
|
||||||
|
in filter (pkg: !elem (getName pkg) nameList) pkgList
|
|
@ -5,7 +5,7 @@ let
|
||||||
inherit (nixpkgs.lib.attrsets) genAttrs;
|
inherit (nixpkgs.lib.attrsets) genAttrs;
|
||||||
inherit (nixpkgs.lib.lists) remove toList;
|
inherit (nixpkgs.lib.lists) remove toList;
|
||||||
inherit (nixpkgs.lib.strings) mesonBool mesonEnable;
|
inherit (nixpkgs.lib.strings) mesonBool mesonEnable;
|
||||||
inherit (self.lib) substituteFlags packages;
|
inherit (self.lib) substituteFlags removePackages;
|
||||||
|
|
||||||
final' = final;
|
final' = final;
|
||||||
prev' = prev;
|
prev' = prev;
|
||||||
|
@ -92,7 +92,7 @@ in genAttrs [
|
||||||
|
|
||||||
keepassxc = (prev.keepassxc.overrideAttrs (prevAttrs: {
|
keepassxc = (prev.keepassxc.overrideAttrs (prevAttrs: {
|
||||||
buildInputs = prevAttrs.buildInputs
|
buildInputs = prevAttrs.buildInputs
|
||||||
|> packages.remove [ "kio" ];
|
|> removePackages [ "kio" ];
|
||||||
})).override {
|
})).override {
|
||||||
withKeePassX11 = false;
|
withKeePassX11 = false;
|
||||||
};
|
};
|
||||||
|
@ -183,7 +183,7 @@ in genAttrs [
|
||||||
|
|
||||||
utsushi = prev.utsushi.overrideAttrs (prevAttrs: {
|
utsushi = prev.utsushi.overrideAttrs (prevAttrs: {
|
||||||
buildInputs = prevAttrs.buildInputs or [ ]
|
buildInputs = prevAttrs.buildInputs or [ ]
|
||||||
|> packages.remove [ "gtkmm" ];
|
|> removePackages [ "gtkmm" ];
|
||||||
configureFlags = prevAttrs.configureFlags or [ ]
|
configureFlags = prevAttrs.configureFlags or [ ]
|
||||||
|> substituteFlags { "--with-gtkmm" = null; };
|
|> substituteFlags { "--with-gtkmm" = null; };
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue