Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
66 lines
1.4 KiB
Nix
66 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchzip,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "unrar";
|
|
version = "7.1.10";
|
|
|
|
src = fetchzip {
|
|
url = "https://www.rarlab.com/rar/unrarsrc-${finalAttrs.version}.tar.gz";
|
|
stripRoot = false;
|
|
hash = "sha256-qUqUJ7NZyF+/skmdYMeE+u6KoHswcJvQSnRQ8rAKXp8=";
|
|
};
|
|
|
|
sourceRoot = finalAttrs.src.name;
|
|
|
|
postPatch = ''
|
|
substituteInPlace unrar/makefile \
|
|
--replace-fail "CXX=" "#CXX=" \
|
|
--replace-fail "STRIP=" "#STRIP=" \
|
|
--replace-fail "AR=" "#AR="
|
|
'';
|
|
|
|
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 -j$NIX_BUILD_CORES
|
|
make -C unrar -j$NIX_BUILD_CORES
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 unrar/unrar -t $out/bin/
|
|
install -Dm644 unrar/{acknow.txt,license.txt} -t $out/share/doc/unrar/
|
|
|
|
install -Dm755 libunrar/libunrar.so -t $out/lib/
|
|
install -Dm644 libunrar/dll.hpp -t $dev/include/unrar/
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
meta = with lib; {
|
|
description = "Utility for RAR archives";
|
|
homepage = "https://www.rarlab.com/";
|
|
license = licenses.unfreeRedistributable;
|
|
mainProgram = "unrar";
|
|
maintainers = with maintainers; [ wegank ];
|
|
platforms = platforms.all;
|
|
};
|
|
})
|