depot/third_party/nixpkgs/pkgs/development/libraries/cglm/default.nix
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

33 lines
793 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
pname = "cglm";
version = "0.9.2";
src = fetchFromGitHub {
owner = "recp";
repo = "cglm";
rev = "v${version}";
sha256 = "sha256-jaG+XGbSx5SaNhGFWLh+1WTB+ya3c5tBZYs9xKIRafI=";
};
nativeBuildInputs = [ cmake ];
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
meta = with lib; {
homepage = "https://github.com/recp/cglm";
description = "Highly Optimized Graphics Math (glm) for C";
license = licenses.mit;
maintainers = [ maintainers.ivar ];
platforms = platforms.unix;
};
}