nixpkgs/pkgs/tools/system/safe-rm/default.nix

38 lines
902 B
Nix
Raw Normal View History

{ lib, stdenv, fetchgit, perl, coreutils }:
2014-10-21 10:31:28 +00:00
stdenv.mkDerivation rec {
pname = "safe-rm";
2014-12-23 21:32:49 +00:00
version = "0.12";
2014-10-21 10:31:28 +00:00
src = fetchgit {
url = "https://git.launchpad.net/safe-rm";
rev = "refs/tags/${pname}-${version}";
sha256 = "0zkmwxyl1870ar6jr9h537vmqgkckqs9jd1yv6m4qqzdsmg5gdbq";
2014-10-21 10:31:28 +00:00
};
2021-03-05 03:19:30 +00:00
# pod2man
nativeBuildInputs = [ perl ];
propagatedBuildInputs = [ coreutils perl ];
2014-10-21 10:31:28 +00:00
postFixup = ''
sed -e 's@/bin/rm@${coreutils}/bin/rm@' -i $out/bin/safe-rm
'';
installPhase = ''
mkdir -p $out/bin
cp safe-rm $out/bin
mkdir -p $out/share/man/man1
pod2man safe-rm > $out/share/man/man1/safe-rm.1
'';
meta = with lib; {
2014-11-11 13:20:43 +00:00
description = "Tool intended to prevent the accidental deletion of important files";
homepage = "https://launchpad.net/safe-rm";
2014-10-21 10:31:28 +00:00
license = licenses.gpl3;
platforms = platforms.all;
maintainers = [ maintainers.koral ];
};
}