lol
at 23.11-beta 55 lines 2.0 kB view raw
1{ fetchurl, fetchpatch, lib, stdenv, libGLU, libGL, freeglut, SDL 2, libXi, libSM, libXmu, libXext, libX11 }: 3 4stdenv.mkDerivation rec { 5 pname = "plib"; 6 version = "1.8.5"; 7 8 src = fetchurl { 9 # XXX: The author doesn't use the orthodox SF way to store tarballs. 10 url = "https://plib.sourceforge.net/dist/${pname}-${version}.tar.gz"; 11 sha256 = "0cha71mflpa10vh2l7ipyqk67dq2y0k5xbafwdks03fwdyzj4ns8"; 12 }; 13 14 patches = [ 15 (fetchpatch { 16 url = "https://sources.debian.net/data/main/p/plib/1.8.5-7/debian/patches/04_CVE-2011-4620.diff"; 17 sha256 = "1b7y0vqqdzd48q68ldlzw0zzqy9mg4c10a754r4hi3ldjmcplf0j"; 18 }) 19 (fetchpatch { 20 url = "https://sources.debian.net/data/main/p/plib/1.8.5-7/debian/patches/05_CVE-2012-4552.diff"; 21 sha256 = "0b6cwdwii5b5vy78sbw5cw1s96l4jyzr4dk69v63pa0wwi2b5dki"; 22 }) 23 (fetchpatch { 24 url = "https://sources.debian.org/data/main/p/plib/1.8.5-13/debian/patches/08_CVE-2021-38714.patch"; 25 sha256 = "sha256-3f1wZn0QqK/hPWCg1KEzbB95IGoxBjLZoCOFlW98t5w="; 26 }) 27 ]; 28 29 propagatedBuildInputs = [ 30 libGLU libGL freeglut SDL 31 32 # The following libs ought to be propagated build inputs of Mesa. 33 libXi libSM libXmu libXext libX11 34 ]; 35 36 meta = { 37 description = "A suite of portable game libraries"; 38 39 longDescription = '' 40 PLIB includes sound effects, music, a complete 3D engine, font 41 rendering, a simple Windowing library, a game scripting 42 language, a GUI, networking, 3D math library and a collection of 43 handy utility functions. All are 100% portable across nearly 44 all modern computing platforms. What's more, it's all available 45 on line - and completely free. Each library component is fairly 46 independent of the others - so if you want to use SDL, GTK, 47 GLUT, or FLTK instead of PLIB's 'PW' windowing library, you can. 48 ''; 49 50 license = lib.licenses.lgpl2Plus; 51 52 homepage = "https://plib.sourceforge.net/"; 53 platforms = lib.platforms.linux; 54 }; 55}