diff options
author | xeji <36407913+xeji@users.noreply.github.com> | 2018-05-22 02:52:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-22 02:52:09 +0200 |
commit | b72a8a41c3cace61194b143a8241f252cb37708a (patch) | |
tree | db2ce6f7d1b07306c3a184df5d19224d1215c4e5 /pkgs/tools | |
parent | 4f979105af5a4a840f6558998c023dcf7410a037 (diff) | |
parent | 47aceb0a7b4771e428bc0fe9bc109aa2641be223 (diff) | |
download | nixlib-b72a8a41c3cace61194b143a8241f252cb37708a.tar nixlib-b72a8a41c3cace61194b143a8241f252cb37708a.tar.gz nixlib-b72a8a41c3cace61194b143a8241f252cb37708a.tar.bz2 nixlib-b72a8a41c3cace61194b143a8241f252cb37708a.tar.lz nixlib-b72a8a41c3cace61194b143a8241f252cb37708a.tar.xz nixlib-b72a8a41c3cace61194b143a8241f252cb37708a.tar.zst nixlib-b72a8a41c3cace61194b143a8241f252cb37708a.zip |
Merge pull request #40725 from yurrriq/update/autojump
autojump: rework
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/misc/autojump/default.nix | 109 |
1 files changed, 49 insertions, 60 deletions
diff --git a/pkgs/tools/misc/autojump/default.nix b/pkgs/tools/misc/autojump/default.nix index 4d3376108b7e..5f86dbadfa36 100644 --- a/pkgs/tools/misc/autojump/default.nix +++ b/pkgs/tools/misc/autojump/default.nix @@ -1,64 +1,53 @@ -{ fetchurl, stdenv, python, bash }: +{ stdenv, fetchFromGitHub, python, bash }: -let +stdenv.mkDerivation rec { + name = "autojump-${version}"; version = "22.5.1"; -in - stdenv.mkDerivation rec { - name = "autojump-${version}"; - src = fetchurl { - url = "http://github.com/joelthelion/autojump/archive/release-v${version}.tar.gz"; - name = "autojump-${version}.tar.gz"; - sha256 = "17z9j9936x0nizwrzf664bngh60x5qbvrrf1s5qdzd0f2gdanpvn"; - }; - - buildInputs = [ python bash ]; - dontBuild = true; - - installPhase = '' - python ./install.py -d $out -p "" - chmod +x $out/etc/profile.d/* - - mkdir -p "$out/etc/bash_completion.d" - cp -v $out/share/autojump/autojump.bash "$out/etc/bash_completion.d" - - mkdir -p $out/share/fish/vendor_completions.d/ - cp -v $out/share/autojump/autojump.fish "$out/share/fish/vendor_completions.d/autojump.fish" - - cat <<SCRIPT > $out/bin/autojump-share - #!/bin/sh - # Run this script to find the autojump shared folder where all the shell - # integration scripts are living. - echo $out/share/autojump - SCRIPT - chmod +x $out/bin/autojump-share + src = fetchFromGitHub { + owner = "wting"; + repo = "autojump"; + rev = "release-v${version}"; + sha256 = "1l1278g3k1qfrz41pkpjdhsabassb9si2d1bfbcmvbv5h3wmlqk9"; + }; + + buildInputs = [ python bash ]; + dontBuild = true; + + installPhase = '' + python ./install.py -d "$out" -p "" -z "$out/share/zsh/site-functions/" + + chmod +x "$out/etc/profile.d/autojump.sh" + install -Dt "$out/share/bash-completion/completions/" -m444 "$out/share/autojump/autojump.bash" + install -Dt "$out/share/fish/vendor_conf.d/" -m444 "$out/share/autojump/autojump.fish" + install -Dt "$out/share/zsh/site-functions/" -m444 "$out/share/autojump/autojump.zsh" + ''; + + meta = with stdenv.lib; { + description = "A `cd' command that learns"; + longDescription = '' + One of the most used shell commands is “cd”. A quick survey + among my friends revealed that between 10 and 20% of all + commands they type are actually cd commands! Unfortunately, + jumping from one part of your system to another with cd + requires to enter almost the full path, which isn’t very + practical and requires a lot of keystrokes. + + Autojump is a faster way to navigate your filesystem. It + works by maintaining a database of the directories you use the + most from the command line. The jstat command shows you the + current contents of the database. You need to work a little + bit before the database becomes usable. Once your database + is reasonably complete, you can “jump” to a directory by + typing "j dirspec", where dirspec is a few characters of the + directory you want to jump to. It will jump to the most used + directory whose name matches the pattern given in dirspec. + + Autojump supports tab-completion. ''; - - meta = { - description = "A `cd' command that learns"; - longDescription = '' - One of the most used shell commands is “cd”. A quick survey - among my friends revealed that between 10 and 20% of all - commands they type are actually cd commands! Unfortunately, - jumping from one part of your system to another with cd - requires to enter almost the full path, which isn’t very - practical and requires a lot of keystrokes. - - Autojump is a faster way to navigate your filesystem. It - works by maintaining a database of the directories you use the - most from the command line. The jstat command shows you the - current contents of the database. You need to work a little - bit before the database becomes usable. Once your database - is reasonably complete, you can “jump” to a directory by - typing "j dirspec", where dirspec is a few characters of the - directory you want to jump to. It will jump to the most used - directory whose name matches the pattern given in dirspec. - - Autojump supports tab-completion. - ''; - homepage = http://wiki.github.com/joelthelion/autojump; - license = stdenv.lib.licenses.gpl3; - platforms = stdenv.lib.platforms.all; - maintainers = [ stdenv.lib.maintainers.domenkozar ]; - }; - } + homepage = http://wiki.github.com/wting/autojump; + license = licenses.gpl3; + platforms = platforms.all; + maintainers = with maintainers; [ domenkozar yurrriq ]; + }; +} |