diff options
author | rittelle <33598633+rittelle@users.noreply.github.com> | 2018-08-13 00:01:25 +0200 |
---|---|---|
committer | rittelle <33598633+rittelle@users.noreply.github.com> | 2018-08-19 15:36:08 +0200 |
commit | 9e4d2d723abbe76e02945e45d4024ad91d9bc63c (patch) | |
tree | 76e712d0b39b2ab5973dccf78f597471cc2fcdbf /pkgs/applications/science/electronics/eagle | |
parent | d61de06f881b19dec041126f0686f1aff787bc8c (diff) |
eagle: 7.7 -> 9.1.2
Updated eagle to version to 9.1.2 while keeping version 7.7 as eagle7.
Diffstat (limited to 'pkgs/applications/science/electronics/eagle')
-rw-r--r-- | pkgs/applications/science/electronics/eagle/eagle.nix | 83 | ||||
-rw-r--r-- | pkgs/applications/science/electronics/eagle/eagle7.nix (renamed from pkgs/applications/science/electronics/eagle/default.nix) | 2 | ||||
-rw-r--r-- | pkgs/applications/science/electronics/eagle/eagle7_fixer.c (renamed from pkgs/applications/science/electronics/eagle/eagle_fixer.c) | 0 |
3 files changed, 84 insertions, 1 deletions
diff --git a/pkgs/applications/science/electronics/eagle/eagle.nix b/pkgs/applications/science/electronics/eagle/eagle.nix new file mode 100644 index 0000000000000..b97ede4139631 --- /dev/null +++ b/pkgs/applications/science/electronics/eagle/eagle.nix @@ -0,0 +1,83 @@ +{ stdenv, fetchurl, makeDesktopItem, patchelf +, libXrender, libXrandr, libXcursor, libX11, libXext, libXi, libxcb +, cups , libGL, glib, nss, nspr, expat, alsaLib +, qtbase, qtdeclarative, qtsvg, qtlocation, qtwebchannel, qtwebengine +}: + +let + libPath = stdenv.lib.makeLibraryPath + [ libXrender libXrandr libXcursor libX11 libXext libXi libxcb + libGL glib nss nspr expat alsaLib + qtbase qtdeclarative qtsvg qtlocation qtwebchannel qtwebengine + ]; + in + stdenv.mkDerivation rec { + name = "eagle-${version}"; + version = "9.1.2"; + + src = fetchurl { + url = "https://eagle-updates.circuits.io/downloads/${builtins.replaceStrings ["."] ["_"] version}/Autodesk_EAGLE_${version}_English_Linux_64bit.tar.gz"; + sha256 = "0y7ahl9z5a7l9cjk8hzmyv6ga8chlry5rr8v116q5mnsgs4i11an"; + }; + + desktopItem = makeDesktopItem { + name = "eagle"; + exec = "eagle"; + icon = "eagle"; + comment = "Schematic capture and PCB layout"; + desktopName = "Eagle"; + genericName = "Schematic editor"; + categories = "Application;Development;"; + }; + + buildInputs = + [ libXrender libXrandr libXcursor libX11 libXext libXi libxcb + libGL glib nss nspr expat alsaLib + qtbase qtdeclarative qtsvg qtlocation qtwebchannel qtwebengine + ]; + + doConfigure = false; + doBuild = false; + + 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/ + mkdir -p "$out"/share/icons + ln -s "$out/eagle-${version}/bin/eagle-logo.png" "$out"/share/icons/eagle.png + ''; + + meta = with stdenv.lib; { + description = "Schematic editor and PCB layout tool from Autodesk (formerly CadSoft)"; + homepage = https://www.autodesk.com/products/eagle/overview; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + maintainers = [ maintainers.rittelle ]; + }; + } diff --git a/pkgs/applications/science/electronics/eagle/default.nix b/pkgs/applications/science/electronics/eagle/eagle7.nix index b9294ef3639a0..9b8827187b262 100644 --- a/pkgs/applications/science/electronics/eagle/default.nix +++ b/pkgs/applications/science/electronics/eagle/eagle7.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { # Build LD_PRELOAD library that redirects license file access to the home # directory of the user mkdir -p "$out"/lib - gcc -shared -fPIC -DEAGLE_PATH=\"$out/eagle-${version}\" ${./eagle_fixer.c} -o "$out"/lib/eagle_fixer.so -ldl + gcc -shared -fPIC -DEAGLE_PATH=\"$out/eagle-${version}\" ${./eagle7_fixer.c} -o "$out"/lib/eagle_fixer.so -ldl # Make wrapper script dynlinker="$(cat $NIX_CC/nix-support/dynamic-linker)" diff --git a/pkgs/applications/science/electronics/eagle/eagle_fixer.c b/pkgs/applications/science/electronics/eagle/eagle7_fixer.c index da9da4dcbd3aa..da9da4dcbd3aa 100644 --- a/pkgs/applications/science/electronics/eagle/eagle_fixer.c +++ b/pkgs/applications/science/electronics/eagle/eagle7_fixer.c |