nixpkgs/pkgs/tools/misc/umlet/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

52 lines
1.4 KiB
Nix

{ lib, stdenv, fetchurl, jre, unzip, runtimeShell }:
stdenv.mkDerivation rec {
major = "14";
minor = "3";
version = "${major}.${minor}.0";
pname = "umlet";
src = fetchurl {
url = "http://www.umlet.com/umlet_${major}_${minor}/umlet-standalone-${version}.zip";
sha256 = "0jfyxjxsjx29xhs3fl0f574nyncmk9j5jp8zlgd401mcaznn9c7l";
};
buildInputs = [ unzip ];
installPhase = ''
mkdir -p "$out/bin"
mkdir -p "$out/lib"
cp -R * "$out/lib"
cat > "$out/bin/umlet" << EOF
#!${runtimeShell}
programDir="$out/lib"
cd "\$programDir"
if [ \$# -eq 1 ]
then "${jre}/bin/java" -jar "\$programDir/umlet.jar" -filename="\$1"
else "${jre}/bin/java" -jar "\$programDir/umlet.jar" "\$@"
fi
EOF
chmod a+x "$out/bin/umlet"
'';
meta = with lib; {
description = "Free, open-source UML tool with a simple user interface";
longDescription = ''
UMLet is a free, open-source UML tool with a simple user interface:
draw UML diagrams fast, produce sequence and activity diagrams from
plain text, export diagrams to eps, pdf, jpg, svg, and clipboard,
share diagrams using Eclipse, and create new, custom UML elements.
UMLet runs stand-alone or as Eclipse plug-in on Windows, macOS and
Linux.
'';
homepage = "http://www.umlet.com";
license = licenses.gpl3;
maintainers = with maintainers; [ oxzi ];
platforms = platforms.all;
};
}