python312Packages.icontract: relax deps (#380554)
[NixPkgs.git] / pkgs / by-name / de / debian-goodies / package.nix
blobd6857bfa18281f2d1c50140cf64a491e56e61c44
2   lib,
3   stdenv,
4   fetchFromGitLab,
5   curl,
6   dialog,
7   installShellFiles,
8   perl,
9   python3,
12 stdenv.mkDerivation rec {
13   pname = "debian-goodies";
14   version = "0.88.2";
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   };
24   postPatch = ''
25     substituteInPlace debmany/debmany \
26       --replace "/usr/bin/dialog" "${dialog}/bin/dialog" \
27       --replace "/usr/bin/whiptail" "${python3.pkgs.snack}/bin/whiptail"
29     substituteInPlace dman \
30       --replace "curl" "${curl}/bin/curl"
31   '';
33   nativeBuildInputs = [
34     installShellFiles
35   ];
37   buildInputs = [
38     perl
39     python3
40   ];
42   installPhase = ''
43     runHook preInstall
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
50     install -Dm644 find-dbgsym-packages-templates/* -t $out/share/debian-goodies/find-dbgsym-packages-templates/
52     installShellCompletion --bash \
53       debmany/bash_completion/debmany \
54       debian/bash-completion
56     installManPage \
57       *.1 \
58       debmany/man/*.1 \
59       *.8
61     runHook postInstall
62   '';
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   };