summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/programs/bash/bash.nix2
-rw-r--r--pkgs/shells/bash-completion/bash-4.3.patch22
-rw-r--r--pkgs/shells/bash-completion/default.nix25
-rw-r--r--pkgs/tools/audio/beets/default.nix4
-rw-r--r--pkgs/tools/misc/colord/default.nix4
-rw-r--r--pkgs/tools/package-management/createrepo_c/default.nix4
-rw-r--r--pkgs/tools/package-management/packagekit/default.nix4
-rw-r--r--pkgs/top-level/aliases.nix1
-rw-r--r--pkgs/top-level/all-packages.nix2
9 files changed, 20 insertions, 48 deletions
diff --git a/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix
index c09bcfb70e24..e23849d350b4 100644
--- a/nixos/modules/programs/bash/bash.nix
+++ b/nixos/modules/programs/bash/bash.nix
@@ -16,7 +16,7 @@ let
     # programmable completion. If we do, enable all modules installed in
     # the system (and user profile).
     if shopt -q progcomp &>/dev/null; then
-      . "${pkgs.bashCompletion}/etc/profile.d/bash_completion.sh"
+      . "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
       nullglobStatus=$(shopt -p nullglob)
       shopt -s nullglob
       for p in $NIX_PROFILES; do
diff --git a/pkgs/shells/bash-completion/bash-4.3.patch b/pkgs/shells/bash-completion/bash-4.3.patch
deleted file mode 100644
index e893b501d311..000000000000
--- a/pkgs/shells/bash-completion/bash-4.3.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-commit a9c556ccad819869a6a5d932aac0a75a99372f08
-Author: Barry Warsaw <barry@python.org>
-Date:   Wed Sep 17 19:32:43 2014 +0300
-
-    _init_completion: Handle cword < 0 (LP: #1289597)
-    
-    Previously only bash 4.3 seemed to provoke this, but now with the
-    empty command consistency tweak it occurs with earlier as well.
-
-diff --git a/bash_completion b/bash_completion
-index 7e01ae4..3bb4bc2 100644
---- a/bash_completion
-+++ b/bash_completion
-@@ -727,7 +727,7 @@ _init_completion()
-         fi
-     done
- 
--    [[ $cword -eq 0 ]] && return 1
-+    [[ $cword -le 0 ]] && return 1
-     prev=${words[cword-1]}
- 
-     [[ ${split-} ]] && _split_longopt && split=true
diff --git a/pkgs/shells/bash-completion/default.nix b/pkgs/shells/bash-completion/default.nix
index 91d6b3335416..ad4cc3d09d71 100644
--- a/pkgs/shells/bash-completion/default.nix
+++ b/pkgs/shells/bash-completion/default.nix
@@ -1,28 +1,21 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "bash-completion-2.1";
+  name = "bash-completion-${version}";
+  version = "2.4";
 
   src = fetchurl {
-    url = "http://bash-completion.alioth.debian.org/files/${name}.tar.bz2";
-    sha256 = "0kxf8s5bw7y50x0ksb77d3kv0dwadixhybl818w27y6mlw26hq1b";
+    url = "https://github.com/scop/bash-completion/releases/download/${version}/${name}.tar.xz";
+    sha256 = "1xlhd09sb2w3bw8qaypxgkr0782w082mcbx8zf7yzjgy0996pxy0";
   };
 
-  patches = [ ./bash-4.3.patch ];
-
   doCheck = true;
 
-  # nmcli is included in the network-manager package
-  postInstall = ''
-    rm $out/share/bash-completion/completions/nmcli
-  '';
-
-  meta = {
-    homepage = "http://bash-completion.alioth.debian.org/";
+  meta = with stdenv.lib; {
+    homepage = https://github.com/scop/bash-completion;
     description = "Programmable completion for the bash shell";
-    license = "GPL";
-
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.peti ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.peti ];
   };
 }
diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix
index 283a6d48ca26..05d8bd0990f5 100644
--- a/pkgs/tools/audio/beets/default.nix
+++ b/pkgs/tools/audio/beets/default.nix
@@ -19,7 +19,7 @@
 , enableAlternatives   ? false
 , enableCopyArtifacts  ? false
 
-, bashInteractive, bashCompletion
+, bashInteractive, bash-completion
 }:
 
 assert enableAcoustid    -> pythonPackages.pyacoustid     != null;
@@ -70,7 +70,7 @@ let
   allEnabledPlugins = pluginsWithoutDeps ++ enabledOptionalPlugins;
 
   testShell = "${bashInteractive}/bin/bash --norc";
