at v206 51 lines 1.4 kB view raw
1{ stdenv, fetchurl, jre, unzip }: 2 3stdenv.mkDerivation rec { 4 major = "13"; 5 minor = "3"; 6 version = "${major}.${minor}"; 7 name = "umlet-${version}"; 8 9 src = fetchurl { 10 url = "http://www.umlet.com/umlet_${major}_${minor}/umlet_${version}.zip"; 11 sha256 = "0fbr51xknk98qz576lcl25qz0s1snns2yb0j54d77xkw7pnxmvzr"; 12 }; 13 14 buildInputs = [ unzip ]; 15 16 installPhase = '' 17 mkdir -p "$out/bin" 18 mkdir -p "$out/lib" 19 20 cp -R * "$out/lib" 21 22 cat > "$out/bin/umlet" << EOF 23 #!${stdenv.shell} 24 25 programDir="$out/lib" 26 cd "\$programDir" 27 if [ \$# -eq 1 ] 28 then "${jre}/bin/java" -jar "\$programDir/umlet.jar" -filename="\$1" 29 else "${jre}/bin/java" -jar "\$programDir/umlet.jar" "\$@" 30 fi 31 32 EOF 33 chmod a+x "$out/bin/umlet" 34 ''; 35 36 meta = with stdenv.lib; { 37 description = "Free, open-source UML tool with a simple user interface"; 38 longDescription = '' 39 UMLet is a free, open-source UML tool with a simple user interface: 40 draw UML diagrams fast, produce sequence and activity diagrams from 41 plain text, export diagrams to eps, pdf, jpg, svg, and clipboard, 42 share diagrams using Eclipse, and create new, custom UML elements. 43 UMLet runs stand-alone or as Eclipse plug-in on Windows, OS X and 44 Linux. 45 ''; 46 homepage = http://www.umlet.com; 47 license = licenses.gpl3; 48 maintainers = [ maintainers.DamienCassou ]; 49 platforms = platforms.all; 50 }; 51}