safe-rm: 0.12 -> 1.1.0
This commit is contained in:
parent
0caf9eb085
commit
8cc310c77c
|
@ -1,37 +1,36 @@
|
||||||
{ lib, stdenv, fetchgit, perl, coreutils }:
|
{ lib, rustPlatform, fetchgit, coreutils, installShellFiles }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "safe-rm";
|
pname = "safe-rm";
|
||||||
version = "0.12";
|
version = "1.1.0";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://git.launchpad.net/safe-rm";
|
url = "https://git.launchpad.net/safe-rm";
|
||||||
rev = "refs/tags/${pname}-${version}";
|
rev = "refs/tags/${pname}-${version}";
|
||||||
sha256 = "0zkmwxyl1870ar6jr9h537vmqgkckqs9jd1yv6m4qqzdsmg5gdbq";
|
sha256 = "sha256-7+4XwsjzLBCQmHDYNwhlN4Yg3eL43GUEbq8ROtuP2Kw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# pod2man
|
cargoSha256 = "sha256-durb4RTzEun7HPeYfvDJpvO+6L7tNFmAxdIwINbwZrg=";
|
||||||
nativeBuildInputs = [ perl ];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ coreutils perl ];
|
postPatch = ''
|
||||||
|
substituteInPlace src/main.rs \
|
||||||
postFixup = ''
|
--replace "/bin/rm" "${coreutils}/bin/rm"
|
||||||
sed -e 's@/bin/rm@${coreutils}/bin/rm@' -i $out/bin/safe-rm
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
mkdir -p $out/bin
|
|
||||||
cp safe-rm $out/bin
|
|
||||||
|
|
||||||
mkdir -p $out/share/man/man1
|
# uses lots of absolute paths outside of the sandbox
|
||||||
pod2man safe-rm > $out/share/man/man1/safe-rm.1
|
doCheck = false;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
installManPage safe-rm.1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Tool intended to prevent the accidental deletion of important files";
|
description = "Tool intended to prevent the accidental deletion of important files";
|
||||||
homepage = "https://launchpad.net/safe-rm";
|
homepage = "https://launchpad.net/safe-rm";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = [ maintainers.koral ];
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue