1 { lib, stdenv, mkDerivation, fetchurl, makeDesktopItem
2 , libXrender, libXrandr, libXcursor, libX11, libXext, libXi, libxcb
3 , libGL, glib, nss, nspr, expat, alsa-lib
4 , qtbase, qtdeclarative, qtsvg, qtlocation, qtwebchannel, qtwebengine
8 libPath = lib.makeLibraryPath
9 [ libXrender libXrandr libXcursor libX11 libXext libXi libxcb
10 libGL glib nss nspr expat alsa-lib
11 qtbase qtdeclarative qtsvg qtlocation qtwebchannel qtwebengine
19 url = "https://eagle-updates.circuits.io/downloads/${builtins.replaceStrings ["."] ["_"] version}/Autodesk_EAGLE_${version}_English_Linux_64bit.tar.gz";
20 sha256 = "18syygnskl286kn8aqfzzdsyzq59d2w19y1h1ynyxsnrvkyv71h0";
23 desktopItem = makeDesktopItem {
27 comment = "Schematic capture and PCB layout";
28 desktopName = "Eagle";
29 genericName = "Schematic editor";
30 categories = [ "Development" ];
34 [ libXrender libXrandr libXcursor libX11 libXext libXi libxcb
35 libGL glib nss nspr expat alsa-lib
36 qtbase qtdeclarative qtsvg qtlocation qtwebchannel qtwebengine
40 # Extract eagle tarball
42 tar -xzf "$src" -C "$out"
45 mkdir -p "$out"/share/man/man1
46 ln -s "$out"/eagle-${version}/doc/eagle.1 "$out"/share/man/man1/eagle.1
49 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
50 --set-rpath "${libPath}:$out/eagle-${version}/lib:${stdenv.cc.cc.lib}/lib" \
51 "$out"/eagle-${version}/eagle
54 ln -s "$out"/eagle-${version}/eagle "$out"/bin/eagle
56 # Remove bundled libraries that are available in nixpkgs
57 # TODO: There still may be unused bundled libraries
58 rm "$out"/eagle-${version}/lib/libQt5*.so.5
59 rm "$out"/eagle-${version}/lib/{libxcb-*.so.*,libX*.so.*,libxshmfence.so.1}
60 rm "$out"/eagle-${version}/lib/{libEGL.so.1,libglapi.so.0,libgbm.so.1}
62 # No longer needed (we don't use the bundled Qt libraries)
63 rm -r "$out"/eagle-${version}/libexec
64 rm -r "$out"/eagle-${version}/plugins
67 mkdir -p "$out"/share/applications
68 cp "$desktopItem"/share/applications/* "$out"/share/applications/
69 mkdir -p "$out"/share/pixmaps
70 ln -s "$out/eagle-${version}/bin/eagle-logo.png" "$out"/share/pixmaps/eagle.png
74 description = "Schematic editor and PCB layout tool from Autodesk (formerly CadSoft)";
75 homepage = "https://www.autodesk.com/products/eagle/overview";
76 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
77 license = licenses.unfree;
78 platforms = [ "x86_64-linux" ];