2024-06-05 15:53:02 +00:00
|
|
|
{ lib, stdenv, bsdbuild, libagar, perl, libjpeg, libpng, openssl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "libagar-test";
|
2023-08-22 20:05:09 +00:00
|
|
|
inherit (libagar) version src;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
sourceRoot = "agar-${libagar.version}/tests";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains:
|
|
|
|
# ld: textdlg.o:(.bss+0x0): multiple definition of `someString';
|
|
|
|
# configsettings.o:(.bss+0x0): first defined here
|
|
|
|
# TODO: the workaround can be removed once nixpkgs updates to 1.6.0.
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace configure.in \
|
|
|
|
--replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
|
|
|
|
cat configure.in | ${bsdbuild}/bin/mkconfigure > configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "--with-agar=${libagar}" ];
|
|
|
|
|
|
|
|
buildInputs = [ perl bsdbuild libagar libjpeg libpng openssl ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-09-26 11:04:55 +00:00
|
|
|
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Tests for libagar";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "agartest";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://libagar.org/index.html";
|
|
|
|
license = with licenses; bsd3;
|
|
|
|
maintainers = with maintainers; [ ramkromberg ];
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|