From 6cc93fbe72b0658d544de1e7c4fc366efc83a818 Mon Sep 17 00:00:00 2001 From: Pavel Sobolev Date: Sun, 16 Jun 2024 17:21:33 +0300 Subject: [PATCH] tracy: split the package into `tracy-wayland` and `tracy-glfw` --- nixos/doc/manual/release-notes/rl-2411.section.md | 6 +++--- pkgs/by-name/tr/tracy/package.nix | 5 ++++- pkgs/top-level/all-packages.nix | 4 +++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index ef58f0c682a3d..650513cf5c4c0 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -571,9 +571,9 @@ - `/share/vim-plugins` now only gets linked if `programs.vim.enable` is enabled -- The `tracy` package no longer works on X11, since it's moved to Wayland - support, which is the intended default behavior by Tracy maintainers. - X11 users have to switch to the new package `tracy-x11`. +- The profiler from the `tracy` package no longer works on X11, since it + requires Wayland now, which is the intended default behavior by Tracy + maintainers. X11 users have to switch to the new package `tracy-glfw`. - The `services.prometheus.exporters.minio` option has been removed, as it's upstream implementation was broken and unmaintained. Minio now has built-in [Prometheus metrics exposure](https://min.io/docs/minio/linux/operations/monitoring/collect-minio-metrics-using-prometheus.html), which can be used instead. diff --git a/pkgs/by-name/tr/tracy/package.nix b/pkgs/by-name/tr/tracy/package.nix index 5273b41a37093..ab8f06031a93b 100644 --- a/pkgs/by-name/tr/tracy/package.nix +++ b/pkgs/by-name/tr/tracy/package.nix @@ -25,8 +25,11 @@ wayland-protocols, }: +assert withGtkFileSelector -> stdenv.isLinux; +assert withWayland -> stdenv.isLinux; + stdenv.mkDerivation rec { - pname = "tracy"; + pname = if withWayland then "tracy-wayland" else "tracy-glfw"; version = "0.11.1"; src = fetchFromGitHub { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8be74f5c5488c..7abb117f96a0f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7152,7 +7152,9 @@ with pkgs; tsm-client-withGui = callPackage ../by-name/ts/tsm-client/package.nix { enableGui = true; }; - tracy-x11 = callPackage ../by-name/tr/tracy/package.nix { withWayland = false; }; + tracy = callPackage ../by-name/tr/tracy/package.nix { withWayland = stdenv.isLinux; }; + tracy-glfw = callPackage ../by-name/tr/tracy/package.nix { withWayland = false; }; + tracy-wayland = callPackage ../by-name/tr/tracy/package.nix { withWayland = true; }; trivy = callPackage ../tools/admin/trivy { };