update. Switched to mesa-git from chaotic-nyx

This commit is contained in:
Varris 2023-04-09 13:37:35 +02:00
parent 7d1efea38f
commit 3dc9195548
9 changed files with 26 additions and 252 deletions

View File

@ -585,22 +585,6 @@
"type": "github"
}
},
"ncmpcpp-git": {
"flake": false,
"locked": {
"lastModified": 1672512759,
"narHash": "sha256-PjCzo3OSj/QIi2fdeV28ZjPiqLf6XAnZeNrDyjXt5wU=",
"owner": "ncmpcpp",
"repo": "ncmpcpp",
"rev": "9f44edf0b1d74da7cefbd498341d59bc52f6043f",
"type": "github"
},
"original": {
"owner": "ncmpcpp",
"repo": "ncmpcpp",
"type": "github"
}
},
"nix-colors": {
"inputs": {
"base16-schemes": "base16-schemes",
@ -846,7 +830,6 @@
"hyprland-contrib": "hyprland-contrib",
"hyprpaper": "hyprpaper",
"hyprpicker": "hyprpicker",
"ncmpcpp-git": "ncmpcpp-git",
"nix-colors": "nix-colors",
"nixpkgs": "nixpkgs_2",
"nixvim": "nixvim",

View File

@ -35,16 +35,6 @@
flake = false;
};
mesa-git = {
url = "gitlab:mesa/mesa?host=gitlab.freedesktop.org";
flake = false;
};
ncmpcpp-git = {
url = "github:ncmpcpp/ncmpcpp";
flake = false;
};
grub2-themes = {
url = "github:vinceliuice/grub2-themes";
inputs.nixpkgs.follows = "nixpkgs";
@ -80,10 +70,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
openmw = {
url = "gitlab:OpenMW/openmw";
flake = false;
};
chaotic-nyx.url = "github:chaotic-aur/nyx";
};
@ -104,6 +91,7 @@
inputs.hyprpaper.overlays.default
inputs.hyprpicker.overlays.default
inputs.webcord.overlays.default
inputs.chaotic-nyx.overlays.default
];
};
in
@ -122,7 +110,6 @@
'';
mesonFlags = old.mesonFlags ++ [ "-Dexperimental=true" ];
});
xwayland = prev.xwayland.overrideAttrs (old: {
@ -145,28 +132,6 @@
visualizerSupport = true;
};
mesa-git =
(prev.mesa.overrideAttrs
(old: {
version = "git";
src = inputs.mesa-git;
patches = [
./pkgs/mesa-git/disk_cache-include-dri-driver-path-in-cache-key.patch
./pkgs/mesa-git/opencl.patch
];
mesonFlags = old.mesonFlags ++ [
"-Dandroid-libbacktrace=disabled"
"-Dlmsensors=disabled"
"-Dlibunwind=disabled"
"-Dgallium-xa=disabled"
];
})).override
{
galliumDrivers = [ "radeonsi" "swrast" ];
vulkanDrivers = [ "amd" ];
enableGalliumNine = false; # Replaced by DXVK
};
customedid = pkgs.callPackage ./pkgs/custom-edid { };
wxedid = pkgs.callPackage ./pkgs/wxedid { };
fastfetch = pkgs.callPackage ./pkgs/fastfetch { };
@ -193,6 +158,7 @@
};
}
inputs.grub2-themes.nixosModules.default
inputs.chaotic-nyx.nixosModules.default
];
};
};

View File

