Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / cglm / default.nix
blobf9bc0ebb9083ce39b0fa342b7616631d73893923
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , cmake
5 }:
7 stdenv.mkDerivation rec {
8   pname = "cglm";
9   version = "0.9.1";
11   src = fetchFromGitHub {
12     owner = "recp";
13     repo = "cglm";
14     rev = "v${version}";
15     sha256 = "sha256-qOPOJ+h1bq5yKkP3ZNeZnRwiOMSgS7bxTk7s/5tREQw=";
16   };
18   nativeBuildInputs = [ cmake ];
20   postPatch = ''
21     substituteInPlace CMakeLists.txt \
22       --replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
23       --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
24   '';
26   meta = with lib; {
27     homepage = "https://github.com/recp/cglm";
28     description = "Highly Optimized Graphics Math (glm) for C";
29     license = licenses.mit;
30     maintainers = [ maintainers.ivar ];
31     platforms = platforms.unix;
32   };