From 2e248040a6a2de3846c791ac7df0f1d63b2481d0 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 20 Nov 2015 21:25:45 +0100 Subject: [PATCH] hplip: fix broken `platforms` hack --- pkgs/misc/drivers/hplip/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix index 9d6bd2dcfb97..c09017594a7d 100644 --- a/pkgs/misc/drivers/hplip/default.nix +++ b/pkgs/misc/drivers/hplip/default.nix @@ -29,15 +29,16 @@ let src = ./hplip.state; }; - hplipArch = + hplipPlatforms = { - "i686-linux" = "x86_32"; + "i686-linux" = "x86_32"; "x86_64-linux" = "x86_64"; - "arm6l-linux" = "arm32"; - "arm7l-linux" = "arm32"; - }."${stdenv.system}" or (abort "Unsupported platform ${stdenv.system}"); + "armv6l-linux" = "arm32"; + "armv7l-linux" = "arm32"; + }; - platforms = [ "i686-linux" "x86_64-linux" "armv6l-linux" "armv7l-linux" ]; + hplipArch = hplipPlatforms."${stdenv.system}" + or (abort "Unsupported platform ${stdenv.system}"); in @@ -108,7 +109,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; postInstall = - (stdenv.lib.optionalString (withPlugin && builtins.elem stdenv.system platforms) + (stdenv.lib.optionalString (withPlugin && builtins.hasAttr stdenv.system hplipPlatforms) (let hplipArch = if stdenv.system == "i686-linux" then "x86_32" else if stdenv.system == "x86_64-linux" then "x86_64"