From 230e26705196aa14c7395a11b04683b3429ab1d1 Mon Sep 17 00:00:00 2001 From: Harrison Houghton Date: Mon, 13 Sep 2021 20:19:56 -0400 Subject: [PATCH] dust: fix - Use `pixie` (the wrapper) rather than `pixie-vm` (the wrappee) - Add `rlwrap` command rather than using `which` Fixes #72129 --- pkgs/development/interpreters/pixie/dust.nix | 7 +++++-- .../interpreters/pixie/make-paths-configurable.patch | 9 +++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/development/interpreters/pixie/dust.nix b/pkgs/development/interpreters/pixie/dust.nix index bbe9ae3dcc4b..9c39b5c5ce63 100644 --- a/pkgs/development/interpreters/pixie/dust.nix +++ b/pkgs/development/interpreters/pixie/dust.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, pixie, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub +, pixie, rlwrap +}: stdenv.mkDerivation rec { pname = "dust"; @@ -16,8 +18,9 @@ stdenv.mkDerivation rec { patches = [ ./make-paths-configurable.patch ]; configurePhase = '' - pixiePath="${pixie}/bin/pixie-vm" \ + pixiePath="${pixie}/bin/pixie" \ basePath="$out/share/dust" \ + rlwrapPath="${rlwrap}/bin/rlwrap" \ substituteAll dust.in dust chmod +x dust ''; diff --git a/pkgs/development/interpreters/pixie/make-paths-configurable.patch b/pkgs/development/interpreters/pixie/make-paths-configurable.patch index 122ab6e2c07b..e22e83d2ee74 100644 --- a/pkgs/development/interpreters/pixie/make-paths-configurable.patch +++ b/pkgs/development/interpreters/pixie/make-paths-configurable.patch @@ -73,11 +73,12 @@ new file mode 100755 index 0000000..44a7fbd --- /dev/null +++ b/dust.in -@@ -0,0 +1,43 @@ +@@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +base_path=@basePath@ +pixie_path=@pixiePath@ ++rlwrap_cmd=@rlwrapPath@ + +function set_load_path() { + load_path="" @@ -98,11 +99,7 @@ index 0000000..44a7fbd + +case $1 in + ""|"repl") -+ rlwrap_cmd="" -+ if [ -n "`which rlwrap`" ]; then -+ rlwrap_cmd="rlwrap -aignored -n" -+ fi -+ $rlwrap_cmd $pixie_path $load_path ++ $rlwrap_cmd -aignored -n $pixie_path $load_path + ;; + "run") + shift