Files
nixpkgs/pkgs/development/libraries/libagar/libagar_test.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

51 lines
1.2 KiB
Nix

{
lib,
stdenv,
bsdbuild,
libagar,
perl,
libjpeg,
libpng,
openssl,
}:
stdenv.mkDerivation {
pname = "libagar-test";
inherit (libagar) version src;
sourceRoot = "agar-${libagar.version}/tests";
# 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.
env.NIX_CFLAGS_COMPILE = "-fcommon";
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
];
meta = {
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
description = "Tests for libagar";
mainProgram = "agartest";
homepage = "http://libagar.org/index.html";
license = with lib.licenses; bsd3;
maintainers = with lib.maintainers; [ ramkromberg ];
platforms = with lib.platforms; linux;
};
}