From 325894eb1b00eabbd1fbad89c8db0d71f0eb1ea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sat, 23 Nov 2013 00:11:23 +0100 Subject: [PATCH] smc: new package SMC is a state machine compiler. It generates state machine code from text input files (state diagrams). Homepage: http://smc.sourceforge.net/ --- pkgs/tools/misc/smc/default.nix | 49 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 51 insertions(+) create mode 100644 pkgs/tools/misc/smc/default.nix diff --git a/pkgs/tools/misc/smc/default.nix b/pkgs/tools/misc/smc/default.nix new file mode 100644 index 000000000000..a12a40e8ed71 --- /dev/null +++ b/pkgs/tools/misc/smc/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl, jre }: + +stdenv.mkDerivation rec { + name = "smc-6.3.0"; + + src = fetchurl { + url = "mirror://sourceforge/project/smc/smc/6_3_0/smc_6_3_0.tgz"; + sha256 = "0arzi8kc4vycp1ccf0v87p08cdpylwhx4za2pzvp08vkfwi8zc7z"; + }; + + # Prebuilt Java package. + installPhase = '' + mkdir -p "$out/bin" + mkdir -p "$out/share/smc" + mkdir -p "$out/share/smc/lib" + mkdir -p "$out/share/icons" + mkdir -p "$out/lib/java" + + cp bin/Smc.jar "$out/lib/java/" + 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} + ${jre}/bin/java -jar "$out/lib/java/Smc.jar" "\$@" + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bef1cff60ede..ea21d94668de 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3768,6 +3768,8 @@ let buildc2xml = false; }; + smc = callPackage ../tools/misc/smc { }; + sparse = callPackage ../development/tools/analysis/sparse { }; speedtest_cli = callPackage ../tools/networking/speedtest-cli { };