Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pkgs/by-name/fr/freeglut/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ stdenv.mkDerivation (finalAttrs: {
];

cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
"-DOPENGL_INCLUDE_DIR=${libGLX.dev}/include"
"-DOPENGL_gl_LIBRARY:FILEPATH=${libGLX}/lib/libGL.dylib"
"-DOPENGL_glu_LIBRARY:FILEPATH=${libGLU}/lib/libGLU.dylib"
"-DOPENGL_INCLUDE_DIR=${lib.getInclude libGLX}/include"
"-DOPENGL_gl_LIBRARY:FILEPATH=${lib.getLib libGLX}/lib/libGL.dylib"
"-DFREEGLUT_BUILD_DEMOS:BOOL=OFF"
"-DFREEGLUT_BUILD_STATIC:BOOL=OFF"
];

passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
Expand Down
14 changes: 0 additions & 14 deletions pkgs/by-name/re/renpy/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,6 @@ stdenv.mkDerivation (finalAttrs: {
tkinter
]);

RENPY_DEPS_INSTALL = lib.concatStringsSep "::" [
ffmpeg.lib
freetype
fribidi
glew.dev
harfbuzz.dev
libGL
libGLU
libpng
SDL2
(lib.getDev SDL2)
zlib
];

enableParallelBuilding = true;

patches = [
Expand Down
8 changes: 4 additions & 4 deletions pkgs/by-name/sn/snes9x/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
cmake,
fetchFromGitHub,
gtkmm3,
libGL,
libGLX,
libX11,
libXdmcp,
libXext,
Expand Down Expand Up @@ -91,11 +91,11 @@ stdenv.mkDerivation (finalAttrs: {
"--enable-avx2"
];

postPatch = ''
postPatch = lib.optionalString withGtk ''
substituteInPlace external/glad/src/egl.c \
--replace-fail libEGL.so.1 "${lib.getLib libGL}/lib/libEGL.so.1"
--replace-fail libEGL.so.1 "${lib.getLib libGLX}/lib/libEGL.so.1"
substituteInPlace external/glad/src/glx.c \
--replace-fail libGL.so.1 ${lib.getLib libGL}/lib/libGL.so.1
--replace-fail libGL.so.1 ${lib.getLib libGLX}/lib/libGL.so.1
'';

preConfigure = ''
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/python-modules/pyglet/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ buildPythonPackage rec {
homepage = "http://www.pyglet.org/";
description = "Cross-platform windowing and multimedia library";
license = licenses.bsd3;
inherit (mesa.meta) platforms;
# The patch needs adjusting for non‐Linux platforms.
platforms = platforms.linux;
};
}
6 changes: 0 additions & 6 deletions pkgs/development/python-modules/pythonocc-core/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ stdenv.mkDerivation rec {
hash = "sha256-0o2PQEN0/Z7FUPZEo2HxFFa+mN2bZnYI++HVu4ONpNA=";
};

postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "/usr/X11R6/lib/libGL.dylib" "${libGL}/lib/libGL.dylib" \
--replace "/usr/X11R6/lib/libGLU.dylib" "${libGLU}/lib/libGLU.dylib"
'';

nativeBuildInputs = [
cmake
swig
Expand Down
4 changes: 3 additions & 1 deletion pkgs/kde/lib/mk-kde-derivation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ let
attrName: attrValue:
let
pretty = lib.generators.toPretty { };
duplicates = builtins.filter (dep: (builtins.elem (lib.getName dep) filteredDepNames)) attrValue;
duplicates = builtins.filter (
dep: dep != null && builtins.elem (lib.getName dep) filteredDepNames
) attrValue;
in
if duplicates != [ ] then
lib.warn "Duplicate dependencies in ${attrName} of package ${pname}: ${pretty duplicates}"
Expand Down
34 changes: 19 additions & 15 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9785,38 +9785,42 @@ with pkgs;
#
# Android NDK provides an OpenGL implementation, we can just use that.
#
# On macOS, we use the OpenGL framework. Packages that still need GLX
# specifically can pull in libGLX instead. If you have a package that
# should work without X11 but it can’t find the library, it may help
# to add the path to `NIX_CFLAGS_COMPILE`:
# On macOS, the SDK provides the OpenGL framework in `stdenv`.
# Packages that still need GLX specifically can pull in `libGLX`
# instead. If you have a package that should work without X11 but it
# can’t find the library, it may help to add the path to
# `$NIX_CFLAGS_COMPILE`:
#
# -L${libGL}/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
# preConfigure = ''
# export NIX_CFLAGS_COMPILE+=" -L$SDKROOT/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries"
# '';
#
# If you still can’t get it working, please don’t hesitate to ping
# @NixOS/darwin-maintainers to ask an expert to take a look.
libGL =
if stdenv.hostPlatform.useAndroidPrebuilt then
stdenv
else if stdenv.hostPlatform.isDarwin then
darwin.apple_sdk.frameworks.OpenGL
null
else
libglvnd;

# On macOS, we use the OpenGL framework. Packages that use libGLX on
# macOS may need to depend on mesa_glu directly if this doesn’t work.
libGLU = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk.frameworks.OpenGL else mesa_glu;
# On macOS, the SDK provides the OpenGL framework in `stdenv`.
# Packages that use `libGLX` on macOS may need to depend on
# `mesa_glu` directly if this doesn’t work.
libGLU = if stdenv.hostPlatform.isDarwin then null else mesa_glu;

# libglvnd does not work (yet?) on macOS.
# `libglvnd` does not work (yet?) on macOS.
libGLX = if stdenv.hostPlatform.isDarwin then mesa else libglvnd;

# On macOS, we use the GLUT framework. Packages that use libGLX on
# macOS may need to depend on freeglut directly if this doesn’t work.
libglut = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk.frameworks.GLUT else freeglut;
# On macOS, the SDK provides the GLUT framework in `stdenv`. Packages
# that use `libGLX` on macOS may need to depend on `freeglut`
# directly if this doesn’t work.
libglut = if stdenv.hostPlatform.isDarwin then null else freeglut;

mesa =
if stdenv.hostPlatform.isDarwin then
callPackage ../development/libraries/mesa/darwin.nix {
}
callPackage ../development/libraries/mesa/darwin.nix { }
else
callPackage ../development/libraries/mesa { };

Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/perl-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26609,6 +26609,7 @@ with self;
artistic1
gpl1Plus
]; # taken from EPEL
badPlatforms = lib.platforms.darwin;
};
};

Expand Down