about summary refs log tree commit diff
path: root/pkgs/applications/science/physics/quantomatic
diff options
context:
space:
mode:
authorNick Hu <me@nickhu.co.uk>2018-11-26 16:51:47 +0000
committerNick Hu <me@nickhu.co.uk>2018-11-26 21:51:58 +0000
commit583911a0b2bbbe23ad5b22a426218b175a483c24 (patch)
treea8f70af34a2338859bba698b5e367d2483e6a7d8 /pkgs/applications/science/physics/quantomatic
parentb49ed49c68e5950c9f77e000ddeb68dd665e5563 (diff)
quantomatic: init at 0.7
Diffstat (limited to 'pkgs/applications/science/physics/quantomatic')
-rw-r--r--pkgs/applications/science/physics/quantomatic/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/applications/science/physics/quantomatic/default.nix b/pkgs/applications/science/physics/quantomatic/default.nix
new file mode 100644
index 0000000000000..ad86ff61471ce
--- /dev/null
+++ b/pkgs/applications/science/physics/quantomatic/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, jre, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "quantomatic-${version}";
+  version = "0.7";
+
+  src = fetchurl {
+    url = "https://github.com/Quantomatic/quantomatic/releases/download/v${version}/Quantomatic-v${version}.jar";
+    sha256 = "04dd5p73a7plb4l4x2balam8j7mxs8df06rjkalxycrr1id52q4r";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ jre ];
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    mkdir -p $out/libexec/quantomatic
+    cp $src $out/libexec/quantomatic/quantomatic.jar
+    mkdir -p $out/bin
+    makeWrapper ${jre}/bin/java $out/bin/quantomatic --add-flags "-jar $out/libexec/quantomatic/quantomatic.jar"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A piece of software for reasoning about monoidal theories; in particular, quantum information processing";
+    license = licenses.gpl3;
+    homepage = https://quantomatic.github.io/;
+    maintainers = with maintainers; [ nickhu ];
+    platforms = platforms.all;
+  };
+}