feat: add poppler-utils (pdftotext) to nix flake
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
21a61b1c75
commit
c3b63ea2f5
1 changed files with 15 additions and 1 deletions
16
flake.nix
16
flake.nix
|
|
@ -21,6 +21,17 @@
|
|||
|
||||
marker = import ./nix/marker.nix { inherit pkgs; };
|
||||
|
||||
# Pre-download the font marker needs so it doesn't try to write
|
||||
# into the read-only nix store at runtime.
|
||||
marker-font = pkgs.fetchurl {
|
||||
url = "https://models.datalab.to/artifacts/GoNotoCurrent-Regular.ttf";
|
||||
hash = "sha256-iCr7q5ZWCMLSvGJ/2AFrliqlpr4tNY+d4kp7WWfFYy4=";
|
||||
};
|
||||
marker-font-dir = pkgs.runCommand "marker-font-dir" {} ''
|
||||
mkdir -p $out
|
||||
ln -s ${marker-font} $out/GoNotoCurrent-Regular.ttf
|
||||
'';
|
||||
|
||||
paper = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "paper";
|
||||
version = "0.1.0";
|
||||
|
|
@ -35,7 +46,9 @@
|
|||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/paper \
|
||||
--prefix PATH : ${pkgs.lib.makeBinPath [ marker.markerEnv ]}
|
||||
--prefix PATH : ${pkgs.lib.makeBinPath [ marker.markerEnv pkgs.poppler-utils ]} \
|
||||
--set FONT_DIR "${marker-font-dir}" \
|
||||
--set FONT_PATH "${marker-font-dir}/GoNotoCurrent-Regular.ttf"
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
|
@ -49,6 +62,7 @@
|
|||
buildInputs = [
|
||||
rust-nightly
|
||||
marker.markerEnv
|
||||
pkgs.poppler-utils
|
||||
];
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue