1 { lib, stdenv, fetchurl, jre, runtimeShell }:
3 stdenv.mkDerivation rec {
8 url = "mirror://sourceforge/project/smc/smc/${lib.replaceStrings ["."] ["_"] version}/smc_${lib.replaceStrings ["."] ["_"] version}.tgz";
9 sha256 = "1gv0hrgdl4wp562virpf9sib6pdhapwv4zvwbl0d5f5xyx04il11";
12 # Prebuilt Java package.
15 mkdir -p "$out/share/smc"
16 mkdir -p "$out/share/smc/lib"
17 mkdir -p "$out/share/icons"
18 mkdir -p "$out/share/java"
20 cp bin/Smc.jar "$out/share/java/"
21 cp -r examples/ docs/ tools/ README.txt LICENSE.txt "$out/share/smc/"
22 cp -r lib/* "$out/share/smc/lib/"
23 cp misc/smc.ico "$out/share/icons/"
25 cat > "$out/bin/smc" << EOF
27 ${jre}/bin/java -jar "$out/share/java/Smc.jar" "\$@"
29 chmod a+x "$out/bin/smc"
33 description = "Generate state machine code from text input (state diagram)";
35 SMC (State Machine Compiler) takes a text input file describing states,
36 events and actions of a state machine and generates source code that
37 implements the state machine.
39 SMC supports many target languages:
40 C, C++, DotNet, Groovy, java, Java, JavaScript, Lua, ObjC, Perl, Php,
41 Python, Ruby, Scala, Tcl.
43 SMC can also generate GraphViz state diagrams from the input file.
45 homepage = "http://smc.sourceforge.net/";
46 sourceProvenance = with sourceTypes; [ binaryBytecode ];
47 license = licenses.mpl11;
48 platforms = platforms.linux;
49 maintainers = [ maintainers.bjornfor ];