Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 39 lines 1.3 kB view raw
1{ lib, stdenv, fetchFromGitHub, python3, cmake, libglvnd, libGLU, unstableGitUpdater }: 2 3stdenv.mkDerivation rec { 4 pname = "gl3w"; 5 version = "unstable-2022-03-24"; 6 7 src = fetchFromGitHub { 8 owner = "skaslev"; 9 repo = pname; 10 rev = "5f8d7fd191ba22ff2b60c1106d7135bb9a335533"; 11 hash = "sha256-qV/PZmaP5iCHhIzTA2bE4d1RMB6LzRbTsB5gWVvi9bU="; 12 }; 13 14 nativeBuildInputs = [ python3 cmake ]; 15 # gl3w installs a CMake config that when included expects to be able to 16 # build and link against both of these libraries 17 # (the gl3w generated C file gets compiled into the downstream target) 18 propagatedBuildInputs = [ libglvnd libGLU ]; 19 20 dontUseCmakeBuildDir = true; 21 22 # These files must be copied rather than linked since they are considered 23 # outputs for the custom command, and CMake expects to be able to touch them 24 preConfigure = '' 25 mkdir -p include/{GL,KHR} 26 cp ${libglvnd.dev}/include/GL/glcorearb.h include/GL/glcorearb.h 27 cp ${libglvnd.dev}/include/KHR/khrplatform.h include/KHR/khrplatform.h 28 ''; 29 30 passthru.updateScript = unstableGitUpdater { }; 31 32 meta = with lib; { 33 description = "Simple OpenGL core profile loading"; 34 homepage = "https://github.com/skaslev/gl3w"; 35 license = licenses.unlicense; 36 maintainers = with maintainers; [ lilyinstarlight ]; 37 platforms = platforms.unix; 38 }; 39}