lol

jimtcl: Fix cross compilation and allow disable of SDL

Jimtcl is dependency of OpenOCD that does not need SDL. For some
embedded systems it is beneficial to not pull in graphics related
dependencies to reduce the size. The second reason is that right now
SDL_gfx is not cross compiling and thus OpenOCD can't be cross compiled
either.

This also fixes cross compilation of Jimtcl itself. The attempt to cross
compile resulted in:

No installed jimsh or tclsh, building local bootstrap jimsh0

The solution here is to add jimtcl to native build dependencies in case
of cross compilation.

+11 -4
+11 -4
pkgs/development/interpreters/jimtcl/default.nix
··· 5 5 , asciidoc 6 6 , pkg-config 7 7 , inetutils 8 + , tcl 8 9 9 10 , sqlite 10 11 , readline 11 12 , SDL 12 13 , SDL_gfx 13 14 , openssl 15 + 16 + , SDLSupport ? true 14 17 }: 15 18 16 19 stdenv.mkDerivation rec { ··· 27 30 nativeBuildInputs = [ 28 31 pkg-config 29 32 asciidoc 33 + tcl 30 34 ]; 31 35 32 36 buildInputs = [ 33 37 sqlite 34 38 readline 39 + openssl 40 + ] ++ (lib.optionals SDLSupport [ 35 41 SDL 36 42 SDL_gfx 37 - openssl 38 - ]; 43 + ]); 39 44 40 45 configureFlags = [ 41 46 "--shared" ··· 44 49 "--with-ext=binary" 45 50 "--with-ext=sqlite3" 46 51 "--with-ext=readline" 47 - "--with-ext=sdl" 48 52 "--with-ext=json" 49 53 "--enable-utf8" 50 54 "--ipv6" 51 - ]; 55 + ] ++ (lib.optional SDLSupport "--with-ext=sdl"); 52 56 53 57 enableParallelBuilding = true; 54 58 ··· 58 62 rm tests/exec2.test 59 63 # requires internet access 60 64 rm tests/ssl.test 65 + # test fails due to timing in some environments 66 + # https://github.com/msteveb/jimtcl/issues/282 67 + rm tests/timer.test 61 68 ''; 62 69 63 70 # test posix-1.6 needs the "hostname" command