29 libPath = lib.makeLibraryPath [
56 url = "https://eagle-updates.circuits.io/downloads/${
57 builtins.replaceStrings [ "." ] [ "_" ] version
58 }/Autodesk_EAGLE_${version}_English_Linux_64bit.tar.gz";
59 sha256 = "18syygnskl286kn8aqfzzdsyzq59d2w19y1h1ynyxsnrvkyv71h0";
62 desktopItem = makeDesktopItem {
66 comment = "Schematic capture and PCB layout";
67 desktopName = "Eagle";
68 genericName = "Schematic editor";
69 categories = [ "Development" ];
95 # Extract eagle tarball
97 tar -xzf "$src" -C "$out"
100 mkdir -p "$out"/share/man/man1
101 ln -s "$out"/eagle-${version}/doc/eagle.1 "$out"/share/man/man1/eagle.1
104 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
105 --set-rpath "${libPath}:$out/eagle-${version}/lib:${lib.getLib stdenv.cc.cc}/lib" \
106 "$out"/eagle-${version}/eagle
109 ln -s "$out"/eagle-${version}/eagle "$out"/bin/eagle
111 # Remove bundled libraries that are available in nixpkgs
112 # TODO: There still may be unused bundled libraries
113 rm "$out"/eagle-${version}/lib/libQt5*.so.5
114 rm "$out"/eagle-${version}/lib/{libxcb-*.so.*,libX*.so.*,libxshmfence.so.1}
115 rm "$out"/eagle-${version}/lib/{libEGL.so.1,libglapi.so.0,libgbm.so.1}
117 # No longer needed (we don't use the bundled Qt libraries)
118 rm -r "$out"/eagle-${version}/libexec
119 rm -r "$out"/eagle-${version}/plugins
122 mkdir -p "$out"/share/applications
123 cp "$desktopItem"/share/applications/* "$out"/share/applications/
124 mkdir -p "$out"/share/pixmaps
125 ln -s "$out/eagle-${version}/bin/eagle-logo.png" "$out"/share/pixmaps/eagle.png
129 description = "Schematic editor and PCB layout tool from Autodesk (formerly CadSoft)";
130 homepage = "https://www.autodesk.com/products/eagle/overview";
131 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
132 license = licenses.unfree;
133 platforms = [ "x86_64-linux" ];