diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/archivers/p7zip/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/archivers/p7zip/default.nix | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/tools/archivers/p7zip/default.nix b/nixpkgs/pkgs/tools/archivers/p7zip/default.nix index 610e89c2fc3b..ed2340ca628d 100644 --- a/nixpkgs/pkgs/tools/archivers/p7zip/default.nix +++ b/nixpkgs/pkgs/tools/archivers/p7zip/default.nix @@ -1,21 +1,15 @@ -{ stdenv, fetchFromGitHub, lib, enableUnfree ? false }: +{ stdenv, fetchFromGitHub, fetchpatch, lib, enableUnfree ? false }: stdenv.mkDerivation rec { pname = "p7zip"; - version = "17.01"; - + version = "17.03"; src = fetchFromGitHub { owner = "szcnick"; repo = pname; rev = "v${version}"; - sha256 = "0gczdmypwbfnxzb11rjrrndjkkb3jzxfby2cchn5j8ysny13mfps"; - } - ; - - patches = [ - ./gcc10.patch - ]; + sha256 = "0zgpa90z5p30jbpqydiig1h8hn41c76n2x26rh8cc92xw72ni33d"; + }; # Default makefile is full of impurities on Darwin. The patch doesn't hurt Linux so I'm leaving it unconditional postPatch = '' @@ -24,7 +18,7 @@ stdenv.mkDerivation rec { # I think this is a typo and should be CXX? Either way let's kill it sed -i '/XX=\/usr/d' makefile.macosx_llvm_64bits - '' + stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' substituteInPlace makefile.machine \ --replace 'CC=gcc' 'CC=${stdenv.cc.targetPrefix}gcc' \ --replace 'CXX=g++' 'CXX=${stdenv.cc.targetPrefix}g++' @@ -35,24 +29,25 @@ stdenv.mkDerivation rec { find . -name makefile'*' -exec sed -i '/Rar/d' {} + ''; + makeFlags = [ "DEST_HOME=${placeholder "out"}" ]; + preConfigure = '' - makeFlagsArray=(DEST_HOME=$out) - buildFlags=all3 - '' + stdenv.lib.optionalString stdenv.isDarwin '' - cp makefile.macosx_llvm_64bits makefile.machine -''; + buildFlags=all3 + '' + lib.optionalString stdenv.isDarwin '' + cp makefile.macosx_llvm_64bits makefile.machine + ''; enableParallelBuilding = true; setupHook = ./setup-hook.sh; - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; meta = { homepage = "https://github.com/szcnick/p7zip"; description = "A new p7zip fork with additional codecs and improvements (forked from https://sourceforge.net/projects/p7zip/)"; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.raskin ]; + platforms = lib.platforms.unix; + maintainers = [ lib.maintainers.raskin ]; # RAR code is under non-free UnRAR license, but we remove it license = if enableUnfree then lib.licenses.unfree else lib.licenses.lgpl2Plus; }; |