2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, jre, runtimeShell }:
|
2013-11-23 00:11:23 +01:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2018-03-31 20:49:46 +02:00
|
|
|
name = "smc-6.6.3";
|
2013-11-23 00:11:23 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-03-31 20:49:46 +02:00
|
|
|
url = "mirror://sourceforge/project/smc/smc/6_6_3/smc_6_6_3.tgz";
|
|
|
|
sha256 = "1gv0hrgdl4wp562virpf9sib6pdhapwv4zvwbl0d5f5xyx04il11";
|
2013-11-23 00:11:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Prebuilt Java package.
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
mkdir -p "$out/share/smc"
|
|
|
|
mkdir -p "$out/share/smc/lib"
|
|
|
|
mkdir -p "$out/share/icons"
|
2014-01-09 13:01:38 +01:00
|
|
|
mkdir -p "$out/share/java"
|
2013-11-23 00:11:23 +01:00
|
|
|
|
2014-01-09 13:01:38 +01:00
|
|
|
cp bin/Smc.jar "$out/share/java/"
|
2013-11-23 00:11:23 +01:00
|
|
|
cp -r examples/ docs/ tools/ README.txt LICENSE.txt "$out/share/smc/"
|
|
|
|
cp -r lib/* "$out/share/smc/lib/"
|
|
|
|
cp misc/smc.ico "$out/share/icons/"
|
|
|
|
|
|
|
|
cat > "$out/bin/smc" << EOF
|
2019-02-26 12:45:54 +01:00
|
|
|
#!${runtimeShell}
|
2014-01-09 13:01:38 +01:00
|
|
|
${jre}/bin/java -jar "$out/share/java/Smc.jar" "\$@"
|
2013-11-23 00:11:23 +01:00
|
|
|
EOF
|
|
|
|
chmod a+x "$out/bin/smc"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2013-11-23 00:11:23 +01:00
|
|
|
description = "Generate state machine code from text input (state diagram)";
|
|
|
|
longDescription = ''
|
|
|
|
SMC (State Machine Compiler) takes a text input file describing states,
|
|
|
|
events and actions of a state machine and generates source code that
|
|
|
|
implements the state machine.
|
|
|
|
|
|
|
|
SMC supports many target languages:
|
|
|
|
C, C++, DotNet, Groovy, java, Java, JavaScript, Lua, ObjC, Perl, Php,
|
|
|
|
Python, Ruby, Scala, Tcl.
|
|
|
|
|
|
|
|
SMC can also generate GraphViz state diagrams from the input file.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://smc.sourceforge.net/";
|
2013-11-23 00:11:23 +01:00
|
|
|
license = licenses.mpl11;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|