Skip to content

Commit

Permalink
🐛 Support nix-darwin by removing xvfb-run deps and finally run ctest
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierLDff committed Jan 4, 2025
1 parent 7ee5d3f commit c0b17c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@

# nix
result*
.direnv
17 changes: 4 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@

buildInputs = buildInputsQt;

nativeCheckInputs = with pkgs; [
dbus
xvfb-run
];

shellHook = ''
# Crazy shell hook to set up Qt environment, from:
# https://discourse.nixos.org/t/python-qt-woes/11808/12
Expand All @@ -68,7 +63,7 @@

packages = {
qolm = with pkgs; stdenv.mkDerivation rec {
inherit version nativeBuildInputs buildInputs nativeCheckInputs;
inherit version nativeBuildInputs buildInputs;
inherit CPM_USE_LOCAL_PACKAGES;

pname = "qolm";
Expand Down Expand Up @@ -118,11 +113,9 @@
echo "Run shell hook"
${shellHook}
# This used to work with Qt5, but not with Qt6...?
# More investigation needed
# xvfb-run dbus-run-session \
# --config-file=${pkgs.dbus}/share/dbus-1/session.conf \
# ctest -C "${cmakeConfigType}" --output-on-failure --verbose
export QT_QPA_PLATFORM=offscreen
echo "Run tests"
ctest -C "${cmakeConfigType}" --output-on-failure --verbose
'';

installPhase = ''
Expand All @@ -142,7 +135,6 @@
gh
];
fullDevBuildInputs = with pkgs; nativeBuildInputs
++ nativeCheckInputs
++ minimalDevBuildInputs
++ [
sccache
Expand All @@ -169,7 +161,6 @@
inherit CPM_USE_LOCAL_PACKAGES;

nativeBuildInputs = nativeBuildInputs
++ nativeCheckInputs
++ minimalDevBuildInputs;
};

Expand Down

0 comments on commit c0b17c9

Please sign in to comment.