Skip to content

Commit

Permalink
Merge pull request #308379 from atorres1985-contrib/SDL
Browse files Browse the repository at this point in the history
SDL: adoptions and refactors
  • Loading branch information
pbsds committed Jun 6, 2024
2 parents c0526b1 + 5b8c9b5 commit 54908bc
Show file tree
Hide file tree
Showing 38 changed files with 949 additions and 613 deletions.
6 changes: 6 additions & 0 deletions maintainers/team-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,12 @@ with lib.maintainers; {
shortName = "SageMath";
};

sdl = {
members = [ ];
scope = "Maintain SDL libraries.";
shortName = "SDL";
};

sphinx = {
members = [ ];
scope = "Maintain Sphinx related packages.";
Expand Down
28 changes: 0 additions & 28 deletions pkgs/applications/misc/vp/default.nix

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
{ lib, stdenv, fetchurl, fetchpatch, scons, pkg-config, SDL, libGL, zlib, smpeg
, SDL_image, libvorbis, expat, zip, lua }:
{
lib,
SDL,
SDL_image,
expat,
fetchpatch,
fetchurl,
libGL,
libvorbis,
lua,
pkg-config,
scons,
smpeg,
stdenv,
zip,
zlib,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "btanks";
version = "0.9.8083";

src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
url = "mirror://sourceforge/btanks/btanks-${finalAttrs.version}.tar.bz2";
hash = "sha256-P9LOaitF96YMOxFPqa/xPLPdn7tqZc3JeYt2xPosQ0E=";
};

nativeBuildInputs = [ scons pkg-config ];

buildInputs = [ SDL libGL zlib smpeg SDL_image libvorbis expat zip lua ];

enableParallelBuilding = true;

env.NIX_CFLAGS_COMPILE = "-I${SDL_image}/include/SDL";

patches = [
(fetchpatch {
name = "lua52.patch";
Expand All @@ -42,10 +49,37 @@ stdenv.mkDerivation rec {
})
];

meta = with lib; {
description = "Fast 2d tank arcade game";
nativeBuildInputs = [
SDL
pkg-config
scons
smpeg
zip
];

buildInputs = [
SDL
SDL_image
expat
libGL
libvorbis
lua
smpeg
zlib
];

env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL_image}/include/SDL";

enableParallelBuilding = true;

strictDeps = true;

meta = {
homepage = "https://sourceforge.net/projects/btanks/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
description = "Fast 2d tank arcade game with multiplayer and split-screen modes";
license = lib.licenses.gpl2Plus;
mainProgram = "btanks";
maintainers = with lib.maintainers; [ AndersonTorres ];
inherit (SDL.meta) platforms;
};
}
})
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
{ lib
, stdenv
, fetchurl
, guile
, lzip
, pkg-config
, SDL
, SDL_image
, SDL_mixer
, SDL_ttf
, buildEnv
{
lib,
SDL,
SDL_image,
SDL_mixer,
SDL_ttf,
buildEnv,
fetchurl,
guile,
lzip,
pkg-config,
stdenv,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "guile-sdl";
version = "0.6.1";

src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.lz";
url = "mirror://gnu/guile-sdl/guile-sdl-${finalAttrs.version}.tar.lz";
hash = "sha256-/9sTTvntkRXck3FoRalROjqUQC8hkePtLTnHNZotKOE=";
};

strictDeps = true;

nativeBuildInputs = [
SDL
guile
lzip
pkg-config
SDL
];

buildInputs = [
guile
(lib.getDev SDL)
SDL_image
SDL_mixer
SDL_ttf
(lib.getDev SDL_image)
(lib.getDev SDL_mixer)
(lib.getDev SDL_ttf)
guile
];

makeFlags =
let
sdl-env = buildEnv {
name = "sdl-env";
paths = buildInputs;
paths = finalAttrs.buildInputs;
};
in
[
"SDLMINUSI=-I${sdl-env}/include/SDL"
];

meta = with lib; {
strictDeps = true;

meta = {
homepage = "https://www.gnu.org/software/guile-sdl/";
description = "Guile bindings for SDL";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ vyp ];
platforms = guile.meta.platforms;
# configure: error: *** SDL version not found!
broken = stdenv.isDarwin;
license = lib.licenses.gpl3Plus;
maintainers = lib.teams.sdl.members
++ (with lib.maintainers; [ ]);
inherit (guile.meta) platforms;
};
}
})
67 changes: 67 additions & 0 deletions pkgs/by-name/on/onscripter-en/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
lib,
SDL,
SDL_image,
SDL_mixer,
SDL_ttf,
fetchFromGitHub,
freetype,
libjpeg,
libogg,
libpng,
libvorbis,
pkg-config,
smpeg,
stdenv,
}:


stdenv.mkDerivation (finalAttrs: {
pname = "onscripter-en";
version = "20110930";

# The website is not available now. Let's use a Museoa backup
src = fetchFromGitHub {
owner = "museoa";
repo = "onscripter-en";
rev = finalAttrs.version;
hash = "sha256-Lc5ZlH2C4ER02NmQ6icfiqpzVQdVUnOmdywGjjjSYSg=";
};

nativeBuildInputs = [
SDL
pkg-config
smpeg
];

buildInputs = [
SDL
SDL_image
SDL_mixer
SDL_ttf
freetype
libjpeg
libogg
libpng
libvorbis
smpeg
];

configureFlags = [ "--no-werror" ];

strictDeps = true;

preBuild = ''
sed -i 's/.dll//g' Makefile
'';

meta = {
homepage = "http://github.com/museoa/onscripter-en";
description = "Japanese visual novel scripting engine";
license = lib.licenses.gpl2Plus;
mainProgram = "onscripter-en";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
broken = stdenv.isDarwin;
};
})
48 changes: 25 additions & 23 deletions pkgs/by-name/sd/SDL2_Pango/package.nix
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, pkg-config
, freetype
, pango
, SDL2
, darwin
{
lib,
SDL2,
autoreconfHook,
darwin,
fetchFromGitHub,
freetype,
pango,
pkg-config,
stdenv,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "sdl2-pango";
version = "2.1.5";

src = fetchFromGitHub {
owner = "markuskimius";
repo = "SDL2_Pango";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-8SL5ylxi87TuKreC8m2kxlLr8rcmwYYvwkp4vQZ9dkc=";
};

outputs = [ "out" "dev" ];

strictDeps = true;

nativeBuildInputs = [
SDL2
autoreconfHook
pkg-config
SDL2
];

buildInputs = [
SDL2
freetype
pango
SDL2
] ++ lib.optionals stdenv.isDarwin [
darwin.libobjc
];

meta = with lib; {
description = "A library for graphically rendering internationalized and tagged text in SDL2 using TrueType fonts";
outputs = [ "out" "dev" ];

strictDeps = true;

meta = {
homepage = "https://github.com/markuskimius/SDL2_Pango";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ rardiol ];
platforms = platforms.all;
description = "A library for graphically rendering internationalized and tagged text in SDL2 using TrueType fonts";
license = lib.licenses.lgpl21Plus;
maintainers = lib.teams.sdl.members
++ (with lib.maintainers; [ rardiol ]);
inherit (SDL2.meta) platforms;
};
}
})
Loading

0 comments on commit 54908bc

Please sign in to comment.