Skip to content

Commit

Permalink
run nix
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierLDff committed Aug 20, 2024
1 parent f521d87 commit 07e0fe1
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 12 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 👷 Nix CI

on:
push:
branches:
- main
tags:
- v*
pull_request:
types: [opened, synchronize, labeled]
workflow_dispatch:

jobs:
BuildNixFlake:
runs-on: ubuntu-latest

steps:
-
uses: naostage/nix-installer-action@10f43c0d327c8599928f907a943a737cff2505f3
-
uses: naostage/magic-nix-cache-action@1718a05c5e2bf6ac5d9b1b0ebd5fca6eaef2b923
with:
use-flakehub: false
-
uses: actions/checkout@v4
-
name: 🔨 Build Derivation
id: build
run: |
nix build .#qolm --print-build-logs
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
# Ignore CLion project files
*.idea
# For macOs users
.DS_Store
.DS_Store

# nix
result*
13 changes: 4 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,16 @@
QOlm_ExampleQml \
--parallel $NIX_BUILD_CORES
echo "Run shell hook"
${shellHook}
HOME="/tmp" xvfb-run dbus-run-session \
xvfb-run dbus-run-session \
--config-file=${pkgs.dbus}/share/dbus-1/session.conf \
ctest -C "${cmakeConfigType}" --output-on-failure --verbose
'';

installPhase = ''
mkdir -p $out/bin
mv "./${cmakeConfigType}/KrameraDaemon" "$out/bin/kdaemon"
'';

doInstallCheck = doCheck;
installCheckPhase = pkgs.lib.optionalString doInstallCheck ''
xvfb-run $out/bin/kdaemon --help
cmake --install . --config ${cmakeConfigType} --prefix $out
'';
};

Expand All @@ -156,7 +151,7 @@
lazygit
neovim
]
++ optionals (stdenv.isLinux) [
++ pkgs.lib.lists.optionals (stdenv.isLinux) [
gdb
];

Expand Down
3 changes: 1 addition & 2 deletions tests/tst_QOlmTestsQml.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import QtQuick 2.0
import QtTest 1.2
import QtQml 2.15

import QOlmTestsQml 1.0

Expand Down Expand Up @@ -170,4 +170,3 @@ TestCase
}

}

0 comments on commit 07e0fe1

Please sign in to comment.