-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
racket: fix failure to find executable
Fix #377763.
- Loading branch information
Showing
3 changed files
with
59 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
pkgs/development/interpreters/racket/patches/force-cs-variant.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- old/collects/setup/variant.rkt | ||
+++ new/collects/setup/variant.rkt | ||
@@ -7,7 +7,8 @@ | ||
(provide variant-suffix | ||
script-variant?) | ||
|
||
-(define plain-variant | ||
+(define plain-variant 'cs) | ||
+#;(define plain-variant | ||
(delay/sync | ||
(cond | ||
[(cross-installation?) |
58 changes: 38 additions & 20 deletions
58
pkgs/development/interpreters/racket/tests/get-version-and-variant.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,45 @@ | ||
{ runCommandLocal, racket }: | ||
{ | ||
lib, | ||
runCommandLocal, | ||
racket, | ||
}: | ||
|
||
runCommandLocal "racket-test-get-version-and-variant" | ||
{ | ||
nativeBuildInputs = [ racket ]; | ||
} | ||
'' | ||
expectation="${racket.version}" | ||
( | ||
lib.concatLines ( | ||
builtins.map | ||
( | ||
{ expectation, output }: | ||
'' | ||
expectation="${expectation}" | ||
output="$(racket -e '(display (version))')" | ||
output="${output}" | ||
if test "$output" != "$expectation"; then | ||
echo "output mismatch: expected ''${expectation}, but got ''${output}" | ||
exit 1 | ||
fi | ||
expectation="cs" | ||
output="$(racket -e '(require launcher/launcher) (display (current-launcher-variant))')" | ||
if test "$output" != "$expectation"; then | ||
echo "output mismatch: expected ''${expectation}, but got ''${output}" | ||
exit 1 | ||
fi | ||
touch $out | ||
'' | ||
if test "$output" != "$expectation"; then | ||
echo "output mismatch: expected ''${expectation}, but got ''${output}" | ||
exit 1 | ||
fi | ||
'' | ||
) | ||
[ | ||
{ | ||
expectation = racket.version; | ||
output = "$(racket -e '(display (version))')"; | ||
} | ||
{ | ||
expectation = "cs"; | ||
output = "$(racket -e '(require launcher/launcher) (display (current-launcher-variant))')"; | ||
} | ||
{ | ||
expectation = "${lib.getExe racket}"; | ||
output = "$(racket -e '(require compiler/find-exe) (display (find-exe))')"; | ||
} | ||
] | ||
) | ||
+ '' | ||
touch $out | ||
'' | ||
) |