diff options
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/carp/default.nix | 47 | ||||
-rw-r--r-- | pkgs/development/compilers/jsonnet/default.nix | 11 |
2 files changed, 54 insertions, 4 deletions
diff --git a/pkgs/development/compilers/carp/default.nix b/pkgs/development/compilers/carp/default.nix new file mode 100644 index 000000000000..65f0481a8010 --- /dev/null +++ b/pkgs/development/compilers/carp/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchFromGitHub, makeWrapper, clang, haskellPackages }: + +haskellPackages.mkDerivation rec { + + pname = "carp"; + version = "unstable-2018-09-15"; + + src = fetchFromGitHub { + owner = "carp-lang"; + repo = "Carp"; + rev = "cf9286c35cab1c170aa819f7b30b5871b9e812e6"; + sha256 = "1k6kdxbbaclhi40b9p3fgbkc1x6pc4v0029xjm6gny6pcdci2cli"; + }; + + buildDepends = [ makeWrapper ]; + + executableHaskellDepends = with haskellPackages; [ + HUnit blaze-markup blaze-html split cmdargs + ]; + + isExecutable = true; + + # The carp executable must know where to find its core libraries and other + # files. Set the environment variable CARP_DIR so that it points to the root + # of the Carp repo. See: + # https://github.com/carp-lang/Carp/blob/master/docs/Install.md#setting-the-carp_dir + # + # Also, clang must be available run-time because carp is compiled to C which + # is then compiled with clang. + postInstall = '' + wrapProgram $out/bin/carp \ + --set CARP_DIR $src \ + --prefix PATH : ${clang}/bin + wrapProgram $out/bin/carp-header-parse \ + --set CARP_DIR $src \ + --prefix PATH : ${clang}/bin + ''; + + description = "A statically typed lisp, without a GC, for real-time applications"; + homepage = https://github.com/carp-lang/Carp; + license = stdenv.lib.licenses.asl20; + maintainers = with stdenv.lib.maintainers; [ jluttine ]; + + # Windows not (yet) supported. + platforms = with stdenv.lib.platforms; unix ++ darwin; + +} diff --git a/pkgs/development/compilers/jsonnet/default.nix b/pkgs/development/compilers/jsonnet/default.nix index 4a520471f867..f363c6fdb5ee 100644 --- a/pkgs/development/compilers/jsonnet/default.nix +++ b/pkgs/development/compilers/jsonnet/default.nix @@ -1,4 +1,6 @@ -{ stdenv, lib, fetchFromGitHub, emscripten }: +{ stdenv, lib, fetchFromGitHub, emscripten +, enableJsonnetJs ? !stdenv.isDarwin +}: let version = "0.11.2"; in @@ -13,16 +15,17 @@ stdenv.mkDerivation { sha256 = "05rl5i4g36k2ikxv4sw726mha1qf5bb66wiqpi0s09wj9azm7vym"; }; - buildInputs = [ emscripten ]; + buildInputs = if enableJsonnetJs then [ emscripten ] else [ ]; enableParallelBuilding = true; - makeFlags = [''EM_CACHE=$(TMPDIR)/.em_cache'' ''all'']; + makeFlags = [''EM_CACHE=$(TMPDIR)/.em_cache''] ++ + (if enableJsonnetJs then ["all"] else ["jsonnet" "libjsonnet.so" "libjsonnet++.so"]); installPhase = '' mkdir -p $out/bin $out/lib $out/share/ cp jsonnet $out/bin/ - cp libjsonnet.so $out/lib/ + cp libjsonnet*.so $out/lib/ cp -a doc $out/share/doc cp -a include $out/include ''; |