3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/autojump/default.nix

56 lines
2 KiB
Nix
Raw Normal View History

{ fetchurl, stdenv, python, bash }:
let
2015-03-04 16:14:49 +00:00
version = "22.2.4";
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";
2015-03-04 16:14:49 +00:00
sha256 = "816badb0721f735e2b86bdfa8b333112f3867343c7c2263c569f75b4ec91f475";
};
2013-05-05 15:24:16 +01:00
buildInputs = [ python bash ];
dontBuild = true;
installPhase = ''
2015-03-04 16:14:49 +00:00
python ./install.py -d $out -p ""
2013-09-26 00:17:31 +01:00
chmod +x $out/etc/profile.d/*
mkdir -p "$out/etc/bash_completion.d"
2015-03-04 16:14:49 +00:00
cp -v $out/share/autojump/autojump.bash "$out/etc/bash_completion.d"
# FIXME: What's the right place for `autojump.zsh'?
'';
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 isnt 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;
2013-05-05 11:46:23 +01:00
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.all;
maintainers = [ stdenv.lib.maintainers.iElectric ];
};
}