7zz: 21.01 -> 21.04 (#145031)
* 7zz: 21.01 -> 21.04 Also build from source instead of using the binaries. We cannot (yet) build the fully optimized version as it requires the ASMC assembler which currently doesn't build with GCC.
This commit is contained in:
parent
77e7d796b8
commit
0437e90238
@ -1,47 +1,48 @@
|
||||
{ lib, stdenv, fetchurl, autoPatchelfHook }:
|
||||
{ stdenv, lib, fetchurl, p7zip }:
|
||||
|
||||
let platform = if stdenv.isi686 then "x86"
|
||||
else if stdenv.isx86_64 then "x64"
|
||||
else if stdenv.isAarch32 then "arm"
|
||||
else if stdenv.isAarch64 then "arm64"
|
||||
else throw "Unsupported architecture";
|
||||
|
||||
url = "https://7-zip.org/a/7z2101-linux-${platform}.tar.xz";
|
||||
|
||||
hashes = {
|
||||
x86 = "0k6vg85ld8i2pcv5sv3xbvf3swqh9qj8hf2jcpadssys3yyidqyj";
|
||||
x64 = "1yfanx98fizj8d2s87yxgsy30zydx7h5w9wf4wy3blgsp0vkbjb3";
|
||||
arm = "04iah9vijm86r8rbkhxig86fx3lpag4xi7i3vq7gfrlwkymclhm1";
|
||||
arm64 = "0a26ginpb22aydcyvffxpbi7lxh4sgs9gb6cj96qqx7cnf7bk2ri";
|
||||
};
|
||||
sha256 = hashes."${platform}";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
# https://sourceforge.net/p/sevenzip/discussion/45797/thread/7fe6c21efa/
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "7zz";
|
||||
version = "21.01";
|
||||
version = "21.04";
|
||||
|
||||
src = fetchurl { inherit url sha256; };
|
||||
sourceRoot = ".";
|
||||
src = fetchurl {
|
||||
url = "https://7-zip.org/a/7z${lib.replaceStrings ["." ] [""] version}-src.7z";
|
||||
sha256 = "sha256-XmuEyIJAJQM0ZbgrW02lQ2rp4KFDBjLXKRaTfY+VCOg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
buildInputs = [ stdenv.cc.cc.lib ];
|
||||
sourceRoot = "CPP/7zip/Bundles/Alone2";
|
||||
|
||||
dontBuild = true;
|
||||
# we need https://github.com/nidud/asmc/tree/master/source/asmc/linux in order
|
||||
# to build with the optimized assembler but that doesn't support building with
|
||||
# GCC: https://github.com/nidud/asmc/issues/8
|
||||
makefile = "../../cmpl_gcc.mak"; # "../../cmpl_gcc_x64.mak";
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" ];
|
||||
|
||||
nativeBuildInputs = [ p7zip ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -D -t $out/bin 7zz
|
||||
|
||||
install -Dm555 -t $out/bin b/g/7zz
|
||||
install -Dm444 -t $out/share/doc/${pname} ../../../../DOC/*.txt
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
installCheckPhase = ''
|
||||
$out/bin/7zz --help | grep ${version}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command line archiver utility";
|
||||
homepage = "https://www.7-zip.org";
|
||||
|
||||
# source not released yet. will be under LGPL 2.1+ with RAR exception
|
||||
license = licenses.unfree;
|
||||
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" ];
|
||||
maintainers = with maintainers; [ anna328p ];
|
||||
homepage = "https://7zip.org";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ anna328p peterhoeg ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user