Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 bsdbuild, 5 libagar, 6 perl, 7 libjpeg, 8 libpng, 9 openssl, 10}: 11 12stdenv.mkDerivation { 13 pname = "libagar-test"; 14 inherit (libagar) version src; 15 16 sourceRoot = "agar-${libagar.version}/tests"; 17 18 # Workaround build failure on -fno-common toolchains: 19 # ld: textdlg.o:(.bss+0x0): multiple definition of `someString'; 20 # configsettings.o:(.bss+0x0): first defined here 21 # TODO: the workaround can be removed once nixpkgs updates to 1.6.0. 22 env.NIX_CFLAGS_COMPILE = "-fcommon"; 23 24 preConfigure = '' 25 substituteInPlace configure.in \ 26 --replace '_BSD_SOURCE' '_DEFAULT_SOURCE' 27 cat configure.in | ${bsdbuild}/bin/mkconfigure > configure 28 ''; 29 30 configureFlags = [ "--with-agar=${libagar}" ]; 31 32 buildInputs = [ 33 perl 34 bsdbuild 35 libagar 36 libjpeg 37 libpng 38 openssl 39 ]; 40 41 meta = with lib; { 42 broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); 43 description = "Tests for libagar"; 44 mainProgram = "agartest"; 45 homepage = "http://libagar.org/index.html"; 46 license = with licenses; bsd3; 47 maintainers = with maintainers; [ ramkromberg ]; 48 platforms = with platforms; linux; 49 }; 50}