nixpkgs/pkgs/tools/misc/rmtrash/default.nix

38 lines
1.0 KiB
Nix
Raw Normal View History

2021-03-22 08:47:11 +00:00
{ lib, stdenvNoCC, fetchFromGitHub, makeWrapper
2020-03-21 07:07:36 +00:00
, trash-cli, coreutils, which, getopt }:
2021-03-22 08:47:11 +00:00
stdenvNoCC.mkDerivation rec {
2020-03-21 07:07:36 +00:00
pname = "rmtrash";
2020-12-01 07:23:28 +00:00
version = "1.14";
2020-03-21 07:07:36 +00:00
src = fetchFromGitHub {
owner = "PhrozenByte";
repo = pname;
rev = "v${version}";
2020-12-01 07:23:28 +00:00
sha256 = "0wfb2ykzlsxyqn9krfsis9jxhaxy3pxl71a4f15an1ngfndai694";
2020-03-21 07:07:36 +00:00
};
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 ];
2021-03-22 08:47:11 +00:00
platforms = platforms.all;
2020-03-21 07:07:36 +00:00
};
}