nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 jre,
6 makeWrapper,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "quantomatic";
11 version = "0.7";
12
13 src = fetchurl {
14 url = "https://github.com/Quantomatic/quantomatic/releases/download/v${version}/Quantomatic-v${version}.jar";
15 sha256 = "04dd5p73a7plb4l4x2balam8j7mxs8df06rjkalxycrr1id52q4r";
16 };
17
18 nativeBuildInputs = [ makeWrapper ];
19 buildInputs = [ jre ];
20
21 dontUnpack = true;
22
23 installPhase = ''
24 mkdir -p $out/libexec/quantomatic
25 cp $src $out/libexec/quantomatic/quantomatic.jar
26 mkdir -p $out/bin
27 makeWrapper ${jre}/bin/java $out/bin/quantomatic --add-flags "-jar $out/libexec/quantomatic/quantomatic.jar"
28 '';
29
30 meta = with lib; {
31 description = "Piece of software for reasoning about monoidal theories; in particular, quantum information processing";
32 mainProgram = "quantomatic";
33 license = licenses.gpl3;
34 homepage = "https://quantomatic.github.io/";
35 sourceProvenance = with sourceTypes; [ binaryBytecode ];
36 maintainers = with maintainers; [ nickhu ];
37 platforms = platforms.all;
38 };
39}