Skip to content

Instantly share code, notes, and snippets.

@bencoman
Last active November 1, 2017 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bencoman/4d39664e084c160c3cc95a7a5ae0c028 to your computer and use it in GitHub Desktop.
Save bencoman/4d39664e084c160c3cc95a7a5ae0c028 to your computer and use it in GitHub Desktop.
nixos-pdfium-try1
# This file: default.nix
#
# Being new to NixOS, I don't understand everything below. I culled and modified it from...
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/browsers/chromium/default.nix
# which integrates pdfium as its PDF viewer.
#
# Currently `nix-shell` then `unpackPhase` produces an error "unpacker produced multiple directories"
# Reading around, it seemed that uncommenting the #unpackPhase= group might avoid that error, but no dice.
# Looking for some assistance to unpack the tarball.
pkgs ? import <nixpkgs>{} } :
let
# callPackage = pdfium;
# pdfium = {
#
# mkChromiumDerivation = callPackage ./common.nix {
# };
# };
#
# inherit (stdenv.lib) versionAtLeast;
in pkgs.stdenv.mkDerivation {
name = "pdfium.99.9";
src = pkgs.fetchgit {
"url" = "https://pdfium.googlesource.com/pdfium";
"rev" = "effa1b15ae2ab34ae15892787d5c1caa015bd2d4";
"sha256" = "1xmaxcdc71ks1nc34liby7k68ynb7jjhah012nxklpvw1l3xwilf";
"fetchSubmodules" = true;
};
#unpackPhase = ''
# runHook preUnpack
# echo HELLO
# mkdir src
# tar -C pdfium-src -xvzf $src
# export sourceRoot="pdfium-src"
# runHook postUnpack
# '';
#
buildInputs = [
];
outputs = ["out" ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment