16 url = "https://github.com/bancika/diy-layout-creator/releases/download/v${version}/diylc-${version}.zip";
17 sha256 = "09fpp3dn086clgnjz5yj4fh5bnjvj6mvxkx9n3zamcwszjmxr40d";
20 url = "https://raw.githubusercontent.com/bancika/diy-layout-creator/v${version}/diylc/diylc-core/src/org/diylc/core/images/icon_small.png";
21 sha256 = "1is50aidfwzwfzwqv57s2hwhx0r5c21cp77bkl93xkdqkh2wd8x4";
24 url = "https://raw.githubusercontent.com/bancika/diy-layout-creator/v${version}/diylc/diylc-core/src/org/diylc/core/images/icon_medium.png";
25 sha256 = "0a45p18n84xz1nd3zv3y16jlimvqzhbzg3q3f4lawgx4rcrn2n3d";
28 url = "https://raw.githubusercontent.com/bancika/diy-layout-creator/v${version}/diylc/diylc-core/src/org/diylc/core/images/icon_large.png";
29 sha256 = "06dkz0dcy8hfmnzr5ri5n1sh8r7mg83kzbvs3zy58wwhgzs1ddk6";
32 launcher = makeDesktopItem {
34 desktopName = "DIY Layout Creator";
35 comment = "Multi platform circuit layout and schematic drawing tool";
44 stdenv.mkDerivation rec {
45 inherit pname version;
49 buildInputs = [ jre8 ];
50 nativeBuildInputs = [ unzip ];
55 mkdir -p $out/share/diylc
56 unzip -UU ${files.app} -d $out/share/diylc
57 rm $out/share/diylc/diylc.exe
58 rm $out/share/diylc/run.sh
60 # Nope, the icon cannot be named 'diylc' because KDE does not like it.
61 install -Dm644 ${files.icon16} $out/share/icons/hicolor/16x16/apps/diylc_icon.png
62 install -Dm644 ${files.icon32} $out/share/icons/hicolor/32x32/apps/diylc_icon.png
63 install -Dm644 ${files.icon48} $out/share/icons/hicolor/48x48/apps/diylc_icon.png
65 mkdir -p $out/share/applications
66 ln -s ${launcher}/share/applications/* $out/share/applications/
69 cat <<EOF > $out/bin/diylc
72 ${jre8}/bin/java -Xms512m -Xmx2048m -Dorg.diylc.scriptRun=true -Dfile.encoding=UTF-8 -cp diylc.jar:lib org.diylc.DIYLCStarter
74 chmod +x $out/bin/diylc
80 description = "Multi platform circuit layout and schematic drawing tool";
81 mainProgram = "diylc";
82 homepage = "https://bancika.github.io/diy-layout-creator/";
83 changelog = "https://github.com/bancika/diy-layout-creator/releases";
84 license = licenses.gpl3Plus;
85 sourceProvenance = with sourceTypes; [ binaryBytecode ];
86 platforms = platforms.linux;