nixpkgs/pkgs/tools/archivers/unp/default.nix
Profpatsch 7251830bf1 unp: remove unfree unrar from the default backend list
`unrar` is unfree, meaning `unp` cannot be built by default if `unrar`
is in its dependencies.

A simple

  env NIXPKGS_ALLOW_UNFREE=1 nix-shell -p unrar

will make `unp` work with .rar files.
2019-06-24 16:18:23 +02:00

45 lines
1.2 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ stdenv, lib, fetchurl, makeWrapper, perl
, unzip, gzip, file
# extractors which are added to unps PATH
, extraBackends ? []
}:
let
runtime_bins = [ file unzip gzip ] ++ extraBackends;
in stdenv.mkDerivation rec {
name = "unp-${version}";
version = "2.0-pre7";
buildInputs = [ perl makeWrapper ];
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
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}
'';
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;
};
}