Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / SDL_gpu / default.nix
blobdc52e6afeea777067fbe2094ae09e6875bf6aaa0
1 { lib, stdenv, fetchFromGitHub, cmake, SDL2, libGLU }:
3 stdenv.mkDerivation {
4   pname = "SDL_gpu-unstable";
5   version = "2019-01-24";
7   src = fetchFromGitHub {
8     owner = "grimfang4";
9     repo = "sdl-gpu";
10     rev = "e3d350b325a0e0d0b3007f69ede62313df46c6ef";
11     sha256 = "0kibcaim01inb6xxn4mr6affn4hm50vz9kahb5k9iz8dmdsrhxy1";
12   };
14   nativeBuildInputs = [ cmake ];
15   buildInputs = [ SDL2 libGLU ];
17   cmakeFlags = [
18     "-DSDL_gpu_BUILD_DEMOS=OFF"
19     "-DSDL_gpu_BUILD_TOOLS=OFF"
20     "-DSDL_gpu_BUILD_VIDEO_TEST=OFF"
21     "-DSDL_gpu_BUILD_TESTS=OFF"
22   ];
24   patchPhase = ''
25     sed -ie '210s#''${OUTPUT_DIR}/lib#''${CMAKE_INSTALL_LIBDIR}#' src/CMakeLists.txt
26     sed -ie '213s#''${OUTPUT_DIR}/lib#''${CMAKE_INSTALL_LIBDIR}#' src/CMakeLists.txt
27   '';
29   meta = with lib; {
30     description = "A library for high-performance, modern 2D graphics with SDL written in C";
31     homepage = "https://github.com/grimfang4/sdl-gpu";
32     license = licenses.mit;
33     maintainers = with maintainers; [ pmiddend ];
34     platforms = platforms.linux;
35   };