nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 unzip,
6 makeWrapper,
7 makeDesktopItem,
8 icoutils,
9 jre8,
10}:
11
12let
13 desktopItem = makeDesktopItem {
14 name = "groove-simulator";
15 exec = "groove-simulator";
16 icon = "groove";
17 desktopName = "GROOVE Simulator";
18 comment = "GRaphs for Object-Oriented VErification";
19 categories = [
20 "Science"
21 "ComputerScience"
22 ];
23 };
24
25in
26stdenv.mkDerivation rec {
27 pname = "groove";
28 version = "5.8.1";
29
30 src = fetchurl {
31 url = "mirror://sourceforge/groove/groove/${version}/${pname}-${
32 builtins.replaceStrings [ "." ] [ "_" ] version
33 }-bin.zip";
34 sha256 = "sha256-JwoUlO6F2+8NtCnLC+xm5q0Jm8RIyU1rnuKGmjgJhFU=";
35 };
36
37 nativeBuildInputs = [
38 unzip
39 makeWrapper
40 icoutils
41 ];
42
43 dontBuild = true;
44
45 installPhase = ''
46 mkdir -p $out/share/groove
47 cp -r bin lib $out/share/groove/
48
49 mkdir -p $out/share/doc/groove
50 cp CHANGES README *.pdf $out/share/doc/groove/
51
52 mkdir -p $out/bin
53 for bin in Generator Imager ModelChecker PrologChecker Simulator Viewer; do
54 makeWrapper ${jre8}/bin/java $out/bin/groove-''${bin,,} \
55 --add-flags "-jar $out/share/groove/bin/$bin.jar"
56 done
57
58 mkdir -p $out/share/applications
59 ln -s ${desktopItem}/share/applications/* $out/share/applications/
60
61 mkdir -p $out/share/icons/hicolor/{16x16,32x32}/apps
62 icotool -x -i 1 -o $out/share/icons/hicolor/32x32/apps/groove.png groove-green-g.ico
63 icotool -x -i 2 -o $out/share/icons/hicolor/16x16/apps/groove.png groove-green-g.ico
64 '';
65
66 meta = with lib; {
67 description = "GRaphs for Object-Oriented VErification";
68 homepage = "https://groove.cs.utwente.nl/";
69 license = licenses.asl20;
70 sourceProvenance = with sourceTypes; [ binaryBytecode ];
71 platforms = platforms.all;
72 maintainers = [ ];
73 };
74}