tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
just: make new bash completion test work from build
László Vaskó
2 years ago
8d548d61
21ea0e48
+29
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
ju
just
fix-just-path-in-tests.patch
package.nix
+20
pkgs/by-name/ju/just/fix-just-path-in-tests.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
diff --git a/tests/completions/just.bash b/tests/completions/just.bash
2
+
index 6d5c12c..13bff87 100755
3
+
--- a/tests/completions/just.bash
4
+
+++ b/tests/completions/just.bash
5
+
@@ -17,11 +17,13 @@ reply_equals() {
6
+
fi
7
+
}
8
+
9
+
+just() {
10
+
+ cargo run -- "$@"
11
+
+}
12
+
+
13
+
# --- Initial Setup ---
14
+
source "$1"
15
+
cd tests/completions
16
+
-cargo build
17
+
-PATH="$(git rev-parse --show-toplevel)/target/debug:$PATH"
18
+
exit_code=0
19
+
20
+
# --- Tests ---
+9
pkgs/by-name/ju/just/package.nix
···
2
, stdenv
3
, fetchFromGitHub
4
, rustPlatform
0
5
, coreutils
6
, installShellFiles
7
, libiconv
···
42
43
# Return unchanged string.rs
44
cp $TMPDIR/string.rs tests/string.rs
0
0
0
0
45
'';
0
0
0
0
46
47
postBuild = ''
48
cargo run --package generate-book
···
2
, stdenv
3
, fetchFromGitHub
4
, rustPlatform
5
+
, bashInteractive
6
, coreutils
7
, installShellFiles
8
, libiconv
···
43
44
# Return unchanged string.rs
45
cp $TMPDIR/string.rs tests/string.rs
46
+
47
+
# For shell completion tests
48
+
export PATH=${bashInteractive}/bin:$PATH
49
+
patchShebangs tests
50
'';
51
+
52
+
patches = [
53
+
./fix-just-path-in-tests.patch
54
+
];
55
56
postBuild = ''
57
cargo run --package generate-book