Commit ce262e42 authored by Thiago Kenji Okada's avatar Thiago Kenji Okada
Browse files

rar: allow evaluation in all platforms

parent b2d0d556
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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 ];
  };
}