uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
48
pkgs/development/libraries/raylib/default.nix
Normal file
48
pkgs/development/libraries/raylib/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ stdenv, lib, fetchFromGitHub, cmake,
|
||||
mesa, libGLU, glfw,
|
||||
libX11, libXi, libXcursor, libXrandr, libXinerama,
|
||||
alsaSupport ? stdenv.hostPlatform.isLinux, alsa-lib,
|
||||
pulseSupport ? stdenv.hostPlatform.isLinux, libpulseaudio,
|
||||
sharedLib ? true,
|
||||
includeEverything ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "raylib";
|
||||
version = "4.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raysan5";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1mszf5v7qy38cv1fisq6xd9smb765hylhkv1ms9y7shmdl2ni6b7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [
|
||||
mesa libGLU glfw libX11 libXi libXcursor libXrandr libXinerama
|
||||
] ++ lib.optional alsaSupport alsa-lib
|
||||
++ lib.optional pulseSupport libpulseaudio;
|
||||
|
||||
# https://github.com/raysan5/raylib/wiki/CMake-Build-Options
|
||||
cmakeFlags = [
|
||||
"-DUSE_EXTERNAL_GLFW=ON"
|
||||
"-DBUILD_EXAMPLES=OFF"
|
||||
] ++ lib.optional includeEverything "-DINCLUDE_EVERYTHING=ON"
|
||||
++ lib.optional sharedLib "-DBUILD_SHARED_LIBS=ON";
|
||||
|
||||
# fix libasound.so/libpulse.so not being found
|
||||
preFixup = ''
|
||||
${lib.optionalString alsaSupport "patchelf --add-needed ${alsa-lib}/lib/libasound.so $out/lib/libraylib.so.${version}"}
|
||||
${lib.optionalString pulseSupport "patchelf --add-needed ${libpulseaudio}/lib/libpulse.so $out/lib/libraylib.so.${version}"}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple and easy-to-use library to enjoy videogames programming";
|
||||
homepage = "https://www.raylib.com/";
|
||||
license = licenses.zlib;
|
||||
maintainers = with maintainers; [ adamlwgriffiths ];
|
||||
platforms = platforms.linux;
|
||||
changelog = "https://github.com/raysan5/raylib/blob/${version}/CHANGELOG";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue