···2930- We don't want workflows of different Pull Requests to cancel each other, so we include `github.event.pull_request.number`. The [GitHub docs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs#example-using-a-fallback-value) show using `github.head_ref` for this purpose, but this doesn't work well with forks: Different users could have the same head branch name in their forks and run CI for their PRs at the same time.
3132-- Sometimes, there is no `pull_request.number`. That's the case for `push` or `workflow_run` events. To ensure non-PR runs are never cancelled, we add a fallback of `github.run_id`. This is a unique value for each workflow run.
3334- Of course, we run multiple workflows at the same time, so we add `github.workflow` to the key. Otherwise workflows would cancel each other.
35
···2930- We don't want workflows of different Pull Requests to cancel each other, so we include `github.event.pull_request.number`. The [GitHub docs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs#example-using-a-fallback-value) show using `github.head_ref` for this purpose, but this doesn't work well with forks: Different users could have the same head branch name in their forks and run CI for their PRs at the same time.
3132+- Sometimes, there is no `pull_request.number`. To ensure non-PR runs are never cancelled, we add a fallback of `github.run_id`. This is a unique value for each workflow run.
3334- Of course, we run multiple workflows at the same time, so we add `github.workflow` to the key. Otherwise workflows would cancel each other.
35
···1name: Eval
23on:
4- pull_request:
5- paths:
6- - .github/workflows/eval.yml
7- - .github/workflows/reviewers.yml # needs eval results from the same event type
8- pull_request_target:
9- push:
10- # Keep this synced with ci/request-reviews/dev-branches.txt
11- branches:
12- - master
13- - staging
14- - release-*
15- - staging-*
16- - haskell-updates
17- - python-updates
18-19-concurrency:
20- group: eval-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
21- cancel-in-progress: true
2223permissions: {}
24···2829jobs:
30 prepare:
31- name: Prepare
32 runs-on: ubuntu-24.04-arm
33 outputs:
34 mergedSha: ${{ steps.get-merge-commit.outputs.mergedSha }}
···49 run: |
50 echo "systems=$(jq -c <ci/supportedSystems.json)" >> "$GITHUB_OUTPUT"
5152- outpaths:
53- name: Outpaths
54 runs-on: ubuntu-24.04-arm
55 needs: [prepare]
56 strategy:
57 fail-fast: false
58 matrix:
59 system: ${{ fromJSON(needs.prepare.outputs.systems) }}
060 steps:
61 - name: Enable swap
62 run: |
···109 run_id = (await github.rest.actions.listWorkflowRuns({
110 owner: context.repo.owner,
111 repo: context.repo.repo,
112- workflow_id: 'eval.yml',
113 event: 'push',
114 head_sha: targetSha
115 })).data.workflow_runs[0].id
116 } catch {
117- throw new Error(`Could not find an eval.yml workflow run for ${targetSha}.`)
118 }
119120 core.setOutput('targetRunId', run_id)
···161 path: diff/*
162163 compare:
164- name: Comparison
165 runs-on: ubuntu-24.04-arm
166- needs: [prepare, outpaths]
167 if: needs.prepare.outputs.targetSha
168 permissions:
169 issues: write # needed to create *new* labels
···262 # No dependency on "compare", so that it can start at the same time.
263 # We only wait for the "comparison" artifact to be available, which makes the start-to-finish time
264 # for the eval workflow considerably faster.
265- needs: [prepare, outpaths]
266 if: needs.prepare.outputs.targetSha
267 uses: ./.github/workflows/reviewers.yml
268- secrets: inherit
0000000000000000000000000
···1name: Eval
23on:
4+ workflow_call:
5+ secrets:
6+ OWNER_APP_PRIVATE_KEY:
7+ required: false
0000000000000089permissions: {}
10···1415jobs:
16 prepare:
017 runs-on: ubuntu-24.04-arm
18 outputs:
19 mergedSha: ${{ steps.get-merge-commit.outputs.mergedSha }}
···34 run: |
35 echo "systems=$(jq -c <ci/supportedSystems.json)" >> "$GITHUB_OUTPUT"
3637+ eval:
038 runs-on: ubuntu-24.04-arm
39 needs: [prepare]
40 strategy:
41 fail-fast: false
42 matrix:
43 system: ${{ fromJSON(needs.prepare.outputs.systems) }}
44+ name: ${{ matrix.system }}
45 steps:
46 - name: Enable swap
47 run: |
···94 run_id = (await github.rest.actions.listWorkflowRuns({
95 owner: context.repo.owner,
96 repo: context.repo.repo,
97+ workflow_id: 'push.yml',
98 event: 'push',
99 head_sha: targetSha
100 })).data.workflow_runs[0].id
101 } catch {
102+ throw new Error(`Could not find an push.yml workflow run for ${targetSha}.`)
103 }
104105 core.setOutput('targetRunId', run_id)
···146 path: diff/*
147148 compare:
0149 runs-on: ubuntu-24.04-arm
150+ needs: [prepare, eval]
151 if: needs.prepare.outputs.targetSha
152 permissions:
153 issues: write # needed to create *new* labels
···246 # No dependency on "compare", so that it can start at the same time.
247 # We only wait for the "comparison" artifact to be available, which makes the start-to-finish time
248 # for the eval workflow considerably faster.
249+ needs: [prepare, eval]
250 if: needs.prepare.outputs.targetSha
251 uses: ./.github/workflows/reviewers.yml
252+ secrets:
253+ OWNER_APP_PRIVATE_KEY: ${{ secrets.OWNER_APP_PRIVATE_KEY }}
254+255+ misc:
256+ if: ${{ github.event_name != 'push' }}
257+ runs-on: ubuntu-24.04-arm
258+ steps:
259+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
260+ with:
261+ sparse-checkout: .github/actions
262+ - name: Check if the PR can be merged and checkout the merge commit
263+ uses: ./.github/actions/get-merge-commit
264+ with:
265+ merged-as-untrusted: true
266+267+ - name: Install Nix
268+ uses: cachix/install-nix-action@17fe5fb4a23ad6cbbe47d6b3f359611ad276644c # v31
269+ with:
270+ extra_nix_config: sandbox = true
271+272+ - name: Ensure flake outputs on all systems still evaluate
273+ run: nix flake check --all-systems --no-build ./untrusted
274+275+ - name: Query nixpkgs with aliases enabled to check for basic syntax errors
276+ run: |
277+ time nix-env -I ./untrusted -f ./untrusted -qa '*' --option restrict-eval true --option allow-import-from-derivation false >/dev/null
+3-4
.github/workflows/labels.yml
···3# access to the GitHub API. This means that it should not evaluate user input in
4# a way that allows code injection.
56-name: "Label PR"
78on:
9 schedule:
···33 shell: bash
3435jobs:
36- labels:
37- name: label-pr
38 runs-on: ubuntu-24.04-arm
39 if: github.event_name != 'schedule' || github.repository_owner == 'NixOS'
40 steps:
···147148 const run_id = (await github.rest.actions.listWorkflowRuns({
149 ...context.repo,
150- workflow_id: 'eval.yml',
151 event: 'pull_request_target',
152 // For PR events, the workflow run is still in progress with this job itself.
153 status: prEventCondition ? 'in_progress' : 'success',
···3# access to the GitHub API. This means that it should not evaluate user input in
4# a way that allows code injection.
56+name: Labels
78on:
9 schedule:
···33 shell: bash
3435jobs:
36+ update:
037 runs-on: ubuntu-24.04-arm
38 if: github.event_name != 'schedule' || github.repository_owner == 'NixOS'
39 steps:
···146147 const run_id = (await github.rest.actions.listWorkflowRuns({
148 ...context.repo,
149+ workflow_id: 'pr.yml',
150 event: 'pull_request_target',
151 // For PR events, the workflow run is still in progress with this job itself.
152 status: prEventCondition ? 'in_progress' : 'success',
···1+commit c9282b73f3d09daff23a2603addd94605596ebe7
2+Author: Robert Schiele <rschiele@gmail.com>
3+Date: Thu May 8 19:16:46 2025 +0200
4+5+ remove forcing GDK_BACKEND to x11
6+7+ It seems the problems on Wayland from the past are removed meanwhile.
8+9+diff --git a/src/CLI/GuiParams.cpp b/src/CLI/GuiParams.cpp
10+index f44b91651f..41b42ff368 100644
11+--- a/src/CLI/GuiParams.cpp
12++++ b/src/CLI/GuiParams.cpp
13+@@ -107,9 +107,8 @@ int start_gui_with_params(GUI::GUI_InitParams& params)
14+ #if !defined(_WIN32) && !defined(__APPLE__)
15+ // likely some linux / unix system
16+ const char* display = boost::nowide::getenv("DISPLAY");
17+- // const char *wayland_display = boost::nowide::getenv("WAYLAND_DISPLAY");
18+- //if (! ((display && *display) || (wayland_display && *wayland_display))) {
19+- if (!(display && *display)) {
20++ const char *wayland_display = boost::nowide::getenv("WAYLAND_DISPLAY");
21++ if (! ((display && *display) || (wayland_display && *wayland_display))) {
22+ // DISPLAY not set.
23+ boost::nowide::cerr << "DISPLAY not set, GUI mode not available." << std::endl << std::endl;
24+ print_help(false);
25+@@ -141,4 +140,4 @@ int start_as_gcode_viewer(GUI::GUI_InitParams& gui_params)
26+ }
27+ #else // SLIC3R_GUI
28+ // If there is no GUI, we shall ignore the parameters. Remove them from the list.
29+-#endif // SLIC3R_GUI
30+\ No newline at end of file
31++#endif // SLIC3R_GUI
32+diff --git a/src/CLI/Setup.cpp b/src/CLI/Setup.cpp
33+index 82e03d466d..95acdf3477 100644
34+--- a/src/CLI/Setup.cpp
35++++ b/src/CLI/Setup.cpp
36+@@ -212,11 +212,6 @@ static bool setup_common()
37+ save_main_thread_id();
38+39+ #ifdef __WXGTK__
40+- // On Linux, wxGTK has no support for Wayland, and the app crashes on
41+- // startup if gtk3 is used. This env var has to be set explicitly to
42+- // instruct the window manager to fall back to X server mode.
43+- ::setenv("GDK_BACKEND", "x11", /* replace */ true);
44+-
45+ // https://github.com/prusa3d/PrusaSlicer/issues/12969
46+ ::setenv("WEBKIT_DISABLE_COMPOSITING_MODE", "1", /* replace */ false);
47+ ::setenv("WEBKIT_DISABLE_DMABUF_RENDERER", "1", /* replace */ false);
48+@@ -338,4 +333,4 @@ bool setup(Data& cli, int argc, char** argv)
49+ return true;
50+ }
51+52+-}
53+\ No newline at end of file
54++}
+7
pkgs/applications/misc/prusa-slicer/default.nix
···70 rev = "version_${finalAttrs.version}";
71 };
72000000073 # (not applicable to super-slicer fork)
74 postPatch = lib.optionalString (finalAttrs.pname == "prusa-slicer") (
75 # Patch required for GCC 14, but breaks on clang
···70 rev = "version_${finalAttrs.version}";
71 };
7273+ # only applies to prusa slicer because super-slicer overrides *all* patches
74+ patches = [
75+ # https://github.com/NixOS/nixpkgs/issues/415703
76+ # https://gitlab.archlinux.org/archlinux/packaging/packages/prusa-slicer/-/merge_requests/5
77+ ./allow_wayland.patch
78+ ];
79+80 # (not applicable to super-slicer fork)
81 postPatch = lib.optionalString (finalAttrs.pname == "prusa-slicer") (
82 # Patch required for GCC 14, but breaks on clang
···32 url = "https://github.com/pyodide/pyodide/releases/download/${pyodideVersion}/pyodide-${pyodideVersion}.tar.bz2";
33 };
3435- npmDepsHash = "sha256-bt0Q6/ajrMA2yfdWyF+/NeImomRMspLiX3wu+EJ8mTU=";
3637 # Disabling `pyodide:fetch` as it downloads packages during `buildPhase`
38 # Until this is solved, running python packages from the browser will not work.
···32 url = "https://github.com/pyodide/pyodide/releases/download/${pyodideVersion}/pyodide-${pyodideVersion}.tar.bz2";
33 };
3435+ npmDepsHash = "sha256-rUFCFYbthr0IJ5oIMgb3tr5kTqmZN40EPn05xR3LL+A=";
3637 # Disabling `pyodide:fetch` as it downloads packages during `buildPhase`
38 # Until this is solved, running python packages from the browser will not work.
···7 kcoreaddons,
8 kwidgetsaddons,
9 wrapQtAppsHook,
000010}:
11-stdenv.mkDerivation rec {
12 pname = "koi";
13- version = "0.4";
1415 src = fetchFromGitHub {
16 owner = "baduhai";
17 repo = "Koi";
18- rev = version;
19- sha256 = "sha256-ip7e/Sz/l5UiTFUTLJPorPO7NltE2Isij2MCmvHZV40=";
20 };
2122- # See https://github.com/baduhai/Koi/blob/master/development/Nix%20OS/dev.nix
23- sourceRoot = "${src.name}/src";
000000000000000000024 nativeBuildInputs = [
25 cmake
26 wrapQtAppsHook
···31 kwidgetsaddons
32 ];
3334- meta = with lib; {
35 description = "Scheduling LIGHT/DARK Theme Converter for the KDE Plasma Desktop";
36 longDescription = ''
37 Koi is a program designed to provide the KDE Plasma Desktop functionality to automatically switch between light and dark themes. Koi is under semi-active development, and while it is stable enough to use daily, expect bugs. Koi is designed to be used with Plasma, and while some features may function under different desktop environments, they are unlikely to work and untested.
···47 - Hide application to system tray
48 - Toggle between LIGHT/DARK themes by clicking mouse wheel
49 '';
50- license = licenses.lgpl3;
51- platforms = platforms.linux;
052 homepage = "https://github.com/baduhai/Koi";
53 maintainers = with lib.maintainers; [ fnune ];
54 };
55-}
···7 kcoreaddons,
8 kwidgetsaddons,
9 wrapQtAppsHook,
10+ kdbusaddons,
11+ kde-cli-tools,
12+ plasma-workspace,
13+ qtstyleplugin-kvantum,
14}:
15+stdenv.mkDerivation (finalAttrs: {
16 pname = "koi";
17+ version = "0.5.1";
1819 src = fetchFromGitHub {
20 owner = "baduhai";
21 repo = "Koi";
22+ tag = finalAttrs.version;
23+ hash = "sha256-fXLGlq41Qwdp0cYJcNqPlYnlpVXsZk0imYxP7Bgdcvw=";
24 };
2526+ patches = [
27+ # koi tries to access KDE utility binaries at their absolute paths or by using `whereis`.
28+ # We patch the absolute paths below in `postPatch` and replace the `whereis` invocations
29+ # here with a placeholder that is also substituted in `postPatch`.
30+ ./0001-locate-plasma-tools.patch
31+ ];
32+33+ postPatch = ''
34+ substituteInPlace src/utils.cpp \
35+ --replace-fail /usr/bin/kquitapp6 ${lib.getExe' kdbusaddons "kquitapp6"} \
36+ --replace-fail /usr/bin/kstart ${lib.getExe' kde-cli-tools "kstart"}
37+ substituteInPlace src/plugins/plasmastyle.cpp \
38+ --replace-fail /usr/bin/plasma-apply-desktoptheme ${lib.getExe' plasma-workspace "plasma-apply-desktoptheme"}
39+ substituteInPlace src/plugins/colorscheme.cpp \
40+ --replace-fail '@plasma-apply-colorscheme@' ${lib.getExe' plasma-workspace "plasma-apply-colorscheme"}
41+ substituteInPlace src/plugins/icons.cpp \
42+ --replace-fail '@plasma-changeicons@' ${plasma-workspace}/libexec/plasma-changeicons
43+ substituteInPlace src/plugins/kvantumstyle.cpp \
44+ --replace-fail /usr/bin/kvantummanager ${lib.getExe' qtstyleplugin-kvantum "kvantummanager"}
45+ '';
46+47 nativeBuildInputs = [
48 cmake
49 wrapQtAppsHook
···54 kwidgetsaddons
55 ];
5657+ meta = {
58 description = "Scheduling LIGHT/DARK Theme Converter for the KDE Plasma Desktop";
59 longDescription = ''
60 Koi is a program designed to provide the KDE Plasma Desktop functionality to automatically switch between light and dark themes. Koi is under semi-active development, and while it is stable enough to use daily, expect bugs. Koi is designed to be used with Plasma, and while some features may function under different desktop environments, they are unlikely to work and untested.
···70 - Hide application to system tray
71 - Toggle between LIGHT/DARK themes by clicking mouse wheel
72 '';
73+ license = lib.licenses.lgpl3;
74+ platforms = lib.platforms.linux;
75+ changelog = "https://github.com/baduhai/Koi/releases/tag/${finalAttrs.version}";
76 homepage = "https://github.com/baduhai/Koi";
77 maintainers = with lib.maintainers; [ fnune ];
78 };
79+})