From 856ee03a203722722fb646c62c36e4b6aabadaee Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Sep 2019 20:17:56 +0200 Subject: treewide: use packageName --- lass/2configs/br.nix | 9 +++++---- makefu/2configs/default.nix | 3 ++- tv/2configs/br.nix | 9 +++++---- tv/2configs/hw/AO753.nix | 2 +- tv/2configs/hw/w110er.nix | 9 +++++---- tv/2configs/xp-332.nix | 2 +- 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/lass/2configs/br.nix b/lass/2configs/br.nix index ad307c79..e4ccffe2 100644 --- a/lass/2configs/br.nix +++ b/lass/2configs/br.nix @@ -5,10 +5,11 @@ with import ; ]; - krebs.nixpkgs.allowUnfreePredicate = pkg: any (flip hasPrefix pkg.name) [ - "brother-udev-rule-type1-" - "brscan4-" - "mfcl2700dnlpr-" + krebs.nixpkgs.allowUnfreePredicate = pkg: any (eq (packageName pkg)) [ + "brother-udev-rule-type1" + "brscan4" + "brscan4-etc-files" + "mfcl2700dnlpr" ]; hardware.sane = { diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 177114a4..5faf3ce9 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -31,7 +31,8 @@ with import ; boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; - nixpkgs.config.allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "unrar-" pkg.name); + nixpkgs.config.allowUnfreePredicate = pkg: packageName pkg == "unrar"; + krebs = { enable = true; diff --git a/tv/2configs/br.nix b/tv/2configs/br.nix index d660ebc3..e6a46e90 100644 --- a/tv/2configs/br.nix +++ b/tv/2configs/br.nix @@ -5,10 +5,11 @@ with import ; ]; - krebs.nixpkgs.allowUnfreePredicate = pkg: any (flip hasPrefix pkg.name) [ - "brother-udev-rule-type1-" - "brscan4-" - "mfcl2700dnlpr-" + krebs.nixpkgs.allowUnfreePredicate = pkg: any (eq (packageName pkg)) [ + "brother-udev-rule-type1" + "brscan4" + "brscan4-etc-files" + "mfcl2700dnlpr" ]; hardware.sane = { diff --git a/tv/2configs/hw/AO753.nix b/tv/2configs/hw/AO753.nix index 4df5e097..d5b755ce 100644 --- a/tv/2configs/hw/AO753.nix +++ b/tv/2configs/hw/AO753.nix @@ -39,5 +39,5 @@ with import ; HandleSuspendKey=ignore ''; - krebs.nixpkgs.allowUnfreePredicate = pkg: hasPrefix "broadcom-sta-" pkg.name; + krebs.nixpkgs.allowUnfreePredicate = pkg: packageName pkg == "broadcom-sta"; } diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix index 55e9482d..7d837eab 100644 --- a/tv/2configs/hw/w110er.nix +++ b/tv/2configs/hw/w110er.nix @@ -10,10 +10,11 @@ with import ; #hardware.bumblebee.enable = true; #hardware.bumblebee.group = "video"; #hardware.enableRedistributableFirmware= true; - #krebs.nixpkgs.allowUnfreePredicate = pkg: - # hasPrefix "nvidia-x11-" pkg.name || - # hasPrefix "nvidia-persistenced-" pkg.name || - # hasPrefix "nvidia-settings-" pkg.name; + #krebs.nixpkgs.allowUnfreePredicate = pkg: any (eq (packageName pkg)) [ + # "nvidia-x11" + # "nvidia-persistenced" + # "nvidia-settings" + #]; } ]; diff --git a/tv/2configs/xp-332.nix b/tv/2configs/xp-332.nix index 4a0b0ae1..a66b884c 100644 --- a/tv/2configs/xp-332.nix +++ b/tv/2configs/xp-332.nix @@ -16,7 +16,7 @@ with import ; }; krebs.nixpkgs.allowUnfreePredicate = pkg: - elem (parseDrvName pkg.name).name [ "imagescan-plugin-networkscan" ]; + packageName pkg == "imagescan-plugin-networkscan"; nixpkgs.overlays = singleton (self: super: { utsushi-customized = self.utsushi.override { -- cgit v1.2.3