mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 18:03:04 +00:00
Merge pull request #84485 from xfix/bash-completion-update
bash-completion: 2.9 -> 2.10
This commit is contained in:
commit
940c35568b
@ -65,7 +65,10 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
# Install bash-completions to correct prefix.
|
||||
# https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1194
|
||||
./fix-bash-completion.patch
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.gnome.org/GNOME/gnome-shell/commit/9f1ad5d86ddbabaa840eb2860279d53f4e635453.patch";
|
||||
sha256 = "f8MDFbfg9D7ORF84Ld9GIvf0xRCYuSszo3QLMji2VaE=";
|
||||
})
|
||||
|
||||
# Use absolute path for libshew installation to make our patched gobject-introspection
|
||||
# aware of the location to hardcode in the generated GIR file.
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- a/subprojects/extensions-tool/meson.build
|
||||
+++ a/subprojects/extensions-tool/meson.build
|
||||
@@ -39,6 +39,6 @@ subdir('src')
|
||||
|
||||
if bash_completion.found()
|
||||
install_data('completion/bash/gnome-extensions',
|
||||
- install_dir: bash_completion.get_pkgconfig_variable('completionsdir')
|
||||
+ install_dir: bash_completion.get_pkgconfig_variable('completionsdir', define_variable: ['prefix', prefix])
|
||||
)
|
||||
endif
|
@ -1,86 +0,0 @@
|
||||
From 398f44b4ed545fc1b6c13a057bf0900001f7958b Mon Sep 17 00:00:00 2001
|
||||
From: Frederik Rietdijk <fridh@fridh.nl>
|
||||
Date: Tue, 22 Oct 2019 15:07:05 +0200
|
||||
Subject: [PATCH] Revert "build: Do cmake, pc, and profile variable
|
||||
replacements in Makefile"
|
||||
|
||||
This reverts commit 81ba2c7e7dfbaefbafa1e8615727c9612e5fb314.
|
||||
---
|
||||
Makefile.am | 12 ++++++++----
|
||||
bash-completion-config.cmake.in | 4 ++--
|
||||
bash-completion.pc.in | 4 ++--
|
||||
configure.ac | 3 +++
|
||||
4 files changed, 15 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 8f441185..53979529 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -23,8 +23,7 @@ cmakeconfig_DATA = bash-completion-config.cmake \
|
||||
-e 's|@VERSION[@]|$(VERSION)|' \
|
||||
<$(srcdir)/$@.in >$@
|
||||
|
||||
-CLEANFILES = bash_completion.sh bash-completion.pc \
|
||||
- bash-completion-config.cmake bash-completion-config-version.cmake
|
||||
+CLEANFILES = bash_completion.sh bash-completion.pc
|
||||
|
||||
EXTRA_DIST = CHANGES $(pkgdata_DATA) bash_completion.sh.in .dir-locals.el \
|
||||
.editorconfig README.md CONTRIBUTING.md pyproject.toml .perltidyrc \
|
||||
@@ -34,6 +33,11 @@ EXTRA_DIST = CHANGES $(pkgdata_DATA) bash_completion.sh.in .dir-locals.el \
|
||||
install-data-hook:
|
||||
tmpfile=`mktemp $${TMPDIR:-/tmp}/bash_completion.XXXXXX` && \
|
||||
$(SED) -e 's|-/etc/bash_completion\.d|-$(compatdir)|' \
|
||||
- $(DESTDIR)$(pkgdatadir)/bash_completion >$$tmpfile && \
|
||||
- cat $$tmpfile >$(DESTDIR)$(pkgdatadir)/bash_completion && \
|
||||
+ $(DESTDIR)$(pkgdatadir)/bash_completion > $$tmpfile && \
|
||||
+ cat $$tmpfile > $(DESTDIR)$(pkgdatadir)/bash_completion && \
|
||||
+ $(SED) -e 's|\$${prefix}|$(prefix)|' \
|
||||
+ $(DESTDIR)$(datadir)/cmake/$(PACKAGE)/bash-completion-config.cmake \
|
||||
+ > $$tmpfile && \
|
||||
+ cat $$tmpfile > \
|
||||
+ $(DESTDIR)$(datadir)/cmake/$(PACKAGE)/bash-completion-config.cmake && \
|
||||
rm $$tmpfile
|
||||
diff --git a/bash-completion-config.cmake.in b/bash-completion-config.cmake.in
|
||||
index d907b76c..ccc6e052 100644
|
||||
--- a/bash-completion-config.cmake.in
|
||||
+++ b/bash-completion-config.cmake.in
|
||||
@@ -5,7 +5,7 @@ set (BASH_COMPLETION_VERSION "@VERSION@")
|
||||
|
||||
set (BASH_COMPLETION_PREFIX "@prefix@")
|
||||
set (BASH_COMPLETION_COMPATDIR "@compatdir@")
|
||||
-set (BASH_COMPLETION_COMPLETIONSDIR "@pkgdatadir@/completions")
|
||||
-set (BASH_COMPLETION_HELPERSDIR "@pkgdatadir@/helpers")
|
||||
+set (BASH_COMPLETION_COMPLETIONSDIR "@datarootdir@/@PACKAGE@/completions")
|
||||
+set (BASH_COMPLETION_HELPERSDIR "@datarootdir@/@PACKAGE@/helpers")
|
||||
|
||||
set (BASH_COMPLETION_FOUND "TRUE")
|
||||
diff --git a/bash-completion.pc.in b/bash-completion.pc.in
|
||||
index ea03fd75..bde217db 100644
|
||||
--- a/bash-completion.pc.in
|
||||
+++ b/bash-completion.pc.in
|
||||
@@ -1,7 +1,7 @@
|
||||
prefix=@prefix@
|
||||
compatdir=@compatdir@
|
||||
-completionsdir=@pkgdatadir@/completions
|
||||
-helpersdir=@pkgdatadir@/helpers
|
||||
+completionsdir=@datarootdir@/@PACKAGE@/completions
|
||||
+helpersdir=@datarootdir@/@PACKAGE@/helpers
|
||||
|
||||
Name: bash-completion
|
||||
Description: programmable completion for the bash shell
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1f3b37e8..a216d9b7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -13,5 +13,8 @@ helpers/Makefile
|
||||
test/Makefile
|
||||
test/t/Makefile
|
||||
test/t/unit/Makefile
|
||||
+bash-completion.pc
|
||||
+bash-completion-config.cmake
|
||||
+bash-completion-config-version.cmake
|
||||
])
|
||||
AC_OUTPUT
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,49 +1,58 @@
|
||||
{ stdenv, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, autoreconfHook
|
||||
, perl
|
||||
, ps
|
||||
, python3Packages
|
||||
, bashInteractive
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bash-completion";
|
||||
# TODO: Remove musl patch below upon next release!
|
||||
version = "2.9";
|
||||
version = "2.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "scop";
|
||||
repo = "bash-completion";
|
||||
rev = version;
|
||||
sha256 = "1813r4jxfa2zgzm2ppjhrq62flfmxai8433pklxcrl4fp5wwx9yv";
|
||||
sha256 = "047yjryy9d6hp18wkigbfrw9r0sm31inlsp8l28fhxg8ii032sgq";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
checkInputs = [
|
||||
# perl is assumed by perldoc completion
|
||||
perl
|
||||
# ps assumed to exist by gdb, killall, pgrep, pidof,
|
||||
# pkill, pwdx, renice, and reptyr completions
|
||||
ps
|
||||
python3Packages.pexpect
|
||||
python3Packages.pytest
|
||||
bashInteractive
|
||||
];
|
||||
|
||||
patches = [
|
||||
./0001-Revert-build-Do-cmake-pc-and-profile-variable-replac.patch
|
||||
# TODO: Remove when https://github.com/scop/bash-completion/commit/2cdac1b9f24df62a1fa80c1824ee8524c9b02393
|
||||
# is availabe in a release in nixpkgs. see https://github.com/scop/bash-completion/issues/312.
|
||||
# Fixes a test failure with musl.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/scop/bash-completion/commit/2cdac1b9f24df62a1fa80c1824ee8524c9b02393.patch";
|
||||
name = "bash-completion-musl-test_iconv-skip-option-completion-if-help-fails";
|
||||
sha256 = "1l53d62zf01k625nzw3vcrxky93h7bzdpchgk4argxalrn17ckvb";
|
||||
})
|
||||
];
|
||||
|
||||
# ignore ip_addresses because it tries to touch network
|
||||
# ignore test_ls because impure logic
|
||||
# - ignore test_gcc on ARM because it assumes -march=native
|
||||
# - ignore test_chsh because it assumes /etc/shells exists
|
||||
# - ignore test_ether_wake, test_ifdown, test_ifstat, test_ifup,
|
||||
# test_iperf, test_iperf3, test_nethogs and ip_addresses
|
||||
# because they try to touch network
|
||||
# - ignore test_ls because impure logic
|
||||
# - ignore test_screen because it assumes vt terminals exist
|
||||
checkPhase = ''
|
||||
pytest . \
|
||||
${stdenv.lib.optionalString (stdenv.hostPlatform.isAarch64) "--ignore=test/t/test_gcc.py"} \
|
||||
--ignore=test/t/test_chsh.py \
|
||||
--ignore=test/t/test_ether_wake.py \
|
||||
--ignore=test/t/test_ifdown.py \
|
||||
--ignore=test/t/test_ifstat.py \
|
||||
--ignore=test/t/test_ifup.py \
|
||||
--ignore=test/t/test_iperf.py \
|
||||
--ignore=test/t/test_iperf3.py \
|
||||
--ignore=test/t/test_nethogs.py \
|
||||
--ignore=test/t/unit/test_unit_ip_addresses.py \
|
||||
--ignore=test/t/test_ls.py
|
||||
--ignore=test/t/test_ls.py \
|
||||
--ignore=test/t/test_screen.py
|
||||
'';
|
||||
|
||||
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
@ -55,6 +64,6 @@ stdenv.mkDerivation rec {
|
||||
description = "Programmable completion for the bash shell";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.peti ];
|
||||
maintainers = [ maintainers.peti maintainers.xfix ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user