2024-05-20 03:17:03 +00:00
|
|
|
{ lib, stdenv, bsdbuild, libagar, perl, libjpeg, libpng, openssl }:
|
2016-08-25 05:45:10 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libagar-test";
|
treewide: noop: refer to `src.name` or similar where appropriate, part 3: more use cases
This continues where d8f7f6a5cee067b81bfaaa3aa079adb94ed7c01e left off. Similarly
to that commit, this commit this also points `sourceRoot`s to `src.name` and similar
instead of keeping hardcoded names, and edits other derivation attrs do do the same,
where appropriate.
Also, similarly to d8f7f6a5cee067b81bfaaa3aa079adb94ed7c01e some of expressions this
edits use `srcs` attribute with customly-named sources, so they have to be moved
into `let` blocks to keep evaluation efficient (the other, worse, way to do this
would to recurcively refer to `elemAt n finalAttrs.srcs` or, similarly, with `rec`).
2023-08-08 17:18:01 +00:00
|
|
|
inherit (libagar) version src;
|
2016-08-25 05:45:10 +00:00
|
|
|
|
treewide: noop: refer to `src.name` or similar where appropriate, part 3: more use cases
This continues where d8f7f6a5cee067b81bfaaa3aa079adb94ed7c01e left off. Similarly
to that commit, this commit this also points `sourceRoot`s to `src.name` and similar
instead of keeping hardcoded names, and edits other derivation attrs do do the same,
where appropriate.
Also, similarly to d8f7f6a5cee067b81bfaaa3aa079adb94ed7c01e some of expressions this
edits use `srcs` attribute with customly-named sources, so they have to be moved
into `let` blocks to keep evaluation efficient (the other, worse, way to do this
would to recurcively refer to `elemAt n finalAttrs.srcs` or, similarly, with `rec`).
2023-08-08 17:18:01 +00:00
|
|
|
sourceRoot = "agar-${libagar.version}/tests";
|
2016-08-25 05:45:10 +00:00
|
|
|
|
2022-06-05 19:04:21 +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-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-06-05 19:04:21 +00:00
|
|
|
|
2016-08-25 05:45:10 +00:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace configure.in \
|
|
|
|
--replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
|
|
|
|
cat configure.in | ${bsdbuild}/bin/mkconfigure > configure
|
|
|
|
'';
|
|
|
|
|
2018-07-25 21:44:21 +00:00
|
|
|
configureFlags = [ "--with-agar=${libagar}" ];
|
2016-08-25 05:45:10 +00:00
|
|
|
|
|
|
|
buildInputs = [ perl bsdbuild libagar libjpeg libpng openssl ];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2024-09-24 15:50:49 +00:00
|
|
|
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
|
2016-08-25 05:45:10 +00:00
|
|
|
description = "Tests for libagar";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "agartest";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://libagar.org/index.html";
|
2016-08-25 05:45:10 +00:00
|
|
|
license = with licenses; bsd3;
|
|
|
|
maintainers = with maintainers; [ ramkromberg ];
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|