@ -1,59 +0,0 @@
diff --git a/meson_options.txt b/meson_options.txt
index 0bd92d3916d..0c6db767dc8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -488,6 +488,13 @@ option(
description : 'Enable direct rendering in GLX and EGL for DRI',
)
+option(
+ 'disk-cache-key',
+ type : 'string',
+ value : '',
+ description : 'Mesa cache key.'
+)
+
option('egl-lib-suffix',
type : 'string',
value : '',
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index e4e03131b0a..4fade805111 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -217,8 +217,10 @@ disk_cache_type_create(const char *gpu_name,
/* Create driver id keys */
size_t id_size = strlen(driver_id) + 1;
+ size_t key_size = strlen(DISK_CACHE_KEY) + 1;
size_t gpu_name_size = strlen(gpu_name) + 1;
cache->driver_keys_blob_size += id_size;
+ cache->driver_keys_blob_size += key_size;
cache->driver_keys_blob_size += gpu_name_size;
/* We sometimes store entire structs that contains a pointers in the cache,
@@ -239,6 +241,7 @@ disk_cache_type_create(const char *gpu_name,
uint8_t *drv_key_blob = cache->driver_keys_blob;
DRV_KEY_CPY(drv_key_blob, &cache_version, cv_size)
DRV_KEY_CPY(drv_key_blob, driver_id, id_size)
+ DRV_KEY_CPY(drv_key_blob, DISK_CACHE_KEY, key_size)
DRV_KEY_CPY(drv_key_blob, gpu_name, gpu_name_size)
DRV_KEY_CPY(drv_key_blob, &ptr_size, ptr_size_size)
DRV_KEY_CPY(drv_key_blob, &driver_flags, driver_flags_size)
diff --git a/src/util/meson.build b/src/util/meson.build
index fe57c35a967..ce90b3530f9 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
@@ -261,7 +261,12 @@ _libmesa_util = static_library(
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : deps_for_libmesa_util,
link_with: [libmesa_format, libmesa_util_sse41],
- c_args : [c_msvc_compat_args],
+ c_args : [
+ c_msvc_compat_args,
+ '-DDISK_CACHE_KEY="@0@"'.format(
+ get_option('disk-cache-key')
+ ),
+ ],
gnu_symbol_visibility : 'hidden',
build_by_default : false
)

View File

@ -1,59 +0,0 @@
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
index 06ca90564f0..bb244f8f358 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
@@ -30,6 +30,7 @@
#include <amdgpu.h>
#include <pthread.h>
+#include <sys/types.h>
#include "util/list.h"
#include "util/rwlock.h"
#include "ac_gpu_info.h"
diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
index 22f99c41909..2f3195926be 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -108,6 +108,8 @@ extern bool fd_binning_enabled;
#include <sys/types.h>
#include <sys/syscall.h>
+#define gettid() ((pid_t)syscall(SYS_gettid))
+
#define DBG(fmt, ...) \
do { \
if (FD_DBG(MSGS)) \
diff --git a/src/gallium/frontends/nine/nine_debug.c b/src/gallium/frontends/nine/nine_debug.c
index f3a6a945025..f4a6c41a612 100644
--- a/src/gallium/frontends/nine/nine_debug.c
+++ b/src/gallium/frontends/nine/nine_debug.c
@@ -65,7 +65,7 @@ _nine_debug_printf( unsigned long flag,
{
static boolean first = TRUE;
static unsigned long dbg_flags = DBG_ERROR | DBG_WARN;
- unsigned long tid = 0;
+ pthread_t tid = 0;
if (first) {
first = FALSE;
@@ -74,7 +74,7 @@ _nine_debug_printf( unsigned long flag,
#if defined(HAVE_PTHREAD)
if (dbg_flags & DBG_TID)
- tid = (unsigned long)pthread_self();
+ tid = pthread_self();
#endif
if (dbg_flags & flag) {
diff --git a/src/util/rand_xor.c b/src/util/rand_xor.c
index 81b64f1ea71..56ebd2eccdf 100644
--- a/src/util/rand_xor.c
+++ b/src/util/rand_xor.c
@@ -28,6 +28,7 @@
#if defined(HAVE_GETRANDOM)
#include <sys/random.h>
#endif
+#include <sys/types.h> /* size_t, ssize_t */
#include <unistd.h>
#include <fcntl.h>
#endif

View File

@ -1,66 +0,0 @@
diff --git a/meson.build b/meson.build
index 172c64a7c70..05961e56926 100644
--- a/meson.build
+++ b/meson.build
@@ -1900,7 +1900,7 @@ endif
dep_clang = null_dep
if with_clc
- llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
+ llvm_libdir = get_option('clang-libdir')
dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
diff --git a/meson_options.txt b/meson_options.txt
index 6f307018815..ab84eb1006c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -18,6 +18,12 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
+option(
+ 'clang-libdir',
+ type : 'string',
+ value : '',
+ description : 'Locations to search for clang libraries.'
+)
option(
'platforms',
type : 'array',
diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build
index db3586bd7fb..4d914206d21 100644
--- a/src/gallium/targets/opencl/meson.build
+++ b/src/gallium/targets/opencl/meson.build
@@ -39,7 +39,8 @@ if dep_llvm.version().version_compare('>=10.0.0')
polly_isl_dep = cpp.find_library('PollyISL', dirs : llvm_libdir, required : false)
endif
-dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
+clang_libdir = get_option('clang-libdir')
+dep_clang = cpp.find_library('clang-cpp', dirs : clang_libdir, required : false)
# meson will return clang-cpp from system dirs if it's not found in llvm_libdir
linker_rpath_arg = '-Wl,--rpath=@0@'.format(llvm_libdir)
@@ -123,7 +124,7 @@ if with_opencl_icd
configuration : _config,
input : 'mesa.icd.in',
output : 'mesa.icd',
- install : true,
+ install : false,
install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
)
diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build
index a968dee52db..69475cf3133 100644
--- a/src/gallium/targets/rusticl/meson.build
+++ b/src/gallium/targets/rusticl/meson.build
@@ -58,7 +58,7 @@ configure_file(
configuration : _config,
input : 'rusticl.icd.in',
output : 'rusticl.icd',
- install : true,
+ install : false,
install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
)

View File

@ -6,7 +6,7 @@
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.hyprland.nixosModules.default
#inputs.hyprland.nixosModules.default
];
nixpkgs.config.allowUnfree = true;
@ -95,10 +95,9 @@
keyMap = "us-acentos";
};
chaotic.mesa-git.enable = true;
hardware.opengl = {
enable = true;
package = pkgs.mesa-git.drivers;
package32 = pkgs.pkgsi686Linux.mesa-git.drivers;
extraPackages = [ pkgs.libvdpau-va-gl ];
driSupport = true;
@ -169,7 +168,7 @@
programs = {
dconf.enable = true;
fish.enable = true;
hyprland.enable = true;
# hyprland.enable = true;
kdeconnect.enable = true;
ssh.startAgent = true;
};
@ -258,7 +257,16 @@
dates = "weekly";
options = "--delete-older-than 7d";
};
settings.auto-optimise-store = true;
settings = {
auto-optimise-store = true;
extra-substituters = [
"https://nyx.chaotic.cx"
];
extra-trusted-public-keys = [
"nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
];
};
};
system.stateVersion = "22.05"; # Did you read the comment?

