nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 pdfium-binaries,
5}:
6
7{ version, src, ... }:
8
9stdenv.mkDerivation {
10 pname = "pdfrx";
11 inherit version src;
12 inherit (src) passthru;
13
14 postPatch = lib.optionalString (lib.versionOlder version "2.2.9") ''
15 substituteInPlace linux/CMakeLists.txt \
16 --replace-fail "\''${PDFIUM_DIR}/\''${PDFIUM_RELEASE}" "${pdfium-binaries}"
17 '';
18
19 installPhase = ''
20 runHook preInstall
21
22 cp --recursive . $out
23
24 runHook postInstall
25 '';
26}