From 576b229fccc55a8e410725da7aaf7f7f5a4e803d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 17 Apr 2022 23:30:00 +0200 Subject: [PATCH] debian-goodies: init at 0.87 --- .../misc/debian-goodies/default.nix | 70 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 72 insertions(+) create mode 100644 pkgs/applications/misc/debian-goodies/default.nix diff --git a/pkgs/applications/misc/debian-goodies/default.nix b/pkgs/applications/misc/debian-goodies/default.nix new file mode 100644 index 000000000000..20d47e204f7c --- /dev/null +++ b/pkgs/applications/misc/debian-goodies/default.nix @@ -0,0 +1,70 @@ +{ lib +, stdenv +, fetchFromGitLab +, curl +, dialog +, installShellFiles +, perl +, python3 +}: + +stdenv.mkDerivation rec { + pname = "debian-goodies"; + version = "0.87"; + + src = fetchFromGitLab { + domain = "salsa.debian.org"; + owner = "debian"; + repo = "debian-goodies"; + rev = "debian/${version}"; + sha256 = "sha256-7O2AY7tWYiOIy4ImFBxWu6S+ljc3VmqS/j4KyEzVVIA="; + }; + + postPatch = '' + substituteInPlace debmany/debmany \ + --replace "/usr/bin/dialog" "${dialog}/bin/dialog" \ + --replace "/usr/bin/whiptail" "${python3.pkgs.snack}/bin/whiptail" + + substituteInPlace dman \ + --replace "curl" "${curl}/bin/curl" + ''; + + nativeBuildInputs = [ + installShellFiles + ]; + + buildInputs = [ + perl + python3 + ]; + + installPhase = '' + runHook preInstall + + # see https://salsa.debian.org/debian/debian-goodies/-/blob/master/debian/install + 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 + install -Dm755 $bin -t $out/bin + done + + install -Dm644 find-dbgsym-packages-templates/* -t $out/share/debian-goodies/find-dbgsym-packages-templates/ + + installShellCompletion --bash \ + debmany/bash_completion/debmany \ + debian/bash-completion + + installManPage \ + *.1 \ + debmany/man/*.1 \ + *.8 + + runHook postInstall + ''; + + meta = with lib; { + description = "Small toolbox-style utilities for Debian systems"; + homepage = "https://salsa.debian.org/debian/debian-goodies"; + license = licenses.gpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7d3d71538c88..c3004e17d5b7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4737,6 +4737,8 @@ with pkgs; debian-devscripts = callPackage ../tools/misc/debian-devscripts { }; + debian-goodies = callPackage ../applications/misc/debian-goodies { }; + debootstrap = callPackage ../tools/misc/debootstrap { }; debugedit = callPackage ../development/tools/misc/debugedit { };