2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, bsdbuild, libagar, perl, libjpeg, libpng, openssl }:
|
2016-08-25 06:45:10 +01:00
|
|
|
|
|
|
|
let srcs = import ./srcs.nix { inherit fetchurl; }; in
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "libagar-test";
|
2016-08-25 06:45:10 +01:00
|
|
|
inherit (srcs) version src;
|
|
|
|
|
|
|
|
sourceRoot = "agar-1.5.0/tests";
|
|
|
|
|
2022-06-05 20:04:21 +01: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.
|
|
|
|
NIX_CFLAGS_COMPILE = "-fcommon";
|
|
|
|
|
2016-08-25 06:45:10 +01:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace configure.in \
|
|
|
|
--replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
|
|
|
|
cat configure.in | ${bsdbuild}/bin/mkconfigure > configure
|
|
|
|
'';
|
|
|
|
|
2018-07-25 22:44:21 +01:00
|
|
|
configureFlags = [ "--with-agar=${libagar}" ];
|
2016-08-25 06:45:10 +01:00
|
|
|
|
|
|
|
buildInputs = [ perl bsdbuild libagar libjpeg libpng openssl ];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2022-05-29 11:10:05 +01:00
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64);
|
2016-08-25 06:45:10 +01:00
|
|
|
description = "Tests for libagar";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://libagar.org/index.html";
|
2016-08-25 06:45:10 +01:00
|
|
|
license = with licenses; bsd3;
|
|
|
|
maintainers = with maintainers; [ ramkromberg ];
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|