Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
python3,
|
|
cmake,
|
|
libglvnd,
|
|
libGLU,
|
|
unstableGitUpdater,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "gl3w";
|
|
version = "0-unstable-2025-09-23";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "skaslev";
|
|
repo = "gl3w";
|
|
rev = "97a85e153d7f43c8d2de8b776a33721e238ddb96";
|
|
hash = "sha256-cpB/8qo9dDyKPxD6mRriKGZf7N7ei1oL5JtM4jgXsAw=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
python3
|
|
cmake
|
|
];
|
|
# gl3w installs a CMake config that when included expects to be able to
|
|
# build and link against both of these libraries
|
|
# (the gl3w generated C file gets compiled into the downstream target)
|
|
propagatedBuildInputs = [
|
|
libglvnd
|
|
libGLU
|
|
];
|
|
|
|
dontUseCmakeBuildDir = true;
|
|
|
|
# These files must be copied rather than linked since they are considered
|
|
# outputs for the custom command, and CMake expects to be able to touch them
|
|
preConfigure = ''
|
|
mkdir -p include/{GL,KHR}
|
|
cp ${libglvnd.dev}/include/GL/glcorearb.h include/GL/glcorearb.h
|
|
cp ${libglvnd.dev}/include/KHR/khrplatform.h include/KHR/khrplatform.h
|
|
'';
|
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
meta = with lib; {
|
|
description = "Simple OpenGL core profile loading";
|
|
homepage = "https://github.com/skaslev/gl3w";
|
|
license = licenses.unlicense;
|
|
maintainers = [ ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|