1{
2 stdenv,
3 lib,
4 pkg-config,
5 makeWrapper,
6 texinfo,
7 fetchurl,
8 autoreconfHook,
9 guile,
10 flex,
11 gtk3,
12 glib,
13 gtksheet,
14 gettext,
15 gawk,
16 shared-mime-info,
17 groff,
18 libstroke,
19}:
20
21stdenv.mkDerivation rec {
22 pname = "lepton-eda";
23 version = "1.9.18-20220529";
24
25 src = fetchurl {
26 url = "https://github.com/lepton-eda/lepton-eda/releases/download/${version}/lepton-eda-${builtins.head (lib.splitString "-" version)}.tar.gz";
27 hash = "sha256-X9yNuosNR1Jf3gYWQZeOnKdxzJLld29Sn9XYsPGWYYI=";
28 };
29
30 nativeBuildInputs = [
31 pkg-config
32 makeWrapper
33 texinfo
34 autoreconfHook
35 ];
36
37 propagatedBuildInputs = [
38 guile
39 flex
40 gtk3
41 glib
42 gtksheet
43 gettext
44 gawk
45 shared-mime-info
46 groff
47 libstroke
48 ];
49
50 configureFlags = [
51 "--disable-update-xdg-database"
52 "--with-gtk3"
53 ];
54
55 CFLAGS = [
56 "-DSCM_DEBUG_TYPING_STRICTNESS=2"
57 ];
58
59 postInstall = ''
60 libs="${lib.makeLibraryPath propagatedBuildInputs}"
61 for program in $out/bin/*; do
62 wrapProgram "$program" \
63 --prefix LD_LIBRARY_PATH : "$libs" \
64 --prefix LTDL_LIBRARY_PATH : "$out/lib"
65 done
66 '';
67
68 meta = with lib; {
69 homepage = "https://github.com/lepton-eda";
70 description = "Lepton Electronic Design Automation";
71 longDescription = ''
72 Lepton EDA is a suite of free software tools for designing electronics.
73 It provides schematic capture, netlisting into over 30 netlist formats, and many other features.
74 '';
75 license = licenses.gpl2Plus;
76 platforms = platforms.linux;
77 maintainers = with maintainers; [ tesq0 ];
78 };
79}