Unverified Commit a211fe04 authored by Francesco Gazzetta's avatar Francesco Gazzetta Committed by GitHub
Browse files

Merge pull request #253638 from Cynerd/jimtcl-sdl-cross

jimtcl: Fix cross compilation and allow disable of SDL
parents f41b8ce6 48926aa4
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -5,12 +5,15 @@
, asciidoc
, pkg-config
, inetutils
, tcl

, sqlite
, readline
, SDL
, SDL_gfx
, openssl

, SDLSupport ? true
}:

stdenv.mkDerivation rec {
@@ -27,15 +30,17 @@ stdenv.mkDerivation rec {
  nativeBuildInputs = [
    pkg-config
    asciidoc
    tcl
  ];

  buildInputs = [
    sqlite
    readline
    openssl
  ] ++ (lib.optionals SDLSupport [
    SDL
    SDL_gfx
    openssl
  ];
  ]);

  configureFlags = [
    "--shared"
@@ -44,11 +49,10 @@ stdenv.mkDerivation rec {
    "--with-ext=binary"
    "--with-ext=sqlite3"
    "--with-ext=readline"
    "--with-ext=sdl"
    "--with-ext=json"
    "--enable-utf8"
    "--ipv6"
  ];
  ] ++ (lib.optional SDLSupport "--with-ext=sdl");

  enableParallelBuilding = true;

@@ -58,6 +62,9 @@ stdenv.mkDerivation rec {
    rm tests/exec2.test
    # requires internet access
    rm tests/ssl.test
    # test fails due to timing in some environments
    # https://github.com/msteveb/jimtcl/issues/282
    rm tests/timer.test
  '';

  # test posix-1.6 needs the "hostname" command