3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/system/safe-rm/default.nix

35 lines
864 B
Nix
Raw Normal View History

2014-10-21 11:31:28 +01:00
{ stdenv, fetchgit, perl, coreutils }:
stdenv.mkDerivation rec {
name = "safe-rm-${version}";
2014-12-23 21:32:49 +00:00
version = "0.12";
2014-10-21 11:31:28 +01:00
src = fetchgit {
url = "https://gitorious.org/safe-rm/mainline.git";
rev = "refs/tags/${name}";
2014-12-23 21:32:49 +00:00
sha256 = "1n8ir96rwsg9r47lp3avl5sw548gvyh12zk5riflmmdvq907yi0s";
2014-10-21 11:31:28 +01:00
};
propagatedBuildInputs = [ perl coreutils ];
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 stdenv.lib; {
2014-11-11 13:20:43 +00:00
description = "Tool intended to prevent the accidental deletion of important files";
2014-10-21 11:31:28 +01:00
homepage = https://launchpad.net/safe-rm;
license = licenses.gpl3;
platforms = platforms.all;
maintainers = [ maintainers.koral ];
};
}