mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
p7zip: 17.04 -> 17.05
* Moved back to p7zip-project release now it's being updated * prePatch was not being used due to no patches being present * Split outputs
This commit is contained in:
parent
3d57138bd9
commit
cf7cd6f151
@ -27,7 +27,7 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
rm 7z 7z.so
|
rm 7z 7z.so
|
||||||
ln -s ${p7zip}/bin/7z 7z
|
ln -s ${p7zip}/bin/7z 7z
|
||||||
ln -s ${p7zip}/lib/p7zip/7z.so 7z.so
|
ln -s ${lib.getLib p7zip}/lib/p7zip/7z.so 7z.so
|
||||||
|
|
||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
{ stdenv, fetchFromGitHub, fetchpatch, lib, enableUnfree ? false }:
|
{ lib, stdenv, fetchFromGitHub, enableUnfree ? false }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "p7zip";
|
pname = "p7zip";
|
||||||
version = "17.04";
|
version = "17.05";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jinfeihan57";
|
owner = "p7zip-project";
|
||||||
repo = pname;
|
repo = "p7zip";
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
sha256 = {
|
sha256 = {
|
||||||
free = "sha256-DrBuf2VPdcprHI6pMSmL7psm2ofOrUf0Oj0qwMjXzkk=";
|
free = "sha256-5r7M9BVcAryZNTkqJ/BfHnSSWov1PwoZhUnLBwEbJoA=";
|
||||||
unfree = "sha256-19F4hPV0nKVuFZNbOcXrcA1uW6Y3HQolaHVIYXGmh18=";
|
unfree = "sha256-z3qXgv/TkNRbb85Ew1OcJNxoyssfzHShc0b0/4NZOb0=";
|
||||||
}.${if enableUnfree then "unfree" else "free"};
|
}.${if enableUnfree then "unfree" else "free"};
|
||||||
# remove the unRAR related code from the src drv
|
# remove the unRAR related code from the src drv
|
||||||
# > the license requires that you agree to these use restrictions,
|
# > 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++'
|
--replace 'CXX=g++' 'CXX=${stdenv.cc.targetPrefix}g++'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = [ "DEST_HOME=${placeholder "out"}" ];
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
buildFlags=all3
|
buildFlags=all3
|
||||||
'' + lib.optionalString stdenv.isDarwin ''
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
@ -47,15 +45,22 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
|
||||||
|
|
||||||
|
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"
|
||||||
|
];
|
||||||
|
|
||||||
|
outputs = [ "out" "lib" "doc" "man" ];
|
||||||
|
|
||||||
|
setupHook = ./setup-hook.sh;
|
||||||
passthru.updateScript = ./update.sh;
|
passthru.updateScript = ./update.sh;
|
||||||
|
|
||||||
meta = with lib; {
|
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/)";
|
description = "A new p7zip fork with additional codecs and improvements (forked from https://sourceforge.net/projects/p7zip/)";
|
||||||
license = with licenses;
|
license = with licenses;
|
||||||
# p7zip code is largely lgpl2Plus
|
# p7zip code is largely lgpl2Plus
|
||||||
@ -68,4 +73,4 @@ stdenv.mkDerivation rec {
|
|||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
mainProgram = "7z";
|
mainProgram = "7z";
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
@ -7,7 +7,7 @@ DRV_DIR="$PWD"
|
|||||||
|
|
||||||
OLD_VERSION="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
|
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"
|
echo "comparing versions $OLD_VERSION => $NEW_VERSION"
|
||||||
if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
|
if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user