about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/interpreters/proglodyte-wasm
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/interpreters/proglodyte-wasm
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/interpreters/proglodyte-wasm')
-rw-r--r--nixpkgs/pkgs/development/interpreters/proglodyte-wasm/default.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/interpreters/proglodyte-wasm/default.nix b/nixpkgs/pkgs/development/interpreters/proglodyte-wasm/default.nix
new file mode 100644
index 000000000000..9a30ae7d8a85
--- /dev/null
+++ b/nixpkgs/pkgs/development/interpreters/proglodyte-wasm/default.nix
@@ -0,0 +1,59 @@
+{ stdenv, fetchFromGitHub, cmake, clang, python, v8_static, coreutils }:
+
+let
+  sexpr_wasm_prototype = stdenv.mkDerivation {
+    name = "sexpr_wasm_prototype";
+    src = fetchFromGitHub {
+      owner = "WebAssembly";
+      repo = "sexpr-wasm-prototype";
+      rev = "1347a367c34876bfe92562f244a8c8b770372479";
+      sha256 = "1v1mph5fp1rffhvh8bbx937gpjqjrdgm7yhffdxzdn4pih9d0grn";
+    };
+
+    configurePhase = ''
+      # set this to nonempty string to disable default cmake configure
+    '';
+
+    buildInputs = [ cmake clang python ];
+
+    buildPhase = "make clang-debug-no-tests";
+
+    hardeningDisable = [ "format" ];
+
+    installPhase = ''
+      mkdir -p $out/bin
+      cp out/clang/Debug/no-tests/sexpr-wasm $out/bin
+    '';
+  };
+
+in
+
+stdenv.mkDerivation {
+  name = "wasm-0.0.1";
+
+  src = fetchFromGitHub {
+    owner = "proglodyte";
+    repo = "wasm";
+    rev = "650188eecaaf4b64f12b341986b4e89e5fdb3bbe";
+    sha256 = "1f5mdl0l2448lx7h36b4bdr541a4q1wapn1kdwrd4z7s94n7a5gq";
+  };
+
+  configurePhase = ''
+    sed -i -e "s|sudo ||g" Makefile
+  '';
+
+  installPhase = ''
+    export DESTDIR=$out
+    export MKTEMPDIR=${coreutils}/bin
+    export D8DIR=${v8_static}/bin
+    export SWDIR=${sexpr_wasm_prototype}/bin
+    make install
+  '';
+
+  meta = with stdenv.lib; {
+    description = "wasm runs WebAssembly from the command line";
+    maintainers = with maintainers; [ proglodyte ];
+    platforms = platforms.linux;
+    license = licenses.asl20;
+  };
+}