From d4a72a39355e0de7fed3317bec95b5a83f5192c9 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 30 Aug 2024 08:34:22 +0200 Subject: [PATCH] lib.platforms.mesaPlatforms: remove Mesa is a package like any other. There's no reason for it to be a special case with its platforms listed in lib, because if other packages want to refer to mesa's platforms, they can access the platforms from the package meta like they would for any other package. --- lib/systems/doubles.nix | 2 -- pkgs/applications/science/astronomy/gravit/default.nix | 4 ++-- pkgs/applications/science/chemistry/avogadro2/default.nix | 4 ++-- pkgs/development/libraries/SDL2/default.nix | 2 +- pkgs/development/libraries/SDL_compat/default.nix | 3 ++- pkgs/development/libraries/fox/fox-1.6.nix | 3 ++- pkgs/development/libraries/glew/1.10.nix | 3 ++- pkgs/development/libraries/glew/default.nix | 5 +++-- pkgs/development/libraries/libdevil/default.nix | 3 ++- pkgs/development/libraries/mesa/common.nix | 6 +++++- pkgs/development/libraries/waffle/default.nix | 2 +- pkgs/development/python-modules/moderngl-window/default.nix | 3 ++- pkgs/development/python-modules/moderngl/default.nix | 2 +- pkgs/development/python-modules/pyglet/default.nix | 3 ++- pkgs/development/python-modules/pyopengl/default.nix | 3 ++- pkgs/development/python-modules/pyqt/5.x.nix | 3 ++- pkgs/development/python-modules/pyqt/6.x.nix | 3 ++- pkgs/development/python-modules/pyqt/pyqt6-sip.nix | 3 ++- pkgs/development/python-modules/pyqt/sip.nix | 3 ++- pkgs/development/python-modules/pyqt6-charts/default.nix | 3 ++- pkgs/development/python-modules/pyqt6-webengine/default.nix | 3 ++- pkgs/development/python-modules/pyqtwebengine/default.nix | 3 ++- pkgs/games/anki/default.nix | 4 +++- pkgs/tools/graphics/piglit/default.nix | 3 ++- pkgs/top-level/release-lib.nix | 2 +- 25 files changed, 49 insertions(+), 29 deletions(-) diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix index b4cd5acfcc5b..bf4706bbfc2d 100644 --- a/lib/systems/doubles.nix +++ b/lib/systems/doubles.nix @@ -114,6 +114,4 @@ in { genode = filterDoubles predicates.isGenode; embedded = filterDoubles predicates.isNone; - - mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "armv7a-linux" "aarch64-linux" "powerpc64-linux" "powerpc64le-linux" "aarch64-darwin" "riscv64-linux"]; } diff --git a/pkgs/applications/science/astronomy/gravit/default.nix b/pkgs/applications/science/astronomy/gravit/default.nix index 36f58d8d18a1..070ce96fd577 100644 --- a/pkgs/applications/science/astronomy/gravit/default.nix +++ b/pkgs/applications/science/astronomy/gravit/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, SDL, SDL_ttf, SDL_image, libSM, libICE, libGLU, libGL, libpng, lua5, autoconf, automake }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, SDL, SDL_ttf, SDL_image, libSM, libICE, libGLU, libGL, libpng, lua5, autoconf, automake, mesa }: stdenv.mkDerivation rec { pname = "gravit"; @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { view in 3D and zoom in and out. ''; - platforms = lib.platforms.mesaPlatforms; + inherit (mesa.meta) platforms; hydraPlatforms = lib.platforms.linux; # darwin times out }; } diff --git a/pkgs/applications/science/chemistry/avogadro2/default.nix b/pkgs/applications/science/chemistry/avogadro2/default.nix index 7ee42c1a793c..f69f10164cc1 100644 --- a/pkgs/applications/science/chemistry/avogadro2/default.nix +++ b/pkgs/applications/science/chemistry/avogadro2/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, cmake, eigen, avogadrolibs, molequeue, hdf5 -, openbabel, qttools, wrapQtAppsHook +, openbabel, qttools, wrapQtAppsHook, mesa }: let @@ -44,7 +44,7 @@ in stdenv.mkDerivation rec { mainProgram = "avogadro2"; maintainers = with maintainers; [ sheepforce ]; homepage = "https://github.com/OpenChemistry/avogadroapp"; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; license = licenses.bsd3; }; } diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix index fa64b148b092..06144570b704 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -5,7 +5,7 @@ fetchFromGitHub, nix-update-script, pkg-config, - libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms, + libGLSupported ? lib.elem stdenv.hostPlatform.system mesa.meta.platforms, openglSupport ? libGLSupported, libGL, alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, diff --git a/pkgs/development/libraries/SDL_compat/default.nix b/pkgs/development/libraries/SDL_compat/default.nix index 8b0cd67f79c4..4a5d54df0e3d 100644 --- a/pkgs/development/libraries/SDL_compat/default.nix +++ b/pkgs/development/libraries/SDL_compat/default.nix @@ -7,7 +7,8 @@ , libiconv , Cocoa , autoSignDarwinBinariesHook -, libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms +, mesa +, libGLSupported ? lib.elem stdenv.hostPlatform.system mesa.meta.platforms , openglSupport ? libGLSupported , libGLU }: diff --git a/pkgs/development/libraries/fox/fox-1.6.nix b/pkgs/development/libraries/fox/fox-1.6.nix index 775340af302f..4ceb6261231e 100644 --- a/pkgs/development/libraries/fox/fox-1.6.nix +++ b/pkgs/development/libraries/fox/fox-1.6.nix @@ -13,6 +13,7 @@ , libXext , libXft , libXfixes +, mesa , xinput , CoreServices }: @@ -50,6 +51,6 @@ stdenv.mkDerivation rec { homepage = "http://fox-toolkit.org"; license = lib.licenses.lgpl3; maintainers = [ ]; - platforms = lib.platforms.mesaPlatforms; + inherit (mesa.meta) platforms; }; } diff --git a/pkgs/development/libraries/glew/1.10.nix b/pkgs/development/libraries/glew/1.10.nix index 1a9993532837..5d8f155a5c61 100644 --- a/pkgs/development/libraries/glew/1.10.nix +++ b/pkgs/development/libraries/glew/1.10.nix @@ -1,6 +1,7 @@ { lib, stdenv, fetchurl, libGLU, libXmu, libXi, libXext , AGL, OpenGL , testers +, mesa }: stdenv.mkDerivation (finalAttrs: { @@ -52,6 +53,6 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.free; # different files under different licenses #["BSD" "GLX" "SGI-B" "GPL2"] pkgConfigModules = [ "glew" ]; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; }; }) diff --git a/pkgs/development/libraries/glew/default.nix b/pkgs/development/libraries/glew/default.nix index faca4bd15c15..5b774f58717c 100644 --- a/pkgs/development/libraries/glew/default.nix +++ b/pkgs/development/libraries/glew/default.nix @@ -10,6 +10,7 @@ , OpenGL , enableEGL ? (!stdenv.isDarwin) , testers +, mesa }: stdenv.mkDerivation (finalAttrs: { @@ -74,8 +75,8 @@ stdenv.mkDerivation (finalAttrs: { pkgConfigModules = [ "glew" ]; platforms = with platforms; if enableEGL then - subtractLists darwin mesaPlatforms + subtractLists darwin mesa.meta.platforms else - mesaPlatforms; + mesa.meta.platforms; }; }) diff --git a/pkgs/development/libraries/libdevil/default.nix b/pkgs/development/libraries/libdevil/default.nix index 409df07cb288..bfefe90487c4 100644 --- a/pkgs/development/libraries/libdevil/default.nix +++ b/pkgs/development/libraries/libdevil/default.nix @@ -15,6 +15,7 @@ , runtimeShell , withXorg ? true , testers +, mesa }: stdenv.mkDerivation (finalAttrs: { @@ -65,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "ilur"; license = licenses.lgpl2; pkgConfigModules = [ "IL" ]; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; maintainers = [ ]; }; }) diff --git a/pkgs/development/libraries/mesa/common.nix b/pkgs/development/libraries/mesa/common.nix index 06efd715c23f..bbd5217a4a43 100644 --- a/pkgs/development/libraries/mesa/common.nix +++ b/pkgs/development/libraries/mesa/common.nix @@ -29,7 +29,11 @@ rec { homepage = "https://www.mesa3d.org/"; changelog = "https://www.mesa3d.org/relnotes/${version}.html"; license = with lib.licenses; [ mit ]; # X11 variant, in most files - platforms = lib.platforms.mesaPlatforms; + platforms = [ + "i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" + "armv6l-linux" "armv7l-linux" "armv7a-linux" "aarch64-linux" + "powerpc64-linux" "powerpc64le-linux" "aarch64-darwin" "riscv64-linux" + ]; maintainers = with lib.maintainers; [ primeos vcunat ]; # Help is welcome :) }; } diff --git a/pkgs/development/libraries/waffle/default.nix b/pkgs/development/libraries/waffle/default.nix index 361c1e17336a..26bfa6a4ece3 100644 --- a/pkgs/development/libraries/waffle/default.nix +++ b/pkgs/development/libraries/waffle/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { mainProgram = "wflinfo"; homepage = "https://www.waffle-gl.org/"; license = licenses.bsd2; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; maintainers = with maintainers; [ Flakebi ]; }; } diff --git a/pkgs/development/python-modules/moderngl-window/default.nix b/pkgs/development/python-modules/moderngl-window/default.nix index 8042df62a5f9..27fd4ef9663d 100644 --- a/pkgs/development/python-modules/moderngl-window/default.nix +++ b/pkgs/development/python-modules/moderngl-window/default.nix @@ -5,6 +5,7 @@ fetchFromGitHub, setuptools, glfw, + mesa, moderngl, numpy, pillow, @@ -70,7 +71,7 @@ buildPythonPackage rec { changelog = "https://github.com/moderngl/moderngl-window/blob/${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ c0deaddict ]; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; broken = stdenv.isDarwin; }; } diff --git a/pkgs/development/python-modules/moderngl/default.nix b/pkgs/development/python-modules/moderngl/default.nix index 1d0d915b9cba..2bfc6edf2944 100644 --- a/pkgs/development/python-modules/moderngl/default.nix +++ b/pkgs/development/python-modules/moderngl/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { changelog = "https://github.com/moderngl/moderngl/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ c0deaddict ]; - # should be mesaPlatforms, darwin build breaks. + # should be mesa.meta.platforms, darwin build breaks. platforms = platforms.linux; }; } diff --git a/pkgs/development/python-modules/pyglet/default.nix b/pkgs/development/python-modules/pyglet/default.nix index 5d86b61555a4..663d6db5fb4d 100644 --- a/pkgs/development/python-modules/pyglet/default.nix +++ b/pkgs/development/python-modules/pyglet/default.nix @@ -17,6 +17,7 @@ ffmpeg-full, openal, libpulseaudio, + mesa, }: buildPythonPackage rec { @@ -109,6 +110,6 @@ buildPythonPackage rec { homepage = "http://www.pyglet.org/"; description = "Cross-platform windowing and multimedia library"; license = licenses.bsd3; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; }; } diff --git a/pkgs/development/python-modules/pyopengl/default.nix b/pkgs/development/python-modules/pyopengl/default.nix index 9c8af0ac924a..a66fcc6463a4 100644 --- a/pkgs/development/python-modules/pyopengl/default.nix +++ b/pkgs/development/python-modules/pyopengl/default.nix @@ -5,6 +5,7 @@ fetchPypi, pkgs, pillow, + mesa, }: buildPythonPackage rec { @@ -80,6 +81,6 @@ buildPythonPackage rec { liberal BSD-style Open-Source license. ''; license = licenses.bsd3; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; }; } diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix index e947ad34b134..2fdd86b3b5ea 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -13,6 +13,7 @@ pyqt5-sip, pyqt-builder, libsForQt5, + mesa, enableVerbose ? true, withConnectivity ? false, withMultimedia ? false, @@ -201,7 +202,7 @@ buildPythonPackage rec { description = "Python bindings for Qt5"; homepage = "https://riverbankcomputing.com/"; license = licenses.gpl3Only; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; maintainers = with maintainers; [ sander ]; }; } diff --git a/pkgs/development/python-modules/pyqt/6.x.nix b/pkgs/development/python-modules/pyqt/6.x.nix index 8f5fa218475d..8c5653826d25 100644 --- a/pkgs/development/python-modules/pyqt/6.x.nix +++ b/pkgs/development/python-modules/pyqt/6.x.nix @@ -13,6 +13,7 @@ pyqt-builder, qt6Packages, pythonOlder, + mesa, withMultimedia ? true, withWebSockets ? true, withLocation ? true, @@ -150,7 +151,7 @@ buildPythonPackage rec { description = "Python bindings for Qt6"; homepage = "https://riverbankcomputing.com/"; license = licenses.gpl3Only; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; maintainers = with maintainers; [ LunNova ]; }; } diff --git a/pkgs/development/python-modules/pyqt/pyqt6-sip.nix b/pkgs/development/python-modules/pyqt/pyqt6-sip.nix index b7083eef900d..30b2fa9011c8 100644 --- a/pkgs/development/python-modules/pyqt/pyqt6-sip.nix +++ b/pkgs/development/python-modules/pyqt/pyqt6-sip.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchPypi, + mesa, }: buildPythonPackage rec { @@ -23,7 +24,7 @@ buildPythonPackage rec { description = "Python bindings for Qt5"; homepage = "https://www.riverbankcomputing.com/software/sip/"; license = licenses.gpl3Only; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; maintainers = with maintainers; [ LunNova ]; }; } diff --git a/pkgs/development/python-modules/pyqt/sip.nix b/pkgs/development/python-modules/pyqt/sip.nix index 46597acb6a44..a9042856e466 100644 --- a/pkgs/development/python-modules/pyqt/sip.nix +++ b/pkgs/development/python-modules/pyqt/sip.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchPypi, + mesa, }: buildPythonPackage rec { @@ -23,7 +24,7 @@ buildPythonPackage rec { description = "Python bindings for Qt5"; homepage = "https://www.riverbankcomputing.com/software/sip/"; license = licenses.gpl3Only; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; maintainers = with maintainers; [ sander ]; }; } diff --git a/pkgs/development/python-modules/pyqt6-charts/default.nix b/pkgs/development/python-modules/pyqt6-charts/default.nix index f802db34771c..0ab27728f7af 100644 --- a/pkgs/development/python-modules/pyqt6-charts/default.nix +++ b/pkgs/development/python-modules/pyqt6-charts/default.nix @@ -8,6 +8,7 @@ pythonOlder, pyqt6, python, + mesa, }: buildPythonPackage rec { @@ -67,7 +68,7 @@ buildPythonPackage rec { description = "Python bindings for Qt6 QtCharts"; homepage = "https://riverbankcomputing.com/"; license = licenses.gpl3Only; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; maintainers = with maintainers; [ dandellion ]; }; } diff --git a/pkgs/development/python-modules/pyqt6-webengine/default.nix b/pkgs/development/python-modules/pyqt6-webengine/default.nix index ae7215f39b42..5ea0b8b1941d 100644 --- a/pkgs/development/python-modules/pyqt6-webengine/default.nix +++ b/pkgs/development/python-modules/pyqt6-webengine/default.nix @@ -10,6 +10,7 @@ pythonOlder, pyqt6, python, + mesa, }: buildPythonPackage rec { @@ -84,7 +85,7 @@ buildPythonPackage rec { description = "Python bindings for Qt6 WebEngine"; homepage = "https://riverbankcomputing.com/"; license = licenses.gpl3Only; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; maintainers = with maintainers; [ LunNova nrdxp diff --git a/pkgs/development/python-modules/pyqtwebengine/default.nix b/pkgs/development/python-modules/pyqtwebengine/default.nix index 4428779f0b95..8b54e55c037f 100644 --- a/pkgs/development/python-modules/pyqtwebengine/default.nix +++ b/pkgs/development/python-modules/pyqtwebengine/default.nix @@ -12,6 +12,7 @@ pyqt5, sip, pyqt-builder, + mesa, }: let @@ -98,7 +99,7 @@ buildPythonPackage ( description = "Python bindings for Qt5"; homepage = "http://www.riverbankcomputing.co.uk"; license = lib.licenses.gpl3; - hydraPlatforms = lib.lists.intersectLists libsForQt5.qtwebengine.meta.platforms lib.platforms.mesaPlatforms; + hydraPlatforms = lib.lists.intersectLists libsForQt5.qtwebengine.meta.platforms mesa.meta.platforms; }; } // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) { diff --git a/pkgs/games/anki/default.nix b/pkgs/games/anki/default.nix index 6abe8ea7c9e1..76c23365f400 100644 --- a/pkgs/games/anki/default.nix +++ b/pkgs/games/anki/default.nix @@ -25,6 +25,8 @@ AVKit, CoreAudio, swift, + + mesa, }: let @@ -336,7 +338,7 @@ python3.pkgs.buildPythonApplication { ''; homepage = "https://apps.ankiweb.net"; license = licenses.agpl3Plus; - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; maintainers = with maintainers; [ euank oxij diff --git a/pkgs/tools/graphics/piglit/default.nix b/pkgs/tools/graphics/piglit/default.nix index 69e5c44be69a..f620e2723bd6 100644 --- a/pkgs/tools/graphics/piglit/default.nix +++ b/pkgs/tools/graphics/piglit/default.nix @@ -16,6 +16,7 @@ , libXrender , libxcb , libxkbcommon +, mesa }: stdenv.mkDerivation rec { @@ -71,7 +72,7 @@ stdenv.mkDerivation rec { description = "OpenGL test suite, and test-suite runner"; homepage = "https://gitlab.freedesktop.org/mesa/piglit"; license = licenses.free; # custom license. See COPYING in the source repo. - platforms = platforms.mesaPlatforms; + inherit (mesa.meta) platforms; maintainers = with maintainers; [ Flakebi ]; mainProgram = "piglit"; }; diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index e34cf4be25e8..e27b65dbd49a 100644 --- a/pkgs/top-level/release-lib.nix +++ b/pkgs/top-level/release-lib.nix @@ -178,7 +178,7 @@ let in { /* Common platform groups on which to test packages. */ - inherit (platforms) unix linux darwin cygwin all mesaPlatforms; + inherit (platforms) unix linux darwin cygwin all; inherit assertTrue