nixpkgs/pkgs/tools/archivers/unrar/default.nix

33 lines
661 B
Nix
Raw Normal View History

{stdenv, fetchurl}:
2014-04-07 23:13:24 +02:00
let
version = "5.1.2";
in
stdenv.mkDerivation {
2014-04-07 23:13:24 +02:00
name = "unrar-${version}";
src = fetchurl {
2014-04-07 23:13:24 +02:00
url = "http://www.rarlab.com/rar/unrarsrc-${version}.tar.gz";
sha256 = "0344cn4w3lw2111m3g431khiyndx9ibbp952bli1inx2fixps9cq";
};
2014-04-07 23:13:24 +02:00
patchPhase = ''
sed -i \
-e "/CXX=/d" \
-e "/CXXFLAGS=/d" \
makefile
'';
installPhase = ''
2014-04-07 23:13:24 +02:00
mkdir -p $out/bin
cp unrar $out/bin
'';
2014-04-07 23:13:24 +02:00
meta = {
description = "Utility for RAR archives";
license = "freeware";
maintainers = [ stdenv.lib.maintainers.emery ];
2014-04-20 15:29:05 +02:00
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; # arbitrary
2014-04-07 23:13:24 +02:00
};
}