View File

@ -43,10 +43,10 @@ let
xwaylandSetPrimary = pkgs.writeShellScriptBin "xwayland-setprimary.sh" ''
while true; do
DSP=$(${pkgs.xorg.xrandr}/bin/xrandr | awk '/2560x1440/ {print $1}' | head -n 1)
if [[ ! -z DSP ]]; then
${pkgs.xorg.xrandr}/bin/xrandr --output "$DSP" --primary
fi
sleep 10
if [[ ! -z DSP ]]; then
${pkgs.xorg.xrandr}/bin/xrandr --output "$DSP" --primary
fi
sleep 10
done
'';
@ -135,9 +135,9 @@ in
exec-once = ${pkgs.openrgb}/bin/openrgb --startminimized --profile autorun.orp
exec-once = ${pkgs.blueman}/bin/blueman-applet
exec-once = ${pkgs.mullvad-vpn}/bin/mullvad-gui
exec-once = ${xwaylandSetPrimary}/bin/xwayland-setprimary.sh
exec = ${wob-voldaemon}/bin/wob-volumeindicator.sh;
exec = ${xwaylandSetPrimary}/bin/xwayland-setprimary.sh
#keybinds
bind = ${modKey}, 1, workspace, 1

View File

@ -10,8 +10,10 @@ let
fontSize = "9pt";
ds-battery = pkgs.writeShellScriptBin "ds-battery.sh" ''
ds_capacity_file="/sys/class/power_supply/ps-controller-battery-4c:b9:9b:74:ae:31/capacity"
ds_status_file="/sys/class/power_supply/ps-controller-battery-4c:b9:9b:74:ae:31/status"
#ds_capacity_file="/sys/class/power_supply/ps-controller-battery-4c:b9:9b:74:ae:31/capacity"
#ds_status_file="/sys/class/power_supply/ps-controller-battery-4c:b9:9b:74:ae:31/status"
ds_capacity_file="/sys/class/power_supply/ps-controller-battery-a4:53:85:35:11:fc/capacity"
ds_status_file="/sys/class/power_supply/ps-controller-battery-a4:53:85:35:11:fc/status"
while true; do
if [[ -f $ds_capacity_file ]]; then
@ -24,7 +26,7 @@ let
else
echo "{\"class\":\"not_connected\",\"text\":\"\"}"
fi
sleep 60
sleep 10
done
'';
in

View File

@ -29,7 +29,6 @@ in
bottom
calcurse
fastfetch
gamescope
gimp
gnome.file-roller
gnome.gvfs