Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Support nix-darwin by removing xvfb-run deps and finally run ctest #26

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading