From 219930f3c649a3712864c2e00ebf630279beda72 Mon Sep 17 00:00:00 2001 From: andromeda Date: Sat, 18 Apr 2026 10:08:48 +0200 Subject: use xvfb-run to create headless anki if no running instance is available --- flake.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 8106847..346c559 100644 --- a/flake.nix +++ b/flake.nix @@ -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 + ''; }; }; } -- cgit v1.3.1