diff --git a/lib/packages.nix b/lib/packages.nix deleted file mode 100644 index e13f9da..0000000 --- a/lib/packages.nix +++ /dev/null @@ -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; -} diff --git a/lib/removePackages.nix b/lib/removePackages.nix new file mode 100644 index 0000000..68f7351 --- /dev/null +++ b/lib/removePackages.nix @@ -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 diff --git a/overlay/no-x.nix b/overlay/no-x.nix index 69d6981..643ef93 100644 --- a/overlay/no-x.nix +++ b/overlay/no-x.nix @@ -5,7 +5,7 @@ let inherit (nixpkgs.lib.attrsets) genAttrs; inherit (nixpkgs.lib.lists) remove toList; inherit (nixpkgs.lib.strings) mesonBool mesonEnable; - inherit (self.lib) substituteFlags packages; + inherit (self.lib) substituteFlags removePackages; final' = final; prev' = prev; @@ -92,7 +92,7 @@ in genAttrs [ keepassxc = (prev.keepassxc.overrideAttrs (prevAttrs: { buildInputs = prevAttrs.buildInputs - |> packages.remove [ "kio" ]; + |> removePackages [ "kio" ]; })).override { withKeePassX11 = false; }; @@ -183,7 +183,7 @@ in genAttrs [ utsushi = prev.utsushi.overrideAttrs (prevAttrs: { buildInputs = prevAttrs.buildInputs or [ ] - |> packages.remove [ "gtkmm" ]; + |> removePackages [ "gtkmm" ]; configureFlags = prevAttrs.configureFlags or [ ] |> substituteFlags { "--with-gtkmm" = null; }; });