From c79b04a9a52a93c9160de302eb707376613137a7 Mon Sep 17 00:00:00 2001 From: peelz Date: Sat, 21 Mar 2020 03:07:36 -0400 Subject: [PATCH] rmtrash: init at 1.13 --- pkgs/tools/misc/rmtrash/default.nix | 39 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/tools/misc/rmtrash/default.nix diff --git a/pkgs/tools/misc/rmtrash/default.nix b/pkgs/tools/misc/rmtrash/default.nix new file mode 100644 index 00000000000..073871b0f43 --- /dev/null +++ b/pkgs/tools/misc/rmtrash/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchFromGitHub, makeWrapper +, trash-cli, coreutils, which, getopt }: + +stdenv.mkDerivation rec { + pname = "rmtrash"; + version = "1.13"; + + src = fetchFromGitHub { + owner = "PhrozenByte"; + repo = pname; + rev = "v${version}"; + sha256 = "04a9c65wnkq1fj8qhdsdbps88xjbp7rn6p27y25v47kaysvrw01j"; + }; + + dontConfigure = true; + dontBuild = true; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + for f in rm{,dir}trash; do + install -D ./$f $out/bin/$f + wrapProgram $out/bin/$f \ + --prefix PATH : ${lib.makeBinPath [ trash-cli coreutils which getopt ]} + done + ''; + + meta = with lib; { + homepage = "https://github.com/PhrozenByte/rmtrash"; + description = "trash-put made compatible with GNUs rm and rmdir"; + longDescription = '' + Put files (and directories) in trash using the `trash-put` command in a + way that is, otherwise as `trash-put` itself, compatible to GNUs `rm` + and `rmdir`. + ''; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ peelz ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25ed4da94c1..30bc0af360e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6369,6 +6369,8 @@ in rlwrap = callPackage ../tools/misc/rlwrap { }; + rmtrash = callPackage ../tools/misc/rmtrash { }; + rockbox_utility = libsForQt5.callPackage ../tools/misc/rockbox-utility { }; rosegarden = libsForQt5.callPackage ../applications/audio/rosegarden { };