mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
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
33 lines
1.1 KiB
Nix
33 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchurl, cmake, pkgconfig, 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
|
|
(fetchurl {
|
|
url = "https://salsa.debian.org/tux4kids-pkg-team/t4kcommon/raw/f7073fa384f5a725139f54844e59b57338b69dc7/debian/patches/libpng16.patch";
|
|
sha256 = "1lcpkdy5gvxgljg1vkrxych74amq0gramb1snj2831dam48is054";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
buildInputs = [ SDL SDL_image SDL_mixer SDL_net SDL_ttf libpng librsvg libxml2 ];
|
|
|
|
meta = with lib; {
|
|
description = "A library of code shared between tuxmath and tuxtype";
|
|
homepage = "https://github.com/tux4kids/t4kcommon";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = [ maintainers.aanderse ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|