2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper, perl, unrar, unzip, gzip, file, extraBackends ? [] }:
|
2018-03-08 14:30:14 +01:00
|
|
|
|
2019-06-21 20:29:16 +02:00
|
|
|
let
|
|
|
|
runtime_bins = [ file unrar unzip gzip ] ++ extraBackends;
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2018-03-08 14:30:14 +01:00
|
|
|
name = "unp-${version}";
|
|
|
|
version = "2.0-pre7";
|
2019-06-21 20:29:16 +02:00
|
|
|
buildInputs = [ perl makeWrapper ];
|
2018-03-08 14:30:14 +01: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";
|
|
|
|
};
|
|
|
|
|
|
|
|
configurePhase = "true";
|
|
|
|
buildPhase = "true";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2019-06-21 20:29:16 +02: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 14:30:14 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/unp \
|
|
|
|
--prefix PATH : ${lib.makeBinPath runtime_bins}
|
|
|
|
wrapProgram $out/bin/ucat \
|
|
|
|
--prefix PATH : ${lib.makeBinPath runtime_bins}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Command line tool for unpacking archives easily";
|
|
|
|
homepage = https://packages.qa.debian.org/u/unp.html;
|
|
|
|
license = with licenses; [ gpl2 ];
|
|
|
|
maintainers = [ maintainers.timor ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|