From a8ae77c1fbe9834c9a1e4d79203195c235b3ba8f Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Thu, 21 Sep 2023 11:46:13 +0200 Subject: mesa: 23.1.7 -> 23.1.8 https://docs.mesa3d.org/relnotes/23.1.8.html --- pkgs/development/libraries/mesa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/libraries/mesa/default.nix') diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index b7bec7e8930..239be08b4ed 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -86,8 +86,8 @@ */ let - version = "23.1.7"; - hash = "sha256-QJZB6t8O0cd5R5em9aCwGVtVgLKCFm5exWKca82mrNM="; + version = "23.1.8"; + hash = "sha256-RUNP+RpwmEQTCjF02cDvOca1ByWyuwwT5zbzYTTbFK0="; # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule -- cgit 1.4.1 From 912c60564334a81af7cfd4a38f9eed44d7770fa9 Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 5 Oct 2023 06:34:10 +0300 Subject: mesa: don't depend on build python `mesa-overlay-control.py` has build python in it's shebang `pkgsCross.aarch64-multiplatform.sway` --- pkgs/development/libraries/mesa/default.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkgs/development/libraries/mesa/default.nix') diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index b7bec7e8930..00471b52364 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -223,6 +223,7 @@ self = stdenv.mkDerivation { libffi libvdpau libelf libXvMC libpthreadstubs openssl /*or another sha1 provider*/ zstd libunwind + python3Packages.python # for shebang ] ++ lib.optionals haveWayland [ wayland wayland-protocols ] ++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal udev lm_sensors ] ++ lib.optionals enableOpenCL [ libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator' ] @@ -320,6 +321,9 @@ self = stdenv.mkDerivation { fi done + # Don't depend on build python + patchShebangs --host --update $out/bin/* + # NAR doesn't support hard links, so convert them to symlinks to save space. jdupes --hard-links --link-soft --recurse "$drivers" -- cgit 1.4.1 From 58fdb93d6f5fd794406ea5152a8641e7247b8242 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Fri, 13 Oct 2023 11:14:58 +0200 Subject: mesa: 23.1.8 -> 23.1.9 As usual, patch bumps should be pretty safe to merge https://docs.mesa3d.org/relnotes/23.1.9.html --- pkgs/development/libraries/mesa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/libraries/mesa/default.nix') diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 239be08b4ed..ea0059e34b6 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -86,8 +86,8 @@ */ let - version = "23.1.8"; - hash = "sha256-RUNP+RpwmEQTCjF02cDvOca1ByWyuwwT5zbzYTTbFK0="; + version = "23.1.9"; + hash = "sha256-KVuifCgUbtCSFOjOea+hZZ7fnRQt7MPJH4BFUtZPdRA="; # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule -- cgit 1.4.1 From 2bfbf5b984a8ec9fbf2cd98aca5b24cc37408887 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 28 Oct 2023 14:34:13 +0300 Subject: mesa: bump to llvmPackages_16 --- pkgs/development/libraries/mesa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/libraries/mesa/default.nix') diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 8e1447c31fa..58ffc6ae214 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -2,7 +2,7 @@ , meson, pkg-config, ninja , intltool, bison, flex, file, python3Packages, wayland-scanner , expat, libdrm, xorg, wayland, wayland-protocols, openssl -, llvmPackages_15, libffi, libomxil-bellagio, libva-minimal +, llvmPackages_16, libffi, libomxil-bellagio, libva-minimal , libelf, libvdpau , libglvnd, libunwind, lm_sensors , vulkan-loader, glslang @@ -95,7 +95,7 @@ let withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm; - llvmPackages = llvmPackages_15; + llvmPackages = llvmPackages_16; # Align all the Mesa versions used. Required to prevent explosions when # two different LLVMs are loaded in the same process. # FIXME: these should really go into some sort of versioned LLVM package set -- cgit 1.4.1 From e6cbaa94f9e429ce4af482299a8f54701ea474c9 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 28 Oct 2023 14:24:04 +0300 Subject: libclc: absorb into llvmPackages(16) --- pkgs/development/compilers/llvm/16/default.nix | 6 +++ .../compilers/llvm/16/libclc/default.nix | 54 ++++++++++++++++++++++ .../llvm/16/libclc/libclc-gnu-install-dirs.patch | 10 ++++ pkgs/development/libraries/libclc/default.nix | 54 ---------------------- .../libraries/libclc/libclc-gnu-install-dirs.patch | 10 ---- pkgs/development/libraries/mesa/default.nix | 3 +- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 - 8 files changed, 72 insertions(+), 68 deletions(-) create mode 100644 pkgs/development/compilers/llvm/16/libclc/default.nix create mode 100644 pkgs/development/compilers/llvm/16/libclc/libclc-gnu-install-dirs.patch delete mode 100644 pkgs/development/libraries/libclc/default.nix delete mode 100644 pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch (limited to 'pkgs/development/libraries/mesa/default.nix') diff --git a/pkgs/development/compilers/llvm/16/default.nix b/pkgs/development/compilers/llvm/16/default.nix index 24dd31ea9fe..a9ffac74123 100644 --- a/pkgs/development/compilers/llvm/16/default.nix +++ b/pkgs/development/compilers/llvm/16/default.nix @@ -309,6 +309,12 @@ in let extraBuildCommands = mkExtraBuildCommands0 cc; }; + # Has to be in tools despite mostly being a library, + # because we use a native helper executable from a + # non-cross build in cross builds. + libclc = callPackage ./libclc { + inherit buildLlvmTools; + }; }); libraries = lib.makeExtensible (libraries: let diff --git a/pkgs/development/compilers/llvm/16/libclc/default.nix b/pkgs/development/compilers/llvm/16/libclc/default.nix new file mode 100644 index 00000000000..6fa0751f906 --- /dev/null +++ b/pkgs/development/compilers/llvm/16/libclc/default.nix @@ -0,0 +1,54 @@ +{ lib, stdenv, version, runCommand, monorepoSrc, llvm, buildPackages, buildLlvmTools, ninja, cmake, python3 }: + +stdenv.mkDerivation rec { + pname = "libclc"; + inherit version; + + src = runCommand "${pname}-src-${version}" {} '' + mkdir -p "$out" + cp -r ${monorepoSrc}/cmake "$out" + cp -r ${monorepoSrc}/${pname} "$out" + ''; + + sourceRoot = "${src.name}/${pname}"; + + outputs = [ "out" "dev" ]; + + patches = [ + ./libclc-gnu-install-dirs.patch + ]; + + # cmake expects all required binaries to be in the same place, so it will not be able to find clang without the patch + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_CLANG clang PATHS "${buildLlvmTools.clang.cc}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_AS llvm-as PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_AS llvm-as PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_LINK llvm-link PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_LINK llvm-link PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_OPT opt PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_OPT opt PATHS "${buildLlvmTools.llvm}/bin" NO_DEFAULT_PATH )' \ + --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ + 'find_program( LLVM_SPIRV llvm-spirv PATHS "${buildPackages.spirv-llvm-translator}/bin" NO_DEFAULT_PATH )' + '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + substituteInPlace CMakeLists.txt \ + --replace 'COMMAND prepare_builtins' 'COMMAND ${buildPackages.libclc.dev}/bin/prepare_builtins' + ''; + + nativeBuildInputs = [ cmake ninja python3 ]; + buildInputs = [ llvm ]; + strictDeps = true; + + postInstall = '' + install -Dt $dev/bin prepare_builtins + ''; + + meta = with lib; { + broken = stdenv.isDarwin; + homepage = "http://libclc.llvm.org/"; + description = "Implementation of the library requirements of the OpenCL C programming language"; + license = licenses.mit; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/compilers/llvm/16/libclc/libclc-gnu-install-dirs.patch b/pkgs/development/compilers/llvm/16/libclc/libclc-gnu-install-dirs.patch new file mode 100644 index 00000000000..1e5108a27c3 --- /dev/null +++ b/pkgs/development/compilers/llvm/16/libclc/libclc-gnu-install-dirs.patch @@ -0,0 +1,10 @@ +--- a/libclc.pc.in ++++ b/libclc.pc.in +@@ -1,5 +1,5 @@ +-includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@ +-libexecdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATADIR@/clc ++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ ++libexecdir=@CMAKE_INSTALL_FULL_DATADIR@/clc + + Name: libclc + Description: Library requirements of the OpenCL C programming language diff --git a/pkgs/development/libraries/libclc/default.nix b/pkgs/development/libraries/libclc/default.nix deleted file mode 100644 index 9148deeee6f..00000000000 --- a/pkgs/development/libraries/libclc/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, buildPackages, ninja, cmake, python3, llvm_14 }: - -stdenv.mkDerivation rec { - pname = "libclc"; - version = "16.0.3"; - - src = fetchFromGitHub { - owner = "llvm"; - repo = "llvm-project"; - rev = "llvmorg-${version}"; - hash = "sha256-paWwnoU3XMqreRgh9JbT1tDMTwq/ZL0ss3SJTteEGL0="; - }; - sourceRoot = "${src.name}/libclc"; - - outputs = [ "out" "dev" ]; - - patches = [ - ./libclc-gnu-install-dirs.patch - ]; - - # cmake expects all required binaries to be in the same place, so it will not be able to find clang without the patch - postPatch = '' - substituteInPlace CMakeLists.txt \ - --replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_CLANG clang PATHS "${buildPackages.clang_14.cc}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_AS llvm-as PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_AS llvm-as PATHS "${buildPackages.llvm_14}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_LINK llvm-link PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_LINK llvm-link PATHS "${buildPackages.llvm_14}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_OPT opt PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_OPT opt PATHS "${buildPackages.llvm_14}/bin" NO_DEFAULT_PATH )' \ - --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ''${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )' \ - 'find_program( LLVM_SPIRV llvm-spirv PATHS "${buildPackages.spirv-llvm-translator}/bin" NO_DEFAULT_PATH )' - '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' - substituteInPlace CMakeLists.txt \ - --replace 'COMMAND prepare_builtins' 'COMMAND ${buildPackages.libclc.dev}/bin/prepare_builtins' - ''; - - nativeBuildInputs = [ cmake ninja python3 ]; - buildInputs = [ llvm_14 ]; - strictDeps = true; - - postInstall = '' - install -Dt $dev/bin prepare_builtins - ''; - - meta = with lib; { - broken = stdenv.isDarwin; - homepage = "http://libclc.llvm.org/"; - description = "Implementation of the library requirements of the OpenCL C programming language"; - license = licenses.mit; - platforms = platforms.all; - }; -} diff --git a/pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch b/pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch deleted file mode 100644 index 1e5108a27c3..00000000000 --- a/pkgs/development/libraries/libclc/libclc-gnu-install-dirs.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/libclc.pc.in -+++ b/libclc.pc.in -@@ -1,5 +1,5 @@ --includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@ --libexecdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATADIR@/clc -+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ -+libexecdir=@CMAKE_INSTALL_FULL_DATADIR@/clc - - Name: libclc - Description: Library requirements of the OpenCL C programming language diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 58ffc6ae214..3f5b4c779a9 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -64,7 +64,6 @@ , enableOSMesa ? stdenv.isLinux , enableOpenCL ? stdenv.isLinux && stdenv.isx86_64 , enablePatentEncumberedCodecs ? true -, libclc , jdupes , rustc , rust-bindgen @@ -226,7 +225,7 @@ self = stdenv.mkDerivation { python3Packages.python # for shebang ] ++ lib.optionals haveWayland [ wayland wayland-protocols ] ++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal udev lm_sensors ] - ++ lib.optionals enableOpenCL [ libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator' ] + ++ lib.optionals enableOpenCL [ llvmPackages.libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator' ] ++ lib.optional withValgrind valgrind-light ++ lib.optional haveZink vulkan-loader ++ lib.optional haveDozen directx-headers; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 7c985317d12..6ac9055afef 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -434,6 +434,7 @@ mapAliases ({ libbencodetools = bencodetools; # Added 2022-07-30 libbpf_1 = libbpf; # Added 2022-12-06 libcap_pam = throw "'libcap_pam' has been replaced with 'libcap'"; # Converted to throw 2023-09-10 + libclc = llvmPackages_latest.libclc; # Added 2023-10-28 libgme = game-music-emu; # Added 2022-07-20 libgpgerror = libgpg-error; # Added 2021-09-04 libheimdal = heimdal; # Added 2022-11-18 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 23f2e286a72..3555a7f3aad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22597,8 +22597,6 @@ with pkgs; libcint = callPackage ../development/libraries/libcint { }; - libclc = callPackage ../development/libraries/libclc { }; - libcli = callPackage ../development/libraries/libcli { }; libclthreads = callPackage ../development/libraries/libclthreads { }; -- cgit 1.4.1 From 6247bd08f7db9abaa63fbd8122f2cb6179630da0 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 23 May 2023 13:06:02 +0000 Subject: mesa: fix cross compilation to x86_64 In particular, fix cross compilation of rusticl. --- pkgs/development/libraries/mesa/default.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'pkgs/development/libraries/mesa/default.nix') diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 3f5b4c779a9..173cc2016e5 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, fetchpatch +{ stdenv, lib, fetchurl, fetchpatch, buildPackages , meson, pkg-config, ninja , intltool, bison, flex, file, python3Packages, wayland-scanner , expat, libdrm, xorg, wayland, wayland-protocols, openssl @@ -66,7 +66,6 @@ , enablePatentEncumberedCodecs ? true , jdupes , rustc -, rust-bindgen , spirv-llvm-translator , zstd , directx-headers @@ -98,9 +97,9 @@ let # Align all the Mesa versions used. Required to prevent explosions when # two different LLVMs are loaded in the same process. # FIXME: these should really go into some sort of versioned LLVM package set - rust-bindgen' = rust-bindgen.override { - rust-bindgen-unwrapped = rust-bindgen.unwrapped.override { - clang = llvmPackages.clang; + rust-bindgen' = buildPackages.rust-bindgen.override { + rust-bindgen-unwrapped = buildPackages.rust-bindgen.unwrapped.override { + clang = buildPackages.llvmPackages_15.clang; }; }; spirv-llvm-translator' = spirv-llvm-translator.override { @@ -201,7 +200,8 @@ self = stdenv.mkDerivation { "-Dglvnd=true" # Enable RT for Intel hardware - "-Dintel-clc=enabled" + # https://gitlab.freedesktop.org/mesa/mesa/-/issues/9080 + (lib.mesonEnable "intel-clc" (stdenv.buildPlatform == stdenv.hostPlatform)) ] ++ lib.optionals enableOpenCL [ # Clover, old OpenCL frontend "-Dgallium-opencl=icd" @@ -217,7 +217,7 @@ self = stdenv.mkDerivation { ++ lib.optional (vulkanLayers != []) "-D vulkan-layers=${builtins.concatStringsSep "," vulkanLayers}"; buildInputs = with xorg; [ - expat llvmPackages.libllvm libglvnd xorgproto + expat glslang llvmPackages.libllvm libglvnd xorgproto libX11 libXext libxcb libXt libXfixes libxshmfence libXrandr libffi libvdpau libelf libXvMC libpthreadstubs openssl /*or another sha1 provider*/ @@ -225,19 +225,21 @@ self = stdenv.mkDerivation { python3Packages.python # for shebang ] ++ lib.optionals haveWayland [ wayland wayland-protocols ] ++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal udev lm_sensors ] - ++ lib.optionals enableOpenCL [ llvmPackages.libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator' ] + ++ lib.optionals enableOpenCL [ llvmPackages.libclc llvmPackages.clang llvmPackages.clang-unwrapped spirv-llvm-translator' ] ++ lib.optional withValgrind valgrind-light ++ lib.optional haveZink vulkan-loader ++ lib.optional haveDozen directx-headers; - depsBuildBuild = [ pkg-config ]; + depsBuildBuild = [ pkg-config ] + ++ lib.optional enableOpenCL buildPackages.stdenv.cc; nativeBuildInputs = [ meson pkg-config ninja intltool bison flex file python3Packages.python python3Packages.mako python3Packages.ply jdupes glslang - ] ++ lib.optional haveWayland wayland-scanner; + ] ++ lib.optionals enableOpenCL [ rust-bindgen' rustc ] + ++ lib.optional haveWayland wayland-scanner; propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm -- cgit 1.4.1