nixpkgs/pkgs/development/libraries/libagar/default.nix
Jan Malakhovski 591ccfe5b9 treewide: noop: refer to src.name or similar where appropriate, part 3: more use cases
This continues where d8f7f6a5ce 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 d8f7f6a5ce 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-11 09:20:44 +00:00

48 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, pkg-config, libtool, perl, bsdbuild, gettext, mandoc
, libpng, libjpeg, libXinerama, freetype, SDL, libGLU, libGL
, libsndfile, portaudio, libmysqlclient, fontconfig
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libagar";
version = "1.5.0";
src = fetchurl {
url = "http://stable.hypertriton.com/agar/agar-${finalAttrs.version}.tar.gz";
sha256 = "001wcqk5z67qg0raw9zlwmv62drxiwqykvsbk10q2mrc6knjsd42";
};
preConfigure = ''
substituteInPlace configure.in \
--replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
cat configure.in | ${bsdbuild}/bin/mkconfigure > configure
'';
configureFlags = [
"--with-libtool=${libtool}/bin/libtool"
"--enable-nls=yes"
"--with-gettext=${gettext}"
"--with-jpeg=${libjpeg.dev}"
"--with-gl=${libGL}"
"--with-mysql=${libmysqlclient}"
"--with-manpages=yes"
];
outputs = [ "out" "devdoc" ];
nativeBuildInputs = [ pkg-config libtool gettext ];
buildInputs = [
bsdbuild perl libXinerama SDL libGL libmysqlclient mandoc
freetype.dev libpng libjpeg.dev fontconfig portaudio libsndfile
];
meta = with lib; {
description = "Cross-platform GUI toolkit";
homepage = "http://libagar.org/index.html";
license = with licenses; bsd3;
maintainers = with maintainers; [ ramkromberg ];
platforms = with platforms; linux;
};
})