tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
dust: init at 0-91
Herwig Hochleitner
10 years ago
de5fa833
1c380842
+150
3 changed files
expand all
collapse all
unified
split
pkgs
development
interpreters
pixie
dust.nix
make-paths-configurable.patch
top-level
all-packages.nix
+27
pkgs/development/interpreters/pixie/dust.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{ stdenv, pixie, fetchgit }:
2
+
3
+
stdenv.mkDerivation {
4
+
name = "dust-0-91";
5
+
src = fetchgit {
6
+
url = "https://github.com/pixie-lang/dust.git";
7
+
rev = "efe469661e749a71e86858fd006f61464810575a";
8
+
sha256 = "0krh7ynald3gqv9f17a4kfx7sx8i31l6j1fhd5k8b6m8cid7f9c1";
9
+
};
10
+
buildInputs = [ pixie ];
11
+
patches = [ ./make-paths-configurable.patch ];
12
+
configurePhase = ''
13
+
pixiePath="${pixie}/bin/pxi" \
14
+
basePath="$out/share/dust" \
15
+
substituteAll dust.in dust
16
+
chmod +x dust
17
+
'';
18
+
# FIXME: AOT for dust
19
+
# buildPhase = ''
20
+
# find . -name "*.pxi" -exec pixie-vm -c {} \;
21
+
# '';
22
+
installPhase = ''
23
+
mkdir -p $out/bin $out/share/dust
24
+
cp -a src/ run.pxi $out/share/dust
25
+
mv dust $out/bin/dust
26
+
'';
27
+
}
+122
pkgs/development/interpreters/pixie/make-paths-configurable.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
From 0cbb82e606610d36e52c70d888995fbbf9b0d7c8 Mon Sep 17 00:00:00 2001
2
+
From: Herwig Hochleitner <herwig@bendlas.net>
3
+
Date: Sun, 28 Feb 2016 16:34:14 +0100
4
+
Subject: [PATCH] make paths configurable
5
+
6
+
---
7
+
dust | 52 ----------------------------------------------------
8
+
dust.in | 43 +++++++++++++++++++++++++++++++++++++++++++
9
+
2 files changed, 43 insertions(+), 52 deletions(-)
10
+
delete mode 100755 dust
11
+
create mode 100755 dust.in
12
+
13
+
diff --git a/dust b/dust
14
+
deleted file mode 100755
15
+
index ffced9b..0000000
16
+
--- a/dust
17
+
+++ /dev/null
18
+
@@ -1,52 +0,0 @@
19
+
-#!/usr/bin/env bash
20
+
-
21
+
-base_path=$0
22
+
-if [ -L "$base_path" ]; then
23
+
- base_path=`readlink $base_path`
24
+
-fi
25
+
-base_path=`dirname $base_path`
26
+
-
27
+
-pixie_path=`which pixie-vm`
28
+
-if [ -z "$pixie_path" ]; then
29
+
- echo "Error: 'pixie-vm' must be on your PATH"
30
+
- exit 1
31
+
-fi
32
+
-
33
+
-function set_load_path() {
34
+
- load_path=""
35
+
- if ([ -f "project.edn" ] || [ -f "project.pxi" ]) && [ -f ".load-path" ]; then
36
+
- load_path="`cat .load-path`"
37
+
- fi
38
+
-}
39
+
-
40
+
-if [ ! -f "project.edn" ] && [ -f "project.pxi" ]; then
41
+
- echo "Warning: 'project.pxi' is deprecated, please use 'project.edn'."
42
+
- echo "To start you can run the following command:"
43
+
- echo " pixie-vm -l $base_path/src -e '(require dust.project :as p) (p/load-project!) (prn (dissoc @p/*project* :path))'"
44
+
- echo
45
+
-fi
46
+
-
47
+
-set_load_path
48
+
-run_dust="$pixie_path -l $base_path/src $load_path $base_path/run.pxi"
49
+
-
50
+
-case $1 in
51
+
- ""|"repl")
52
+
- rlwrap_cmd=""
53
+
- if [ -n "`which rlwrap`" ]; then
54
+
- rlwrap_cmd="rlwrap -aignored -n"
55
+
- fi
56
+
- $rlwrap_cmd $pixie_path $load_path
57
+
- ;;
58
+
- "run")
59
+
- shift
60
+
- file=$1
61
+
- shift
62
+
- $pixie_path $load_path $file $@
63
+
- ;;
64
+
- -h|--help)
65
+
- $run_dust help
66
+
- ;;
67
+
- *)
68
+
- $run_dust $@
69
+
- ;;
70
+
-esac
71
+
diff --git a/dust.in b/dust.in
72
+
new file mode 100755
73
+
index 0000000..44a7fbd
74
+
--- /dev/null
75
+
+++ b/dust.in
76
+
@@ -0,0 +1,43 @@
77
+
+#!/usr/bin/env bash
78
+
+
79
+
+base_path=@basePath@
80
+
+pixie_path=@pixiePath@
81
+
+
82
+
+function set_load_path() {
83
+
+ load_path=""
84
+
+ if ([ -f "project.edn" ] || [ -f "project.pxi" ]) && [ -f ".load-path" ]; then
85
+
+ load_path="`cat .load-path`"
86
+
+ fi
87
+
+}
88
+
+
89
+
+if [ ! -f "project.edn" ] && [ -f "project.pxi" ]; then
90
+
+ echo "Warning: 'project.pxi' is deprecated, please use 'project.edn'."
91
+
+ echo "To start you can run the following command:"
92
+
+ echo " pixie-vm -l $base_path/src -e '(require dust.project :as p) (p/load-project!) (prn (dissoc @p/*project* :path))'"
93
+
+ echo
94
+
+fi
95
+
+
96
+
+set_load_path
97
+
+run_dust="$pixie_path -l $base_path/src $load_path $base_path/run.pxi"
98
+
+
99
+
+case $1 in
100
+
+ ""|"repl")
101
+
+ rlwrap_cmd=""
102
+
+ if [ -n "`which rlwrap`" ]; then
103
+
+ rlwrap_cmd="rlwrap -aignored -n"
104
+
+ fi
105
+
+ $rlwrap_cmd $pixie_path $load_path
106
+
+ ;;
107
+
+ "run")
108
+
+ shift
109
+
+ file=$1
110
+
+ shift
111
+
+ $pixie_path $load_path $file $@
112
+
+ ;;
113
+
+ -h|--help)
114
+
+ $run_dust help
115
+
+ ;;
116
+
+ *)
117
+
+ $run_dust $@
118
+
+ ;;
119
+
+esac
120
+
--
121
+
2.7.1
122
+
+1
pkgs/top-level/all-packages.nix
···
5508
};
5509
5510
pixie = callPackage ../development/interpreters/pixie { };
0
5511
5512
bundix = callPackage ../development/interpreters/ruby/bundix {
5513
ruby = ruby_2_1_3;
···
5508
};
5509
5510
pixie = callPackage ../development/interpreters/pixie { };
5511
+
dust = callPackage ../development/interpreters/pixie/dust.nix { };
5512
5513
bundix = callPackage ../development/interpreters/ruby/bundix {
5514
ruby = ruby_2_1_3;