4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
36 lines
888 B
Nix
36 lines
888 B
Nix
{ stdenv, lib, fetchFromGitHub, pkgconfig, 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 = [ pkgconfig flex bison ];
|
|
|
|
buildInputs = [ SDL SDL_image SDL_ttf SDL_gfx ];
|
|
|
|
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 ];
|
|
};
|
|
}
|