diff options
| author | andromeda <andromeda@lenovo> | 2026-04-18 10:08:48 +0200 |
|---|---|---|
| committer | andromeda <andromeda@lenovo> | 2026-04-18 10:08:48 +0200 |
| commit | 219930f3c649a3712864c2e00ebf630279beda72 (patch) | |
| tree | f5ac37478b8b7c19f012db45745e30b8c5521675 /flake.nix | |
| parent | da9318338933e903fdf1b417768287df909e62a3 (diff) | |
use xvfb-run to create headless anki if no running instance is available
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -20,7 +20,7 @@ toolchain = fenix.packages.x86_64-linux.minimal.toolchain; in { devShells.x86_64-linux.default = pkgs.mkShell { - buildInputs = [toolchain]; + buildInputs = [toolchain pkgs.xvfb-run]; shellHook = '' export RUSTUP_TOOLCHAIN=${toolchain} ''; @@ -30,7 +30,12 @@ cargo = toolchain; rustc = toolchain; }).buildPackage { + nativeBuildInputs = [pkgs.makeWrapper]; src = ./.; + postInstall = '' + wrapProgram $out/bin/anki-cli \ + --prefix PATH : ${pkgs.xvfb-run}/bin + ''; }; }; } |
