2013-11-22 23:11:23 +00:00
|
|
|
{ stdenv, fetchurl, jre }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-03-03 01:54:32 +00:00
|
|
|
name = "smc-6.6.0";
|
2013-11-22 23:11:23 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-03 01:54:32 +00:00
|
|
|
url = "mirror://sourceforge/project/smc/smc/6_6_0/smc_6_6_0.tgz";
|
|
|
|
sha256 = "14lf286dslm7ymkr4my1xgjvwvqc9181mwkfr65ab49cxl0q85wz";
|
2013-11-22 23:11:23 +00: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 12:01:38 +00:00
|
|
|
mkdir -p "$out/share/java"
|
2013-11-22 23:11:23 +00:00
|
|
|
|
2014-01-09 12:01:38 +00:00
|
|
|
cp bin/Smc.jar "$out/share/java/"
|
2013-11-22 23:11:23 +00: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
|
|
|
|
#!${stdenv.shell}
|
2014-01-09 12:01:38 +00:00
|
|
|
${jre}/bin/java -jar "$out/share/java/Smc.jar" "\$@"
|
2013-11-22 23:11:23 +00:00
|
|
|
EOF
|
|
|
|
chmod a+x "$out/bin/smc"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
homepage = http://smc.sourceforge.net/;
|
|
|
|
license = licenses.mpl11;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|