nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 curl,
6 dialog,
7 installShellFiles,
8 perl,
9 python3,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "debian-goodies";
14 version = "0.88.2";
15
16 src = fetchFromGitLab {
17 domain = "salsa.debian.org";
18 owner = "debian";
19 repo = "debian-goodies";
20 rev = "debian/${version}";
21 sha256 = "sha256-KPPRxYmCEYwlUAR29tc8w4rerXpswO/rbpEjXPoDV4Q=";
22 };
23
24 postPatch = ''
25 substituteInPlace debmany/debmany \
26 --replace "/usr/bin/dialog" "${dialog}/bin/dialog" \
27 --replace "/usr/bin/whiptail" "${python3.pkgs.snack}/bin/whiptail"
28
29 substituteInPlace dman \
30 --replace "curl" "${curl}/bin/curl"
31 '';
32
33 nativeBuildInputs = [
34 installShellFiles
35 ];
36
37 buildInputs = [
38 perl
39 python3
40 ];
41
42 installPhase = ''
43 runHook preInstall
44
45 # see https://salsa.debian.org/debian/debian-goodies/-/blob/master/debian/install
46 for bin in checkrestart dgrep dglob debget dpigs debman dman popbugs which-pkg-broke which-pkg-broke-build dhomepage debmany/debmany check-enhancements find-dbgsym-packages; do
47 install -Dm755 $bin -t $out/bin
48 done
49
50 install -Dm644 find-dbgsym-packages-templates/* -t $out/share/debian-goodies/find-dbgsym-packages-templates/
51
52 installShellCompletion --bash \
53 debmany/bash_completion/debmany \
54 debian/bash-completion
55
56 installManPage \
57 *.1 \
58 debmany/man/*.1 \
59 *.8
60
61 runHook postInstall
62 '';
63
64 meta = with lib; {
65 description = "Small toolbox-style utilities for Debian systems";
66 homepage = "https://salsa.debian.org/debian/debian-goodies";
67 license = licenses.gpl2Plus;
68 platforms = platforms.unix;
69 maintainers = with maintainers; [ SuperSandro2000 ];
70 };
71}