about summary refs log tree commit diff
path: root/pkgs/tools/misc/autojump/default.nix
diff options
context:
space:
mode:
authorDomen Kozar <domen@dev.si>2013-05-05 11:06:05 +0200
committerDomen Kozar <domen@dev.si>2013-05-05 11:06:13 +0200
commit8aabef687506a637f12626cc33ba7f7e56870a10 (patch)
treeb1f4251f9fdd9be3c0095392e73751d90c6ae3e5 /pkgs/tools/misc/autojump/default.nix
parent99864573312de6143f5e368c7e8a4e8b0d07291b (diff)
downloadnixlib-8aabef687506a637f12626cc33ba7f7e56870a10.tar
nixlib-8aabef687506a637f12626cc33ba7f7e56870a10.tar.gz
nixlib-8aabef687506a637f12626cc33ba7f7e56870a10.tar.bz2
nixlib-8aabef687506a637f12626cc33ba7f7e56870a10.tar.lz
nixlib-8aabef687506a637f12626cc33ba7f7e56870a10.tar.xz
nixlib-8aabef687506a637f12626cc33ba7f7e56870a10.tar.zst
nixlib-8aabef687506a637f12626cc33ba7f7e56870a10.zip
autojump: bump and reogranize a bit, not functional yet
Diffstat (limited to 'pkgs/tools/misc/autojump/default.nix')
-rw-r--r--pkgs/tools/misc/autojump/default.nix36
1 files changed, 14 insertions, 22 deletions
diff --git a/pkgs/tools/misc/autojump/default.nix b/pkgs/tools/misc/autojump/default.nix
index 397e80a745ec..2eb453142002 100644
--- a/pkgs/tools/misc/autojump/default.nix
+++ b/pkgs/tools/misc/autojump/default.nix
@@ -1,41 +1,33 @@
-{ fetchurl, stdenv, python }:
+{ fetchurl, stdenv, python, bash }:
 
-let version = "4"; in
+let 
+  version = "21.5.8";
+in
   stdenv.mkDerivation rec {
     name = "autojump-${version}";
 
     src = fetchurl {
-      url = "http://github.com/joelthelion/autojump/tarball/release-v4";
+      url = "http://github.com/joelthelion/autojump/archive/release-v${version}.tar.gz";
       name = "autojump-${version}.tar.gz";
-      sha256 = "06hjkdmfhawi6xksangymf9z85ql8d7q0vlcmgsw45vxq7iq1fnp";
+      sha256 = "07jf5pa9xwmbswsc0h6law9f5qwczsj25w7h034s379imid5h62f";
     };
 
-    # FIXME: Appears to be broken with Bash 4.0:
-    # http://wiki.github.com/joelthelion/autojump/doesnt-seem-to-be-working-with-bash-40 .
-
-    patchPhase = ''
-      sed -i "install.sh" \
-          -e "s,/usr/,$out/,g ; s,/etc/,/nowhere/,g ; s,sudo,,g"
-    '';
-
     buildInputs = [ python ];
+    dontBuild = true;
 
     installPhase = ''
-      mkdir -p "$out/bin" "$out/share/man/man1"
-      yes no | sh ./install.sh
+      bash ./install.sh -d $out
 
       mkdir -p "$out/etc/bash_completion.d"
-      cp -v autojump.bash "$out/etc/bash_completion.d"
-
-      echo "Bash users: Make sure to source \`$out/etc/bash_completion.d/autojump.bash'"
-      echo "to get the \`j' and \`jumpstat' commands."
+      cp -v $out/etc/profile.d/autojump.bash "$out/etc/bash_completion.d"
+      mkdir -p $out/bin
+      ln -s $out/usr/local/bin/autojump $out/bin/j
 
       # FIXME: What's the right place for `autojump.zsh'?
     '';
 
     meta = {
       description = "Autojump, 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
@@ -56,9 +48,9 @@ let version = "4"; in
 
         Autojump supports tab-completion.
       '';
-
       homepage = http://wiki.github.com/joelthelion/autojump;
-
-      license = "GPLv3+";
+      license = stdenv.lib.license.gpl3;
+      platforms = stdenv.lib.platforms.all;
+      maintainers = [ stdenv.lib.maintainers.iElectric ];
     };
   }