43199e5b8b
CI / check (push) Has been cancelled
Packages the storytold/pdfcraft Cargo workspace at tag v0.18.0: the pdfcraft
desktop app and pdfcraft-cli, with the desktop entry, AppStream metadata,
icons, licences and the two CC-BY-SA OCR models the app reads from
share/pdfcraft/models. No upstream binaries are downloaded.
Two deviations from upstream's build instructions:
- The three [patch.crates-io] entries upstream's own Cargo.lock records as
[[patch.unused]] (egui_demo_lib, egui_inspection, egui_system_font_provider)
have no package in nixpkgs' partial vendor tree to resolve against, so cargo
aborts. postPatch drops them; they are unused, and cargo drops the matching
lock entries itself, so the build runs without --locked.
- nixos-unstable's rustc 1.98.1 and 1.99.0 reject every AVX-VNNI intrinsic
("intrinsic signature mismatch for llvm.x86.avx512.vpdpbusd/vpwssd"), and
rten-gemm, pic-scale and zlib-rs all use one. The package therefore builds
against a new nixpkgs-rust195 input (nixos-26.05, rustc 1.95.0), the same
pattern as nixpkgs-torch211. Follow-up: nix-overlay-g4w.
Also adds a Home Manager module (programs.pdfcraft) to
homeManagerModules.default, and documents both in the README.
34 lines
1.0 KiB
Nix
34 lines
1.0 KiB
Nix
# Home Manager module: installs PdfCraft and its command-line tool.
|
|
#
|
|
# The package puts both `pdfcraft` (the desktop app) and `pdfcraft-cli` (headless runner and
|
|
# opt-in MCP server) on PATH, and its icons, desktop entry and AppStream metadata in
|
|
# $out/share, which a NixOS system profile or an XDG_DATA_DIRS that covers ~/.nix-profile/share
|
|
# shows in the application launcher.
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.programs.pdfcraft;
|
|
in
|
|
{
|
|
options.programs.pdfcraft = {
|
|
enable = lib.mkEnableOption "PdfCraft PDF workbench and its pdfcraft-cli tool";
|
|
|
|
package = lib.mkOption {
|
|
type = lib.types.package;
|
|
# The flake's overlay keeps its packages under the `millerson-nix-overlay` namespace.
|
|
default = pkgs.millerson-nix-overlay.pdfcraft or pkgs.pdfcraft;
|
|
defaultText = lib.literalExpression "pkgs.millerson-nix-overlay.pdfcraft or pkgs.pdfcraft";
|
|
description = "The pdfcraft package to use.";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
home.packages = [ cfg.package ];
|
|
};
|
|
}
|