Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 10 additions & 28 deletions pkgs/by-name/li/libagar/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,36 @@
fetchurl,
pkg-config,
libtool,
perl,
bsdbuild,
gettext,
mandoc,
libpng,
libjpeg,
libxinerama,
freetype,
SDL,
libGL,
libsndfile,
portaudio,
libmysqlclient,
fontconfig,
perl,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "libagar";
version = "1.5.0";
version = "1.7.1";

src = fetchurl {
url = "https://stable.hypertriton.com/agar/agar-${finalAttrs.version}.tar.gz";
sha256 = "001wcqk5z67qg0raw9zlwmv62drxiwqykvsbk10q2mrc6knjsd42";
hash = "sha256-0euZTIJizXDfHU2UYsVFMInbXcgV0BtXZ1CMKSOlllw=";
};

preConfigure = ''
substituteInPlace configure.in \
--replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
cat configure.in | ${bsdbuild}/bin/mkconfigure > configure
substituteInPlace configure \
--replace-fail '_BSD_SOURCE' '_DEFAULT_SOURCE'
'';

configureFlags = [
"--with-libtool=${libtool}/bin/libtool"
"--enable-nls=yes"
"--with-gettext=${gettext}"
"--enable-nls=no"
"--with-jpeg=${libjpeg.dev}"
"--with-gl=${libGL}"
"--with-mysql=${libmysqlclient}"
"--with-manpages=yes"
];

outputs = [
"out"
"devdoc"
];

nativeBuildInputs = [
Expand All @@ -57,26 +43,22 @@ stdenv.mkDerivation (finalAttrs: {
];

buildInputs = [
bsdbuild
perl
libxinerama
SDL
libGL
libmysqlclient
mandoc
freetype.dev
freetype
libpng
libjpeg.dev
libjpeg
fontconfig
portaudio
libsndfile
];

meta = {
description = "Cross-platform GUI toolkit";
homepage = "http://libagar.org/index.html";
license = with lib.licenses; bsd3;
license = with lib.licenses; [ bsd3 ];
maintainers = with lib.maintainers; [ ramkromberg ];
platforms = with lib.platforms; linux;
platforms = lib.platforms.linux;
};
})
21 changes: 3 additions & 18 deletions pkgs/by-name/li/libagar_test/package.nix
Original file line number Diff line number Diff line change
@@ -1,50 +1,35 @@
{
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;
license = with lib.licenses; [ bsd3 ];
maintainers = with lib.maintainers; [ ramkromberg ];
platforms = with lib.platforms; linux;
platforms = lib.platforms.linux;
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
};
}
Loading