2019-06-22 12:58:43 +01:00
|
|
|
|
{ stdenv, lib, fetchurl, makeWrapper, perl
|
|
|
|
|
, unzip, gzip, file
|
|
|
|
|
# extractors which are added to unp’s PATH
|
|
|
|
|
, extraBackends ? []
|
|
|
|
|
}:
|
2018-03-08 13:30:14 +00:00
|
|
|
|
|
2019-06-21 19:29:16 +01:00
|
|
|
|
let
|
2019-06-22 12:58:43 +01:00
|
|
|
|
runtime_bins = [ file unzip gzip ] ++ extraBackends;
|
2019-06-21 19:29:16 +01:00
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
|
in stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
|
pname = "unp";
|
2018-03-08 13:30:14 +00:00
|
|
|
|
version = "2.0-pre7";
|
2021-02-07 09:17:39 +00:00
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
buildInputs = [ perl ];
|
2018-03-08 13:30:14 +00:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
|
# url = "http://http.debian.net/debian/pool/main/u/unp/unp_2.0~pre7+nmu1.tar.bz2";
|
|
|
|
|
url = "mirror://debian/pool/main/u/unp/unp_2.0~pre7+nmu1.tar.bz2";
|
|
|
|
|
sha256 = "09w2sy7ivmylxf8blf0ywxicvb4pbl0xhrlbb3i9x9d56ll6ybbw";
|
|
|
|
|
name = "unp_2.0_pre7+nmu1.tar.bz2";
|
|
|
|
|
};
|
|
|
|
|
|
2019-06-19 16:36:06 +01:00
|
|
|
|
dontConfigure = true;
|
2018-03-08 13:30:14 +00:00
|
|
|
|
buildPhase = "true";
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/bin
|
2019-06-21 19:29:16 +01:00
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
|
install ./unp $out/bin/unp
|
|
|
|
|
install ./ucat $out/bin/ucat
|
|
|
|
|
cp debian/unp.1 $out/share/man/man1
|
2018-03-08 13:30:14 +00:00
|
|
|
|
|
|
|
|
|
wrapProgram $out/bin/unp \
|
|
|
|
|
--prefix PATH : ${lib.makeBinPath runtime_bins}
|
|
|
|
|
wrapProgram $out/bin/ucat \
|
|
|
|
|
--prefix PATH : ${lib.makeBinPath runtime_bins}
|
|
|
|
|
'';
|
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
|
meta = with lib; {
|
2018-03-08 13:30:14 +00:00
|
|
|
|
description = "Command line tool for unpacking archives easily";
|
2020-04-01 02:11:51 +01:00
|
|
|
|
homepage = "https://packages.qa.debian.org/u/unp.html";
|
2018-03-08 13:30:14 +00:00
|
|
|
|
license = with licenses; [ gpl2 ];
|
|
|
|
|
maintainers = [ maintainers.timor ];
|
|
|
|
|
platforms = platforms.all;
|
|
|
|
|
};
|
|
|
|
|
}
|