2020-04-24 23:36:52 +00:00
|
|
|
|
{ stdenv, lib, fetchurl, makeWrapper, perl
|
|
|
|
|
, unzip, gzip, file
|
|
|
|
|
# extractors which are added to unp’s PATH
|
|
|
|
|
, extraBackends ? []
|
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
runtime_bins = [ file unzip gzip ] ++ extraBackends;
|
|
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
|
pname = "unp";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
version = "2.0-pre9";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
buildInputs = [ perl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-09-18 10:52:07 +00:00
|
|
|
|
url = "mirror://debian/pool/main/u/unp/unp_2.0~pre9.tar.xz";
|
|
|
|
|
sha256 = "1lp5vi9x1qi3b21nzv0yqqacj6p74qkl5zryzwq30rjkyvahjya1";
|
|
|
|
|
name = "unp_2.0_pre9.tar.xz";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
buildPhase = "true";
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
|
install ./unp $out/bin/unp
|
|
|
|
|
install ./ucat $out/bin/ucat
|
|
|
|
|
cp debian/unp.1 $out/share/man/man1
|
|
|
|
|
|
|
|
|
|
wrapProgram $out/bin/unp \
|
|
|
|
|
--prefix PATH : ${lib.makeBinPath runtime_bins}
|
|
|
|
|
wrapProgram $out/bin/ucat \
|
|
|
|
|
--prefix PATH : ${lib.makeBinPath runtime_bins}
|
|
|
|
|
'';
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
description = "Command line tool for unpacking archives easily";
|
|
|
|
|
homepage = "https://packages.qa.debian.org/u/unp.html";
|
2024-05-15 15:35:15 +00:00
|
|
|
|
license = with licenses; [ gpl2Only ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
maintainers = [ maintainers.timor ];
|
|
|
|
|
platforms = platforms.all;
|
|
|
|
|
};
|
|
|
|
|
}
|