mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
glm: 0.9.8.4 -> 0.9.8.5, clean up build
This commit is contained in:
parent
87e71f22c8
commit
02545a64a9
@ -1,34 +1,28 @@
|
|||||||
{ stdenv, fetchurl, unzip, cmake }:
|
{ stdenv, fetchzip, cmake }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.9.8.4";
|
version = "0.9.8.5";
|
||||||
name = "glm-${version}";
|
name = "glm-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchzip {
|
||||||
url = "https://github.com/g-truc/glm/releases/download/${version}/${name}.zip";
|
url = "https://github.com/g-truc/glm/releases/download/${version}/${name}.zip";
|
||||||
sha256 = "1c9cflvx0b16qxh3izk6siqldp9q8qlrznk14br3jdyhnr2gbdx9";
|
sha256 = "0dkfj4hin3am9fxgcvwr5gj0h9y52x7wa03lfwb3q0bvaj1rsly2";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ unzip cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
outputs = [ "out" "doc" ];
|
outputs = [ "out" "doc" ];
|
||||||
|
|
||||||
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
cmakeConfigureFlags = [ "-DGLM_INSTALL_ENABLE=off" ];
|
||||||
|
|
||||||
buildPhase = ''
|
postPatch = ''
|
||||||
set -x
|
substituteInPlace CMakeLists.txt \
|
||||||
cmake CMakeLists.txt -DCMAKE_INSTALL_PREFIX:PATH=$out
|
--replace '"''${CMAKE_CURRENT_BINARY_DIR}/''${GLM_INSTALL_CONFIGDIR}' '"''${GLM_INSTALL_CONFIGDIR}'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
postInstall = ''
|
||||||
mkdir -p $out/lib/pkgconfig
|
mkdir -p $doc/share/doc/glm
|
||||||
cp glm.pc $out/lib/pkgconfig
|
cp -rv $NIX_BUILD_TOP/$sourceRoot/doc/* $doc/share/doc/glm
|
||||||
|
|
||||||
mkdir -p "$out/include"
|
|
||||||
cp -r glm "$out/include"
|
|
||||||
|
|
||||||
mkdir -p "$doc/share/doc/glm"
|
|
||||||
cp -r doc/* "$doc/share/doc/glm"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user