mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
f9fdf2d402
with structuredAttrs lists will be bash arrays which cannot be exported which will be a issue with some patches and some wrappers like cc-wrapper this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists in env cause a eval failure
36 lines
894 B
Nix
36 lines
894 B
Nix
{ stdenv, lib, fetchFromGitHub, pkg-config, SDL, SDL_image, SDL_ttf, SDL_gfx, flex, bison }:
|
|
|
|
let
|
|
makeSDLFlags = map (p: "-I${lib.getDev p}/include/SDL");
|
|
|
|
in stdenv.mkDerivation rec {
|
|
pname = "xsw";
|
|
version = "0.1.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "andrenho";
|
|
repo = "xsw";
|
|
rev = version;
|
|
sha256 = "092vp61ngd2vscsvyisi7dv6qrk5m1i81gg19hyfl5qvjq5p0p8g";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config flex bison ];
|
|
|
|
buildInputs = [ SDL SDL_image SDL_ttf SDL_gfx ];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString (makeSDLFlags [ SDL SDL_image SDL_ttf SDL_gfx ]);
|
|
|
|
patches = [
|
|
./parse.patch # Fixes compilation error by avoiding redundant definitions.
|
|
];
|
|
|
|
meta = with lib; {
|
|
inherit (src.meta) homepage;
|
|
description = "A slide show presentation tool";
|
|
|
|
platforms = platforms.unix;
|
|
license = licenses.gpl3;
|
|
maintainers = [ maintainers.vrthra ];
|
|
};
|
|
}
|