-  completion = "${bashCompletion}/share/bash-completion/bash_completion";
+  completion = "${bash-completion}/share/bash-completion/bash_completion";
 
 in pythonPackages.buildPythonApplication rec {
   name = "beets-${version}";
diff --git a/pkgs/tools/misc/colord/default.nix b/pkgs/tools/misc/colord/default.nix
index 7e6c3f30784e..6dc2c371e460 100644
--- a/pkgs/tools/misc/colord/default.nix
+++ b/pkgs/tools/misc/colord/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, fetchgit, bashCompletion
+{ stdenv, fetchzip, fetchgit, bash-completion
 , glib, polkit, pkgconfig, intltool, gusb, libusb1, lcms2, sqlite, systemd, dbus
 , automake, autoconf, libtool, gtk_doc, which, gobjectIntrospection, argyllcms
 , libgudev, sane-backends }:
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
   '';
 
   buildInputs = [ glib polkit pkgconfig intltool gusb libusb1 lcms2 sqlite systemd dbus gobjectIntrospection
-                  bashCompletion argyllcms automake autoconf libgudev sane-backends ];
+                  bash-completion argyllcms automake autoconf libgudev sane-backends ];
 
   postInstall = ''
     mkdir -p $out/etc/bash_completion.d
diff --git a/pkgs/tools/package-management/createrepo_c/default.nix b/pkgs/tools/package-management/createrepo_c/default.nix
index eed1ed1e5260..8d27dc8aef03 100644
--- a/pkgs/tools/package-management/createrepo_c/default.nix
+++ b/pkgs/tools/package-management/createrepo_c/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, pkgconfig, bzip2, expat, glib, curl, libxml2, python, rpm, openssl, sqlite, file, xz, pcre, bashCompletion }:
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, bzip2, expat, glib, curl, libxml2, python, rpm, openssl, sqlite, file, xz, pcre, bash-completion }:
 
 stdenv.mkDerivation rec {
   rev  = "0.10.0";
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
                 "set (PYTHON_INSTALL_DIR "$out/${python.sitePackages}")"
   '';
 
-  buildInputs = [ cmake pkgconfig bzip2 expat glib curl libxml2 python rpm openssl sqlite file xz pcre bashCompletion ];
+  buildInputs = [ cmake pkgconfig bzip2 expat glib curl libxml2 python rpm openssl sqlite file xz pcre bash-completion ];
 
   meta = with stdenv.lib; {
     description = "C implementation of createrepo";
diff --git a/pkgs/tools/package-management/packagekit/default.nix b/pkgs/tools/package-management/packagekit/default.nix
index af8a162357b6..68d13f7f17fa 100644
--- a/pkgs/tools/package-management/packagekit/default.nix
+++ b/pkgs/tools/package-management/packagekit/default.nix
@@ -3,7 +3,7 @@
 , gobjectIntrospection, vala_0_23, gtk_doc, autoreconfHook, autoconf-archive
 , nix, boost
 , enableCommandNotFound ? false
-, enableBashCompletion ? false, bashCompletion ? null }:
+, enableBashCompletion ? false, bash-completion ? null }:
 
 stdenv.mkDerivation rec {
   name = "packagekit-${version}";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ glib polkit systemd python gobjectIntrospection vala_0_23 ]
-                  ++ lib.optional enableBashCompletion bashCompletion;
+                  ++ lib.optional enableBashCompletion bash-completion;
   propagatedBuildInputs = [ sqlite nix boost ];
   nativeBuildInputs = [ intltool pkgconfig autoreconfHook autoconf-archive gtk_doc ];
 
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index cc09abc49b53..14c3e513d6c6 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -24,6 +24,7 @@ doNotDisplayTwice rec {
   asciidocFull = asciidoc-full;  # added 2014-06-22
   bar = lemonbar;  # added 2015-01-16
   bar-xft = lemonbar-xft;  # added 2015-01-16
+  bashCompletion = bash-completion; # Added 2016-09-28
   bridge_utils = bridge-utils;  # added 2015-02-20
   btrfsProgs = btrfs-progs; # added 2016-01-03
   bundler_HEAD = bundler; # added 2015-11-15
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 32561aa5fdb8..6f3b1ff94b83 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4337,7 +4337,7 @@ in
     interactive = true;
   });
 
-  bashCompletion = callPackage ../shells/bash-completion { };
+  bash-completion = callPackage ../shells/bash-completion { };
 
   dash = callPackage ../shells/dash { };