mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
50 lines
1.5 KiB
Nix
50 lines
1.5 KiB
Nix
{ lib, stdenv, fetchurl, jre, runtimeShell }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "smc-6.6.3";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/project/smc/smc/6_6_3/smc_6_6_3.tgz";
|
|
sha256 = "1gv0hrgdl4wp562virpf9sib6pdhapwv4zvwbl0d5f5xyx04il11";
|
|
};
|
|
|
|
# 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/share/java"
|
|
|
|
cp bin/Smc.jar "$out/share/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
|
|
#!${runtimeShell}
|
|
${jre}/bin/java -jar "$out/share/java/Smc.jar" "\$@"
|
|
EOF
|
|
chmod a+x "$out/bin/smc"
|
|
'';
|
|
|
|
meta = with 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 ];
|
|
};
|
|
}
|