mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
commit
b6a1ab75d8
2 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
'';
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue