about summary refs log tree commit diff
path: root/machines/aszlig
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2017-07-17 05:43:05 +0200
committeraszlig <aszlig@redmoonstudios.org>2017-07-17 06:11:18 +0200
commit0feae9218e6f922366665e6515bc1a416dbcfa3f (patch)
treea67a6a15bc38f307743ef8bdee4278560a61c6c8 /machines/aszlig
parente6edd03e4d99b3e50687aad4bc2fedd2153692d8 (diff)
Convert packageOverrides to overlays
There are two other occasions where packageOverrides are still in use,
one of them is @sternenseemann's fliewatuet machine and another one is
@devhell's package profile.

I've replaced every other occurence of packageOverrides and replaced it
with overlays and checked the store path hash after evaluation.

The reason why I left @sternenseemann's fliewatuet alone was that for
I wasn't quite sure whether "bluez = pkgs.bluez5" is still needed or
intentional to pin it to version 5. Because if it's not the case the
packageOverrides can just be dropped because bluez is already bluez5 in
upstream <nixpkgs>.

For @devhell's package profile, I did the conversion, but the store path
turned out to be a different one than what it was prior to the change.

I did take a quick look at the requisites of the drv and found that sox
was one of the different paths that led to the change in the final store
path.

This obviously needs to be tested and/or investigated first.

Other than that, the main reason why I'm moving everything to overlays
is that it's the replacement for packageOverrides and also has a better
way to pass through chains of overrides than packageOverrides had.

My guess is that after NixOS 17.09, the old packageOverrides function
will be removed, so let's make sure we're ready for that.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @devhell, @sternenseemann
Diffstat (limited to 'machines/aszlig')
-rw-r--r--machines/aszlig/dnyarri.nix14
1 files changed, 6 insertions, 8 deletions
diff --git a/machines/aszlig/dnyarri.nix b/machines/aszlig/dnyarri.nix
index 30103a86..b6082451 100644
--- a/machines/aszlig/dnyarri.nix
+++ b/machines/aszlig/dnyarri.nix
@@ -56,14 +56,12 @@ in {
 
   # This is very ugly and I really want to avoid non-free packages on all
   # of my workstations. But right now I need to get rid of useless paper.
-  nixpkgs.config = {
-    allowUnfreePredicate = pkg: let
-      inherit (builtins.parseDrvName pkg.name) name;
-    in name == "hplip";
-    packageOverrides = super: {
-      hplip = super.hplip.override { withPlugin = true; };
-    };
-  };
+  nixpkgs.config.allowUnfreePredicate = pkg: let
+    inherit (builtins.parseDrvName pkg.name) name;
+  in name == "hplip";
+  nixpkgs.overlays = lib.singleton (lib.const (super: {
+    hplip = super.hplip.override { withPlugin = true; };
+  }));
 
   hardware.sane.enable = true;
   hardware.sane.extraBackends = [ pkgs.hplip ];