nixpkgs/pkgs/development/libraries/cglm/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
793 B
Nix
Raw Normal View History

2021-06-13 21:10:23 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
pname = "cglm";
2023-08-12 08:35:07 +00:00
version = "0.9.1";
2021-06-13 21:10:23 +00:00
src = fetchFromGitHub {
owner = "recp";
repo = "cglm";
rev = "v${version}";
2023-08-12 08:35:07 +00:00
sha256 = "sha256-qOPOJ+h1bq5yKkP3ZNeZnRwiOMSgS7bxTk7s/5tREQw=";
2021-06-13 21:10:23 +00:00
};
nativeBuildInputs = [ cmake ];
2022-05-16 08:13:38 +00:00
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
'';
2021-06-13 21:10:23 +00:00
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;
};
}