nixpkgs/pkgs/by-name/un/unp/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

45 lines
1.1 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 {
pname = "unp";
version = "2.0-pre9";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl ];
src = fetchurl {
url = "mirror://debian/pool/main/u/unp/unp_2.0~pre9.tar.xz";
sha256 = "1lp5vi9x1qi3b21nzv0yqqacj6p74qkl5zryzwq30rjkyvahjya1";
name = "unp_2.0_pre9.tar.xz";
};
dontConfigure = true;
dontBuild = 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 lib; {
description = "Command line tool for unpacking archives easily";
homepage = "https://packages.qa.debian.org/u/unp.html";
license = with licenses; [ gpl2Only ];
maintainers = [ maintainers.timor ];
platforms = platforms.all;
};
}