Files
nixpkgs/pkgs/by-name/t4/t4kcommon/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
SDL,
SDL_image,
SDL_mixer,
SDL_net,
SDL_ttf,
libpng,
librsvg,
libxml2,
}:
stdenv.mkDerivation rec {
version = "0.1.1";
pname = "t4kcommon";
src = fetchFromGitHub {
owner = "tux4kids";
repo = "t4kcommon";
rev = "upstream/${version}";
sha256 = "13q02xpmps9qg8zrzzy2gzv4a6afgi28lxk4z242j780v0gphchp";
};
patches = [
# patch from debian to support libpng16 instead of libpng12
(fetchpatch {
url = "https://salsa.debian.org/tux4kids-pkg-team/t4kcommon/raw/f7073fa384f5a725139f54844e59b57338b69dc7/debian/patches/libpng16.patch";
hash = "sha256-auQ8VvOyvLE1PD2dfeHZJV+MzIt1OtUa7OcOqsXTAYI=";
})
];
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: CMakeFiles/t4k_common.dir/t4k_throttle.c.o:(.bss+0x0): multiple definition of
# `wrapped_lines'; CMakeFiles/t4k_common.dir/t4k_audio.c.o:(.bss+0x0): first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon -DGNULIB_UNISTR_U8_MBTOUC_UNSAFE -Wno-incompatible-pointer-types";
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
SDL
SDL_image
SDL_mixer
SDL_net
SDL_ttf
libpng
librsvg
libxml2
];
meta = with lib; {
description = "Library of code shared between tuxmath and tuxtype";
homepage = "https://github.com/tux4kids/t4kcommon";
license = licenses.gpl3Plus;
maintainers = [ ];
platforms = platforms.linux;
};
}