2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, mkDerivation, fetchurl, makeDesktopItem
|
2020-04-24 23:36:52 +00:00
|
|
|
, libXrender, libXrandr, libXcursor, libX11, libXext, libXi, libxcb
|
2021-06-28 23:13:55 +00:00
|
|
|
, libGL, glib, nss, nspr, expat, alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, qtbase, qtdeclarative, qtsvg, qtlocation, qtwebchannel, qtwebengine
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-01-17 00:15:33 +00:00
|
|
|
libPath = lib.makeLibraryPath
|
2020-04-24 23:36:52 +00:00
|
|
|
[ libXrender libXrandr libXcursor libX11 libXext libXi libxcb
|
2021-06-28 23:13:55 +00:00
|
|
|
libGL glib nss nspr expat alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
qtbase qtdeclarative qtsvg qtlocation qtwebchannel qtwebengine
|
|
|
|
];
|
|
|
|
in
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "eagle";
|
2020-06-18 07:06:33 +00:00
|
|
|
version = "9.6.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://eagle-updates.circuits.io/downloads/${builtins.replaceStrings ["."] ["_"] version}/Autodesk_EAGLE_${version}_English_Linux_64bit.tar.gz";
|
2020-06-18 07:06:33 +00:00
|
|
|
sha256 = "18syygnskl286kn8aqfzzdsyzq59d2w19y1h1ynyxsnrvkyv71h0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "eagle";
|
|
|
|
exec = "eagle";
|
|
|
|
icon = "eagle";
|
|
|
|
comment = "Schematic capture and PCB layout";
|
|
|
|
desktopName = "Eagle";
|
|
|
|
genericName = "Schematic editor";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Development" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
[ libXrender libXrandr libXcursor libX11 libXext libXi libxcb
|
2021-06-28 23:13:55 +00:00
|
|
|
libGL glib nss nspr expat alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
qtbase qtdeclarative qtsvg qtlocation qtwebchannel qtwebengine
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# Extract eagle tarball
|
|
|
|
mkdir "$out"
|
|
|
|
tar -xzf "$src" -C "$out"
|
|
|
|
|
|
|
|
# Install manpage
|
|
|
|
mkdir -p "$out"/share/man/man1
|
|
|
|
ln -s "$out"/eagle-${version}/doc/eagle.1 "$out"/share/man/man1/eagle.1
|
|
|
|
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${libPath}:$out/eagle-${version}/lib:${stdenv.cc.cc.lib}/lib" \
|
|
|
|
"$out"/eagle-${version}/eagle
|
|
|
|
|
|
|
|
mkdir -p "$out"/bin
|
|
|
|
ln -s "$out"/eagle-${version}/eagle "$out"/bin/eagle
|
|
|
|
|
|
|
|
# Remove bundled libraries that are available in nixpkgs
|
|
|
|
# TODO: There still may be unused bundled libraries
|
|
|
|
rm "$out"/eagle-${version}/lib/libQt5*.so.5
|
|
|
|
rm "$out"/eagle-${version}/lib/{libxcb-*.so.*,libX*.so.*,libxshmfence.so.1}
|
|
|
|
rm "$out"/eagle-${version}/lib/{libEGL.so.1,libglapi.so.0,libgbm.so.1}
|
|
|
|
|
|
|
|
# No longer needed (we don't use the bundled Qt libraries)
|
|
|
|
rm -r "$out"/eagle-${version}/libexec
|
|
|
|
rm -r "$out"/eagle-${version}/plugins
|
|
|
|
|
|
|
|
# Make desktop item
|
|
|
|
mkdir -p "$out"/share/applications
|
|
|
|
cp "$desktopItem"/share/applications/* "$out"/share/applications/
|
2021-08-23 08:02:39 +00:00
|
|
|
mkdir -p "$out"/share/pixmaps
|
|
|
|
ln -s "$out/eagle-${version}/bin/eagle-logo.png" "$out"/share/pixmaps/eagle.png
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Schematic editor and PCB layout tool from Autodesk (formerly CadSoft)";
|
|
|
|
homepage = "https://www.autodesk.com/products/eagle/overview";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|