2007-06-24 17:34:44 +02:00
|
|
|
{stdenv, fetchurl}:
|
|
|
|
stdenv.mkDerivation {
|
2010-01-08 21:04:23 +01:00
|
|
|
name = "unrar-3.9.7";
|
2007-06-24 17:34:44 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-01-08 21:04:23 +01:00
|
|
|
url = http://www.rarlab.com/rar/unrarsrc-3.9.7.tar.gz;
|
|
|
|
sha256 = "101w7fgfr5biyic8gj0km5aqi4xj8dikh4aa0rx0qvg8bjp19wb4";
|
2007-06-24 17:34:44 +02:00
|
|
|
};
|
|
|
|
|
2010-01-08 21:04:23 +01:00
|
|
|
# Add a missing objects to the library
|
|
|
|
#patchPhase = ''
|
|
|
|
# sed -i 's/^\(LIB_OBJ=.*\)/\1 recvol.o rs.o/' makefile.unix
|
|
|
|
#'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make -f makefile.unix unrar
|
|
|
|
rm *.o
|
|
|
|
make -f makefile.unix lib CXXFLAGS="-fPIC -O2 -DSILENT";
|
|
|
|
'';
|
2007-06-24 17:34:44 +02:00
|
|
|
|
2010-01-07 23:42:25 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/lib
|
|
|
|
cp unrar $out/bin
|
|
|
|
cp libunrar.so $out/lib
|
|
|
|
'';
|
2007-06-24 17:34:44 +02:00
|
|
|
|
|
|
|
buildInputs = [];
|
|
|
|
}
|