dust: fix

- Use `pixie` (the wrapper) rather than `pixie-vm` (the wrappee)
- Add `rlwrap` command rather than using `which`

Fixes #72129
This commit is contained in:
Harrison Houghton 2021-09-13 20:19:56 -04:00
parent 33d3282b12
commit 230e267051
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,6 @@
{ lib, stdenv, pixie, fetchFromGitHub }: { lib, stdenv, fetchFromGitHub
, pixie, rlwrap
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "dust"; pname = "dust";
@ -16,8 +18,9 @@ stdenv.mkDerivation rec {
patches = [ ./make-paths-configurable.patch ]; patches = [ ./make-paths-configurable.patch ];
configurePhase = '' configurePhase = ''
pixiePath="${pixie}/bin/pixie-vm" \ pixiePath="${pixie}/bin/pixie" \
basePath="$out/share/dust" \ basePath="$out/share/dust" \
rlwrapPath="${rlwrap}/bin/rlwrap" \
substituteAll dust.in dust substituteAll dust.in dust
chmod +x dust chmod +x dust
''; '';

View File

@ -73,11 +73,12 @@ new file mode 100755
index 0000000..44a7fbd index 0000000..44a7fbd
--- /dev/null --- /dev/null
+++ b/dust.in +++ b/dust.in
@@ -0,0 +1,43 @@ @@ -0,0 +1,40 @@
+#!/usr/bin/env bash +#!/usr/bin/env bash
+ +
+base_path=@basePath@ +base_path=@basePath@
+pixie_path=@pixiePath@ +pixie_path=@pixiePath@
+rlwrap_cmd=@rlwrapPath@
+ +
+function set_load_path() { +function set_load_path() {
+ load_path="" + load_path=""
@ -98,11 +99,7 @@ index 0000000..44a7fbd
+ +
+case $1 in +case $1 in
+ ""|"repl") + ""|"repl")
+ rlwrap_cmd="" + $rlwrap_cmd -aignored -n $pixie_path $load_path
+ if [ -n "`which rlwrap`" ]; then
+ rlwrap_cmd="rlwrap -aignored -n"
+ fi
+ $rlwrap_cmd $pixie_path $load_path
+ ;; + ;;
+ "run") + "run")
+ shift + shift