git.iko.soy/typeable/nixpkgs
on master help sign in
diylc: init at 4.15.1
commit0d84b3f540b9e5fdec24c76f41fc261399b39120 authorEduardo Sánchez Muñoz <esm@eduardosm.net> dateWed 6 Jan 2021, 15:00 (6 years ago) parentc1891ad
2 files changed+73
pkgs/applications/science/electronics/diylc/default.nix+71 pkgs/top-level/all-packages.nix+2
pkgs/applications/science/electronics/diylc/default.nixnew file+71
@@ -0,0 +1,71 @@
1+{ stdenv, fetchurl, makeDesktopItem, unzip, bash, jre8 }:
2+
3+let
4+ pname = "diylc";
5+ version = "4.15.1";
6+ files = {
7+ app = fetchurl {
8+ url = "https://github.com/bancika/diy-layout-creator/releases/download/v${version}/diylc-${version}.zip";
9+ sha256 = "09vzbxas654n8npxljqljf930y5gcjfvv3r4dv97dwk5sy66xvaf";
10+ };
11+ icon16 = fetchurl {
12+ url = "https://raw.githubusercontent.com/bancika/diy-layout-creator/v${version}/diylc/diylc-core/src/org/diylc/core/images/icon_small.png";
13+ sha256 = "1is50aidfwzwfzwqv57s2hwhx0r5c21cp77bkl93xkdqkh2wd8x4";
14+ };
15+ icon32 = fetchurl {
16+ url = "https://raw.githubusercontent.com/bancika/diy-layout-creator/v${version}/diylc/diylc-core/src/org/diylc/core/images/icon_medium.png";
17+ sha256 = "0a45p18n84xz1nd3zv3y16jlimvqzhbzg3q3f4lawgx4rcrn2n3d";
18+ };
19+ icon48 = fetchurl {
20+ url = "https://raw.githubusercontent.com/bancika/diy-layout-creator/v${version}/diylc/diylc-core/src/org/diylc/core/images/icon_large.png";
21+ sha256 = "06dkz0dcy8hfmnzr5ri5n1sh8r7mg83kzbvs3zy58wwhgzs1ddk6";
22+ };
23+ };
24+ launcher = makeDesktopItem {
25+ name = "diylc";
26+ desktopName = "DIY Layout Creator";
27+ comment = "Multi platform circuit layout and schematic drawing tool";
28+ exec = "diylc";
29+ icon = "diylc_icon";
30+ categories = "Development;Electronics;";
31+ };
32+in
33+stdenv.mkDerivation rec {
34+ inherit pname version;
35+
36+ dontUnpack = true;
37+
38+ buildInputs = [ jre8 ];
39+ nativeBuildInputs = [ unzip ];
40+
41+ installPhase = ''
42+ install -d $out/share/diylc
43+ ${unzip}/bin/unzip -UU ${files.app} -d $out/share/diylc
44+ rm $out/share/diylc/diylc.exe
45+ rm $out/share/diylc/run.sh
46+
47+ # Nope, the icon cannot be named 'diylc' because KDE does not like it.
48+ install -Dm644 ${files.icon16} $out/share/icons/hicolor/16x16/apps/diylc_icon.png
49+ install -Dm644 ${files.icon32} $out/share/icons/hicolor/32x32/apps/diylc_icon.png
50+ install -Dm644 ${files.icon48} $out/share/icons/hicolor/48x48/apps/diylc_icon.png
51+
52+ install -d $out/share/applications
53+ ln -s ${launcher}/share/applications/* $out/share/applications/
54+
55+ install -d $out/bin
56+ cat <<EOF > $out/bin/diylc
57+ #!${bash}/bin/sh
58+ cd $out/share/diylc
59+ ${jre8}/bin/java -Xms512m -Xmx2048m -Dorg.diylc.scriptRun=true -Dfile.encoding=UTF-8 -cp diylc.jar:lib org.diylc.DIYLCStarter
60+ EOF
61+ chmod +x $out/bin/diylc
62+ '';
63+
64+ meta = with stdenv.lib; {
65+ description = "Multi platform circuit layout and schematic drawing tool";
66+ homepage = "https://bancika.github.io/diy-layout-creator/";
67+ changelog = "https://github.com/bancika/diy-layout-creator/releases";
68+ license = licenses.gpl3Plus;
69+ platforms = platforms.linux;
70+ };
71+}
pkgs/top-level/all-packages.nix+2
@@ -27557,6 +27557,8 @@ in
2755727557
2755827558 csxcad = callPackage ../applications/science/electronics/csxcad { };
2755927559
27560+ diylc = callPackage ../applications/science/electronics/diylc { };
27561+
2756027562 flatcam = callPackage ../applications/science/electronics/flatcam { };
2756127563
2756227564 fparser = callPackage ../applications/science/electronics/fparser { };