Merge pull request #107530 from raboof/arduino-gtk3

This commit is contained in:
Doron Behar 2020-12-25 12:38:33 +02:00 committed by GitHub
commit 7ea55a099a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -11,7 +11,8 @@
, ncurses , ncurses
, readline , readline
, withGui ? false , withGui ? false
, gtk2 ? null , gtk3 ? null
, wrapGAppsHook
, withTeensyduino ? false , withTeensyduino ? false
/* Packages needed for Teensyduino */ /* Packages needed for Teensyduino */
, upx , upx
@ -29,7 +30,7 @@
, udev , udev
}: }:
assert withGui -> gtk2 != null; assert withGui -> gtk3 != null && wrapGAppsHook != null;
assert withTeensyduino -> withGui; assert withTeensyduino -> withGui;
let let
externalDownloads = import ./downloads.nix { externalDownloads = import ./downloads.nix {
@ -55,7 +56,7 @@ let
gcc.cc.lib gcc.cc.lib
gdk-pixbuf gdk-pixbuf
glib glib
gtk2 gtk3
libpng12 libpng12
libusb-compat-0_1 libusb-compat-0_1
pango pango
@ -111,6 +112,7 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ wrapGAppsHook ];
buildInputs = [ buildInputs = [
jdk jdk
ant ant
@ -149,7 +151,7 @@ stdenv.mkDerivation rec {
# This will be patched into `arduino` wrapper script # This will be patched into `arduino` wrapper script
# Java loads gtk dynamically, so we need to provide it using LD_LIBRARY_PATH # Java loads gtk dynamically, so we need to provide it using LD_LIBRARY_PATH
dynamicLibraryPath = lib.makeLibraryPath [ gtk2 ]; dynamicLibraryPath = lib.makeLibraryPath [ gtk3 ];
javaPath = lib.makeBinPath [ jdk ]; javaPath = lib.makeBinPath [ jdk ];
# Everything else will be patched into rpath # Everything else will be patched into rpath