2021-09-14 01:19:56 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
|
|
|
, pixie, rlwrap
|
|
|
|
}:
|
2016-02-28 15:50:59 +00:00
|
|
|
|
2016-05-18 16:29:33 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2021-08-05 11:30:04 +01:00
|
|
|
pname = "dust";
|
|
|
|
version = "0-91";
|
|
|
|
|
2016-05-18 16:29:33 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pixie-lang";
|
|
|
|
repo = "dust";
|
2016-02-28 15:50:59 +00:00
|
|
|
rev = "efe469661e749a71e86858fd006f61464810575a";
|
2016-05-18 16:29:33 +01:00
|
|
|
sha256 = "09n57b6haxwask9m8vimv42ikczf7lgfc7m9izjrcqgs0padvfzc";
|
2016-02-28 15:50:59 +00:00
|
|
|
};
|
2021-08-05 11:30:04 +01:00
|
|
|
|
2016-02-28 15:50:59 +00:00
|
|
|
buildInputs = [ pixie ];
|
2021-08-05 11:30:04 +01:00
|
|
|
|
2016-02-28 15:50:59 +00:00
|
|
|
patches = [ ./make-paths-configurable.patch ];
|
2021-08-05 11:30:04 +01:00
|
|
|
|
2016-02-28 15:50:59 +00:00
|
|
|
configurePhase = ''
|
2021-09-14 01:19:56 +01:00
|
|
|
pixiePath="${pixie}/bin/pixie" \
|
2016-02-28 15:50:59 +00:00
|
|
|
basePath="$out/share/dust" \
|
2021-09-14 01:19:56 +01:00
|
|
|
rlwrapPath="${rlwrap}/bin/rlwrap" \
|
2016-02-28 15:50:59 +00:00
|
|
|
substituteAll dust.in dust
|
|
|
|
chmod +x dust
|
|
|
|
'';
|
2021-08-05 11:30:04 +01:00
|
|
|
|
|
|
|
# FIXME: AOT for dust
|
|
|
|
# buildPhase = ''
|
|
|
|
# find . -name "*.pxi" -exec pixie-vm -c {} \;
|
|
|
|
# '';
|
|
|
|
|
2016-02-28 15:50:59 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/dust
|
|
|
|
cp -a src/ run.pxi $out/share/dust
|
|
|
|
mv dust $out/bin/dust
|
|
|
|
'';
|
2016-05-18 16:29:46 +01:00
|
|
|
|
2021-08-05 11:30:04 +01:00
|
|
|
meta = with lib; {
|
2016-05-18 16:29:46 +01:00
|
|
|
description = "Provides tooling around pixie, e.g. a nicer repl, running tests and fetching dependencies";
|
|
|
|
homepage = src.meta.homepage;
|
2021-08-05 11:30:04 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
license = licenses.lgpl3;
|
|
|
|
platforms = platforms.unix;
|
2016-05-18 16:29:46 +01:00
|
|
|
};
|
2016-02-28 15:50:59 +00:00
|
|
|
}
|