diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-05-25 14:48:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 14:48:20 +0200 |
commit | aad98166602041da58dc2c48d78f6953f7252165 (patch) | |
tree | f964f61da2e9cf074f9b73e219f621cb99dffc55 /pkgs/tools/system | |
parent | 5c17c4857e02fb217822973a1853f047a9870bc5 (diff) | |
parent | 8cc310c77c9e122ef1a6f14b4d4ca31354c43a10 (diff) | |
download | nixlib-aad98166602041da58dc2c48d78f6953f7252165.tar nixlib-aad98166602041da58dc2c48d78f6953f7252165.tar.gz nixlib-aad98166602041da58dc2c48d78f6953f7252165.tar.bz2 nixlib-aad98166602041da58dc2c48d78f6953f7252165.tar.lz nixlib-aad98166602041da58dc2c48d78f6953f7252165.tar.xz nixlib-aad98166602041da58dc2c48d78f6953f7252165.tar.zst nixlib-aad98166602041da58dc2c48d78f6953f7252165.zip |
Merge pull request #124194 from SuperSandro2000/safe-rm
safe-rm: 0.12 -> 1.1.0
Diffstat (limited to 'pkgs/tools/system')
-rw-r--r-- | pkgs/tools/system/safe-rm/default.nix | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/pkgs/tools/system/safe-rm/default.nix b/pkgs/tools/system/safe-rm/default.nix index c81eea889023..bac9bb356024 100644 --- a/pkgs/tools/system/safe-rm/default.nix +++ b/pkgs/tools/system/safe-rm/default.nix @@ -1,37 +1,36 @@ -{ lib, stdenv, fetchgit, perl, coreutils }: +{ lib, rustPlatform, fetchgit, coreutils, installShellFiles }: -stdenv.mkDerivation rec { +rustPlatform.buildRustPackage rec { pname = "safe-rm"; - version = "0.12"; + version = "1.1.0"; src = fetchgit { url = "https://git.launchpad.net/safe-rm"; rev = "refs/tags/${pname}-${version}"; - sha256 = "0zkmwxyl1870ar6jr9h537vmqgkckqs9jd1yv6m4qqzdsmg5gdbq"; + sha256 = "sha256-7+4XwsjzLBCQmHDYNwhlN4Yg3eL43GUEbq8ROtuP2Kw="; }; - # pod2man - nativeBuildInputs = [ perl ]; + cargoSha256 = "sha256-durb4RTzEun7HPeYfvDJpvO+6L7tNFmAxdIwINbwZrg="; - propagatedBuildInputs = [ coreutils perl ]; - - postFixup = '' - sed -e 's@/bin/rm@${coreutils}/bin/rm@' -i $out/bin/safe-rm + postPatch = '' + substituteInPlace src/main.rs \ + --replace "/bin/rm" "${coreutils}/bin/rm" ''; - installPhase = '' - mkdir -p $out/bin - cp safe-rm $out/bin + nativeBuildInputs = [ installShellFiles ]; + + # uses lots of absolute paths outside of the sandbox + doCheck = false; - mkdir -p $out/share/man/man1 - pod2man safe-rm > $out/share/man/man1/safe-rm.1 + postInstall = '' + installManPage safe-rm.1 ''; meta = with lib; { description = "Tool intended to prevent the accidental deletion of important files"; homepage = "https://launchpad.net/safe-rm"; - license = licenses.gpl3; + license = licenses.gpl3Plus; platforms = platforms.all; - maintainers = [ maintainers.koral ]; + maintainers = with maintainers; [ SuperSandro2000 ]; }; } |