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
32
pkgs/development/libraries/glfw/2.x.nix
Normal file
32
pkgs/development/libraries/glfw/2.x.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchurl, libGLU, libGL, libX11, libXext }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "glfw";
|
||||
version = "2.7.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/glfw/glfw-${version}.tar.bz2";
|
||||
sha256 = "17c2msdcb7pn3p8f83805h1c216bmdqnbn9hgzr1j8wnwjcpxx6i";
|
||||
};
|
||||
|
||||
buildInputs = [ libGLU libGL libX11 libXext ];
|
||||
|
||||
buildPhase = ''
|
||||
make x11
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
make x11-dist-install PREFIX=$out
|
||||
mv $out/lib/libglfw.so $out/lib/libglfw.so.2
|
||||
ln -s libglfw.so.2 $out/lib/libglfw.so
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multi-platform library for creating OpenGL contexts and managing input, including keyboard, mouse, joystick and time";
|
||||
homepage = "http://glfw.sourceforge.net/";
|
||||
license = licenses.zlib;
|
||||
maintainers = [ lib.maintainers.marcweber ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
55
pkgs/development/libraries/glfw/3.x.nix
Normal file
55
pkgs/development/libraries/glfw/3.x.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ stdenv, lib, fetchFromGitHub, cmake
|
||||
, libGL, libXrandr, libXinerama, libXcursor, libX11, libXi, libXext
|
||||
, Cocoa, Kernel, fixDarwinDylibNames
|
||||
, waylandSupport ? false, extra-cmake-modules, wayland
|
||||
, wayland-protocols, libxkbcommon
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.3.7";
|
||||
pname = "glfw";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "glfw";
|
||||
repo = "GLFW";
|
||||
rev = version;
|
||||
sha256 = "sha256-aWwt6FRq/ofQmZAeavDa8inrJfrPxb8iyo1XYdQsrKc=";
|
||||
};
|
||||
|
||||
# Fix linkage issues on X11 (https://github.com/NixOS/nixpkgs/issues/142583)
|
||||
patches = lib.optional (!waylandSupport) ./x11.patch;
|
||||
|
||||
propagatedBuildInputs = [ libGL ];
|
||||
|
||||
nativeBuildInputs = [ cmake ]
|
||||
++ lib.optional stdenv.isDarwin fixDarwinDylibNames
|
||||
++ lib.optional waylandSupport extra-cmake-modules;
|
||||
|
||||
buildInputs =
|
||||
if waylandSupport
|
||||
then [ wayland wayland-protocols libxkbcommon ]
|
||||
else [ libX11 libXrandr libXinerama libXcursor libXi libXext ]
|
||||
++ lib.optionals stdenv.isDarwin [ Cocoa Kernel ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
"-DCMAKE_C_FLAGS=-D_GLFW_GLX_LIBRARY='\"${lib.getLib libGL}/lib/libGL.so.1\"'"
|
||||
] ++ lib.optionals waylandSupport [
|
||||
"-DGLFW_USE_WAYLAND=ON"
|
||||
"-DCMAKE_C_FLAGS=-D_GLFW_EGL_LIBRARY='\"${lib.getLib libGL}/lib/libEGL.so.1\"'"
|
||||
];
|
||||
|
||||
postPatch = lib.optionalString waylandSupport ''
|
||||
substituteInPlace src/wl_init.c \
|
||||
--replace "libxkbcommon.so.0" "${lib.getLib libxkbcommon}/lib/libxkbcommon.so.0"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multi-platform library for creating OpenGL contexts and managing input, including keyboard, mouse, joystick and time";
|
||||
homepage = "https://www.glfw.org/";
|
||||
license = licenses.zlib;
|
||||
maintainers = with maintainers; [ marcweber twey ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
25
pkgs/development/libraries/glfw/wayland.patch
Normal file
25
pkgs/development/libraries/glfw/wayland.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From 46fb81c69e8acdb70907409f98dd01e387408414 Mon Sep 17 00:00:00 2001
|
||||
From: Stone Tickle <lattis@mochiro.moe>
|
||||
Date: Fri, 5 Jun 2020 12:51:25 +0900
|
||||
Subject: [PATCH] set O_NONBLOCK on repeat timerfd
|
||||
|
||||
---
|
||||
src/wl_init.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/wl_init.c b/src/wl_init.c
|
||||
index 49e7cc52..43569bef 100644
|
||||
--- a/src/wl_init.c
|
||||
+++ b/src/wl_init.c
|
||||
@@ -1166,7 +1166,7 @@ int _glfwPlatformInit(void)
|
||||
|
||||
_glfw.wl.timerfd = -1;
|
||||
if (_glfw.wl.seatVersion >= 4)
|
||||
- _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
|
||||
+ _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
|
||||
|
||||
if (_glfw.wl.pointer && _glfw.wl.shm)
|
||||
{
|
||||
--
|
||||
2.31.1
|
||||
|
||||
18
pkgs/development/libraries/glfw/x11.patch
Normal file
18
pkgs/development/libraries/glfw/x11.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index a0be580e..ba143851 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -219,6 +219,13 @@ if (GLFW_BUILD_X11)
|
||||
if (NOT X11_Xshape_INCLUDE_PATH)
|
||||
message(FATAL_ERROR "X Shape headers not found; install libxext development package")
|
||||
endif()
|
||||
+
|
||||
+ target_link_libraries(glfw PRIVATE ${X11_Xrandr_LIB}
|
||||
+ ${X11_Xinerama_LIB}
|
||||
+ ${X11_Xkb_LIB}
|
||||
+ ${X11_Xcursor_LIB}
|
||||
+ ${X11_Xi_LIB}
|
||||
+ ${X11_Xshape_LIB})
|
||||
endif()
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
Loading…
Add table
Add a link
Reference in a new issue