nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 57 lines 1.6 kB view raw
1{ 2 lib, 3 SDL, 4 fetchurl, 5 stdenv, 6 # Boolean flags 7 enableSdltest ? (!stdenv.hostPlatform.isDarwin), 8}: 9 10stdenv.mkDerivation (finalAttrs: { 11 pname = "SDL_gfx"; 12 version = "2.0.27"; 13 14 src = fetchurl { 15 url = "https://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-${finalAttrs.version}.tar.gz"; 16 hash = "sha256-37FaxfjOeklS3BLSrtl0dRjF5rM1wOMWNtI/k8Yw9Bk="; 17 }; 18 19 buildInputs = [ SDL ]; 20 21 # SDL_gfx.pc refers to sdl.pc and some SDL_gfx headers import SDL.h 22 propagatedBuildInputs = [ SDL ]; 23 24 env.SDL_CONFIG = lib.getExe' (lib.getDev SDL) "sdl-config"; 25 26 configureFlags = [ 27 (lib.enableFeature false "mmx") 28 (lib.enableFeature enableSdltest "sdltest") 29 ]; 30 31 strictDeps = true; 32 33 meta = { 34 homepage = "https://sourceforge.net/projects/sdlgfx/"; 35 description = "SDL graphics drawing primitives and support functions"; 36 longDescription = '' 37 The SDL_gfx library evolved out of the SDL_gfxPrimitives code which 38 provided basic drawing routines such as lines, circles or polygons and 39 SDL_rotozoom which implemented a interpolating rotozoomer for SDL 40 surfaces. 41 42 The current components of the SDL_gfx library are: 43 44 - Graphic Primitives (SDL_gfxPrimitves.h) 45 - Rotozoomer (SDL_rotozoom.h) 46 - Framerate control (SDL_framerate.h) 47 - MMX image filters (SDL_imageFilter.h) 48 - Custom Blit functions (SDL_gfxBlitFunc.h) 49 50 The library is backwards compatible to the above mentioned code. Its is 51 written in plain C and can be used in C++ code. 52 ''; 53 license = lib.licenses.zlib; 54 teams = [ lib.teams.sdl ]; 55 inherit (SDL.meta) platforms; 56 }; 57})