Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 52 lines 1.2 kB view raw
1{ 2 lib, 3 stdenvNoCC, 4 fetchFromGitHub, 5 makeWrapper, 6 trash-cli, 7 coreutils, 8 which, 9 getopt, 10}: 11 12stdenvNoCC.mkDerivation rec { 13 pname = "rmtrash"; 14 version = "1.15"; 15 16 src = fetchFromGitHub { 17 owner = "PhrozenByte"; 18 repo = "rmtrash"; 19 rev = "v${version}"; 20 sha256 = "sha256-vCtIM6jAYfrAOopiTcb4M5GNtucVnK0XEEKbMq1Cbc4="; 21 }; 22 23 nativeBuildInputs = [ makeWrapper ]; 24 25 installPhase = '' 26 for f in rm{,dir}trash; do 27 install -D ./$f $out/bin/$f 28 wrapProgram $out/bin/$f \ 29 --prefix PATH : ${ 30 lib.makeBinPath [ 31 trash-cli 32 coreutils 33 which 34 getopt 35 ] 36 } 37 done 38 ''; 39 40 meta = with lib; { 41 homepage = "https://github.com/PhrozenByte/rmtrash"; 42 description = "Trash-put made compatible with GNUs rm and rmdir"; 43 longDescription = '' 44 Put files (and directories) in trash using the `trash-put` command in a 45 way that is, otherwise as `trash-put` itself, compatible to GNUs `rm` 46 and `rmdir`. 47 ''; 48 license = licenses.gpl3Plus; 49 maintainers = with maintainers; [ peelz ]; 50 platforms = platforms.all; 51 }; 52}