2020-08-22 08:03:55 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
autoreconfHook,
|
|
|
|
pkg-config,
|
|
|
|
boost,
|
|
|
|
SDL2,
|
|
|
|
SDL2_ttf,
|
|
|
|
SDL2_image,
|
|
|
|
}:
|
|
|
|
|
2023-09-21 08:31:17 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-08-22 08:03:55 +00:00
|
|
|
pname = "libwtk-sdl2";
|
|
|
|
version = "unstable-2023-02-28";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "muesli4";
|
2023-09-21 08:31:17 +00:00
|
|
|
repo = "libwtk-sdl2";
|
2020-08-22 08:03:55 +00:00
|
|
|
rev = "0504f8342c8c97d0c8b43d33751427c564ad8d44";
|
|
|
|
sha256 = "sha256-NAjsDQ4/hklYRfa85uleOr50tmc6UJVo2xiDnEbmIxk=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
SDL2
|
|
|
|
SDL2_ttf
|
|
|
|
SDL2_image
|
|
|
|
];
|
|
|
|
# From some reason, this is needed as otherwise SDL.h is not found
|
|
|
|
NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2";
|
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
"lib"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simplistic SDL2 GUI framework in early developement";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "libwtk-sdl2-test";
|
2020-08-22 08:03:55 +00:00
|
|
|
homepage = "https://github.com/muesli4/libwtk-sdl2";
|
|
|
|
# See: https://github.com/muesli4/mpd-touch-screen-gui/tree/master/LICENSES
|
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
|
|
/*
|
|
|
|
Partial darwin build failure log (from ofborg):
|
|
|
|
geometry.cpp:95:34: error: no member named 'abs' in namespace 'std'
|
|
|
|
> return { std::abs(v.w), std::abs(v.h) };
|
|
|
|
> ~~~~~^
|
|
|
|
*/
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2023-09-21 08:31:17 +00:00
|
|
|
})
|