Simple PDF presenter in Haskell using SDL2 and poppler.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

58 lines
1.9 KiB

{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
let
sdl2 = with haskellPackages; callPackage (
{ mkDerivation, base, bytestring, deepseq, exceptions, linear, SDL2
, StateVar, stdenv, text, transformers, vector, weigh
}:
mkDerivation {
pname = "sdl2";
version = "2.4.1.0";
sha256 = "21a569c0c19f8ff2bbe1cf1d3eb32f65e8143806de353cedd240df5e9d088b5c";
isLibrary = true;
isExecutable = true;
enableSeparateDataOutput = true;
libraryHaskellDepends = [
base bytestring exceptions linear StateVar text transformers vector
];
librarySystemDepends = [ SDL2 ];
libraryPkgconfigDepends = [ SDL2 ];
testHaskellDepends = [ base deepseq linear vector weigh ];
doCheck = false;
description = "Both high- and low-level bindings to the SDL library (version 2.0.4+).";
license = stdenv.lib.licenses.bsd3;
enableLibraryProfiling = true;
enableExecutableProfiling = true;
}) {};
inherit (nixpkgs) pkgs;
f = { mkDerivation, base, bytestring, containers, linear, magic, monad-loops,
optparse-applicative, OpenGL, GLUtil, poppler, split, stdenv, text, time
}:
mkDerivation {
pname = "ibis";
version = "0.0.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [ base bytestring containers linear sdl2 magic
monad-loops OpenGL GLUtil optparse-applicative poppler split text
time
];
description = "A pdf presenter";
license = stdenv.lib.licenses.gpl3;
};
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
drv = variant (haskellPackages.callPackage f {});
in
if pkgs.lib.inNixShell then drv.env else drv