diff options
Diffstat (limited to 'pkgs/tools/archivers/p7zip')
-rw-r--r-- | pkgs/tools/archivers/p7zip/default.nix | 33 | ||||
-rwxr-xr-x | pkgs/tools/archivers/p7zip/update.sh | 2 |
2 files changed, 20 insertions, 15 deletions
diff --git a/pkgs/tools/archivers/p7zip/default.nix b/pkgs/tools/archivers/p7zip/default.nix index 43be673ca2c91..23ffdcc41a70c 100644 --- a/pkgs/tools/archivers/p7zip/default.nix +++ b/pkgs/tools/archivers/p7zip/default.nix @@ -1,16 +1,16 @@ -{ stdenv, fetchFromGitHub, fetchpatch, lib, enableUnfree ? false }: +{ lib, stdenv, fetchFromGitHub, enableUnfree ? false }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "p7zip"; - version = "17.04"; + version = "17.05"; src = fetchFromGitHub { - owner = "jinfeihan57"; - repo = pname; - rev = "v${version}"; + owner = "p7zip-project"; + repo = "p7zip"; + rev = "v${finalAttrs.version}"; sha256 = { - free = "sha256-DrBuf2VPdcprHI6pMSmL7psm2ofOrUf0Oj0qwMjXzkk="; - unfree = "sha256-19F4hPV0nKVuFZNbOcXrcA1uW6Y3HQolaHVIYXGmh18="; + free = "sha256-5r7M9BVcAryZNTkqJ/BfHnSSWov1PwoZhUnLBwEbJoA="; + unfree = "sha256-z3qXgv/TkNRbb85Ew1OcJNxoyssfzHShc0b0/4NZOb0="; }.${if enableUnfree then "unfree" else "free"}; # remove the unRAR related code from the src drv # > the license requires that you agree to these use restrictions, @@ -38,8 +38,6 @@ stdenv.mkDerivation rec { --replace 'CXX=g++' 'CXX=${stdenv.cc.targetPrefix}g++' ''; - makeFlags = [ "DEST_HOME=${placeholder "out"}" ]; - preConfigure = '' buildFlags=all3 '' + lib.optionalString stdenv.isDarwin '' @@ -47,15 +45,22 @@ stdenv.mkDerivation rec { ''; enableParallelBuilding = true; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; - setupHook = ./setup-hook.sh; + makeFlags = [ + "DEST_BIN=${placeholder "out"}/bin" + "DEST_SHARE=${placeholder "lib"}/lib/p7zip" + "DEST_MAN=${placeholder "man"}/share/man" + "DEST_SHARE_DOC=${placeholder "doc"}/share/doc/p7zip" + ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; + outputs = [ "out" "lib" "doc" "man" ]; + setupHook = ./setup-hook.sh; passthru.updateScript = ./update.sh; meta = with lib; { - homepage = "https://github.com/jinfeihan57/p7zip"; + homepage = "https://github.com/p7zip-project/p7zip"; description = "A new p7zip fork with additional codecs and improvements (forked from https://sourceforge.net/projects/p7zip/)"; license = with licenses; # p7zip code is largely lgpl2Plus @@ -68,4 +73,4 @@ stdenv.mkDerivation rec { platforms = platforms.unix; mainProgram = "7z"; }; -} +}) diff --git a/pkgs/tools/archivers/p7zip/update.sh b/pkgs/tools/archivers/p7zip/update.sh index 0d4b91e56e800..9ba67894b8067 100755 --- a/pkgs/tools/archivers/p7zip/update.sh +++ b/pkgs/tools/archivers/p7zip/update.sh @@ -7,7 +7,7 @@ DRV_DIR="$PWD" OLD_VERSION="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)" -NEW_VERSION="$(curl https://api.github.com/repos/jinfeihan57/p7zip/releases/latest | jq .tag_name -r | tr -d 'v')" +NEW_VERSION="$(curl https://api.github.com/repos/p7zip-project/p7zip/releases/latest | jq .tag_name -r | tr -d 'v')" echo "comparing versions $OLD_VERSION => $NEW_VERSION" if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then |