2021-01-11 10:54:33 +03:00
|
|
|
{ lib, stdenv, fetchgit, perl, coreutils }:
|
2014-10-21 14:31:28 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "safe-rm";
|
2014-12-24 00:32:49 +03:00
|
|
|
version = "0.12";
|
2014-10-21 14:31:28 +04:00
|
|
|
|
|
|
|
src = fetchgit {
|
2020-10-22 17:48:32 +03:00
|
|
|
url = "https://git.launchpad.net/safe-rm";
|
2019-08-15 15:41:18 +03:00
|
|
|
rev = "refs/tags/${pname}-${version}";
|
2016-06-02 14:26:44 +03:00
|
|
|
sha256 = "0zkmwxyl1870ar6jr9h537vmqgkckqs9jd1yv6m4qqzdsmg5gdbq";
|
2014-10-21 14:31:28 +04:00
|
|
|
};
|
|
|
|
|
2021-03-05 06:19:30 +03:00
|
|
|
# pod2man
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ coreutils perl ];
|
2014-10-21 14:31:28 +04: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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2014-11-11 16:20:43 +03:00
|
|
|
description = "Tool intended to prevent the accidental deletion of important files";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://launchpad.net/safe-rm";
|
2014-10-21 14:31:28 +04:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.koral ];
|
|
|
|
};
|
|
|
|
}
|