git.iko.soy/typeable/nixpkgs
on master help sign in
nixpkgs: add tarsnap shell completion utils

Signed-off-by: Austin Seipp <aseipp@pobox.com>

commit2c933ad3db8bd168709a967c27cfa5c3457a9006 authorAustin Seipp <aseipp@pobox.com> dateMon 17 Aug 2015, 22:00 (11 years ago) parentcec55d6
1 file changed+18
pkgs/tools/backup/tarsnap/default.nix+18
pkgs/tools/backup/tarsnap/default.nix+18
@@ -1,5 +1,16 @@
11{ stdenv, fetchurl, openssl, zlib, e2fsprogs }:
22
3+let
4+ bashCompletion = fetchurl {
5+ url = "https://gist.githubusercontent.com/thoughtpolice/daa9431044883d3896f6/raw/282360677007db9739e5bf229873d3b231eb303a/tarsnap.bash";
6+ sha256 = "1cj7m0n3sw9vlaz2dfvf0bgaxkv1pcc0l31zb4h5rmm8z6d33405";
7+ };
8+
9+ zshCompletion = fetchurl {
10+ url = "https://gist.githubusercontent.com/thoughtpolice/daa9431044883d3896f6/raw/282360677007db9739e5bf229873d3b231eb303a/tarsnap.zsh";
11+ sha256 = "0pawqwichzpz29rva7mh8lpx4zznnrh2rqyzzj6h7z98l0dxpair";
12+ };
13+in
314stdenv.mkDerivation rec {
415 name = "tarsnap-${version}";
516 version = "1.0.35";
@@ -9,6 +20,13 @@ stdenv.mkDerivation rec {
920 sha256 = "16lc14rwrq84fz95j1g10vv0qki0qw73lzighidj5g23pib6g7vc";
1021 };
1122
23+ postInstall = ''
24+ # Install some handy-dandy shell completions
25+ mkdir -p $out/etc/bash_completion.d $out/share/zsh/site-functions
26+ cp ${bashCompletion} $out/etc/bash_completion.d/tarsnap.bash
27+ cp ${zshCompletion} $out/share/zsh/site-functions/_tarsnap
28+ '';
29+
1230 buildInputs = [ openssl zlib e2fsprogs ];
1331
1432 meta = {