unrar: 6.2.5 -> 6.2.11
rar2fs: fix build
This commit is contained in:
@@ -1,45 +1,51 @@
|
|||||||
{lib, stdenv, fetchurl}:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchzip
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "unrar";
|
pname = "unrar";
|
||||||
version = "6.2.5";
|
version = "6.2.11";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchzip {
|
||||||
url = "https://www.rarlab.com/rar/unrarsrc-${version}.tar.gz";
|
url = "https://www.rarlab.com/rar/unrarsrc-${finalAttrs.version}.tar.gz";
|
||||||
hash = "sha256-mjl0QQ0dNA45mN0qb5j6776DjK1VYmbnFK37Doz5N3w=";
|
stripRoot = false;
|
||||||
|
hash = "sha256-HFglLjn4UE8dalp2ZIFlqqaE9FahahFrDNsPrKUIQPI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sourceRoot = finalAttrs.src.name;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace makefile \
|
substituteInPlace unrar/makefile \
|
||||||
--replace "CXX=" "#CXX=" \
|
--replace "CXX=" "#CXX=" \
|
||||||
--replace "STRIP=" "#STRIP=" \
|
--replace "STRIP=" "#STRIP=" \
|
||||||
--replace "AR=" "#AR="
|
--replace "AR=" "#AR="
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
# `make {unrar,lib}` call `make clean` implicitly
|
|
||||||
# move build results to another dir to avoid deleting them
|
|
||||||
mkdir -p bin
|
|
||||||
|
|
||||||
make unrar
|
|
||||||
mv unrar bin
|
|
||||||
|
|
||||||
make lib
|
|
||||||
mv libunrar.so bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
|
# `make {unrar,lib}` call `make clean` implicitly
|
||||||
|
# separate build into different dirs to avoid deleting them
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
|
cp -a unrar libunrar
|
||||||
|
make -C libunrar lib
|
||||||
|
make -C unrar -j1
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dt "$out/bin" bin/unrar
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/share/doc/unrar
|
install -Dm755 unrar/unrar -t $out/bin/
|
||||||
cp acknow.txt license.txt \
|
install -Dm644 unrar/{acknow.txt,license.txt} -t $out/share/doc/unrar/
|
||||||
$out/share/doc/unrar
|
|
||||||
|
|
||||||
install -Dm755 bin/libunrar.so $out/lib/libunrar.so
|
install -Dm755 libunrar/libunrar.so -t $out/lib/
|
||||||
|
install -Dm644 libunrar/dll.hpp -t $dev/include/unrar/
|
||||||
|
|
||||||
install -Dt $dev/include/unrar/ *.hpp
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
@@ -48,7 +54,7 @@ stdenv.mkDerivation rec {
|
|||||||
description = "Utility for RAR archives";
|
description = "Utility for RAR archives";
|
||||||
homepage = "https://www.rarlab.com/";
|
homepage = "https://www.rarlab.com/";
|
||||||
license = licenses.unfreeRedistributable;
|
license = licenses.unfreeRedistributable;
|
||||||
maintainers = [ maintainers.ehmry ];
|
maintainers = with maintainers; [ ehmry wegank ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ lib, stdenv
|
{ lib
|
||||||
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, autoreconfHook
|
, autoreconfHook
|
||||||
, fuse
|
, fuse
|
||||||
@@ -25,7 +26,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ fuse unrar ];
|
buildInputs = [ fuse unrar ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-unrar=${unrar.dev}/include/unrar"
|
"--with-unrar=${unrar.src}/unrar"
|
||||||
"--disable-static-unrar"
|
"--disable-static-unrar"
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -33,7 +34,7 @@ stdenv.mkDerivation rec {
|
|||||||
description = "FUSE file system for reading RAR archives";
|
description = "FUSE file system for reading RAR archives";
|
||||||
homepage = "https://hasse69.github.io/rar2fs/";
|
homepage = "https://hasse69.github.io/rar2fs/";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
maintainers = with maintainers; [ kraem ];
|
maintainers = with maintainers; [ kraem wegank ];
|
||||||
platforms = with platforms; linux ++ freebsd;
|
platforms = with platforms; linux ++ freebsd;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user