From ce262e428718bbb65c7df5561eb20c3c2d9e0403 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Mon, 8 Jan 2024 19:27:17 +0000 Subject: [PATCH] rar: allow evaluation in all platforms --- pkgs/tools/archivers/rar/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/archivers/rar/default.nix b/pkgs/tools/archivers/rar/default.nix index 8faa605b96d1..168316813f76 100644 --- a/pkgs/tools/archivers/rar/default.nix +++ b/pkgs/tools/archivers/rar/default.nix @@ -9,7 +9,7 @@ let version = "6.24"; downloadVersion = lib.replaceStrings [ "." ] [ "" ] version; # Use `./update.sh` to generate the entries below - srcUrl = { + srcs = { i686-linux = { url = "https://www.rarlab.com/rar/rarlinux-x32-${downloadVersion}.tar.gz"; hash = "sha256-aacgJH0iJLRNEaZuVyzl/FxZgSnW3dIZFUfaqt0l88M="; @@ -26,7 +26,7 @@ let url = "https://www.rarlab.com/rar/rarmacos-x64-${downloadVersion}.tar.gz"; hash = "sha256-4vENPNfMpQstsm9+8+glHPK9fAlDmnHWbCHW+HUwSX4="; }; - }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); + }; manSrc = fetchurl { url = "https://aur.archlinux.org/cgit/aur.git/plain/rar.1?h=rar&id=8e39a12e88d8a3b168c496c44c18d443c876dd10"; name = "rar.1"; @@ -37,7 +37,7 @@ stdenv.mkDerivation { pname = "rar"; inherit version; - src = fetchurl srcUrl; + src = fetchurl (srcs.${stdenv.hostPlatform.system}); dontBuild = true; @@ -69,7 +69,7 @@ stdenv.mkDerivation { license = licenses.unfree; mainProgram = "rar"; maintainers = with maintainers; [ thiagokokada ]; - platforms = with platforms; linux ++ darwin; + platforms = lib.attrNames srcs; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; }; }