mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
53 lines
1.6 KiB
Nix
53 lines
1.6 KiB
Nix
{ lib, stdenv, fetchurl, jre, runtimeShell }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "smc";
|
|
version = "6.6.3";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/project/smc/smc/${lib.replaceStrings ["."] ["_"] version}/smc_${lib.replaceStrings ["."] ["_"] version}.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 = "https://smc.sourceforge.net/";
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
|
license = licenses.mpl11;
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.bjornfor ];
|
|
mainProgram = "smc";
|
|
};
|
|
}
|