peazip: refactored to use finalAttrs syntax
This commit is contained in:
parent
b5413d1707
commit
5d86a99031
@ -15,17 +15,24 @@
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
let
|
||||
# peazip looks for the "7z", not "7zz"
|
||||
_7z = runCommand "7z" { } ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${_7zz}/bin/7zz $out/bin/7z
|
||||
'';
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "peazip";
|
||||
version = "10.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "peazip";
|
||||
repo = "peazip";
|
||||
rev = version;
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-oRgsT2j5P6jbaBAgLMGArJ+pCVSgC/CJcHM45mRw6Bs=";
|
||||
};
|
||||
sourceRoot = "${src.name}/peazip-sources";
|
||||
sourceRoot = "${finalAttrs.src.name}/peazip-sources";
|
||||
|
||||
postPatch = ''
|
||||
# set it to use compression programs from $PATH
|
||||
@ -48,7 +55,7 @@ stdenv.mkDerivation rec {
|
||||
libqtpas
|
||||
]);
|
||||
|
||||
NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath buildInputs}";
|
||||
env.NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath finalAttrs.buildInputs}";
|
||||
|
||||
buildPhase = ''
|
||||
pushd dev
|
||||
@ -58,12 +65,6 @@ stdenv.mkDerivation rec {
|
||||
popd
|
||||
'';
|
||||
|
||||
# peazip looks for the "7z", not "7zz"
|
||||
_7z = runCommand "7z" { } ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${_7zz}/bin/7zz $out/bin/7z
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
@ -122,4 +123,4 @@ stdenv.mkDerivation rec {
|
||||
maintainers = with lib.maintainers; [ annaaurora ];
|
||||
mainProgram = "peazip";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user