2019-01-29 22:55:45 +00:00
|
|
|
{ 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;
|
2019-01-31 21:00:29 +00:00
|
|
|
enableLibraryProfiling = true;
|
|
|
|
enableExecutableProfiling = true;
|
2019-01-29 22:55:45 +00:00
|
|
|
}) {};
|
|
|
|
|
|
|
|
inherit (nixpkgs) pkgs;
|
|
|
|
|
2019-02-02 21:45:57 +00:00
|
|
|
f = { mkDerivation, base, bytestring, containers, linear, magic, monad-loops,
|
|
|
|
optparse-applicative, OpenGL, GLUtil, poppler, split, stdenv, text, time
|
2019-01-30 22:10:00 +00:00
|
|
|
}:
|
2019-01-29 22:55:45 +00:00
|
|
|
mkDerivation {
|
|
|
|
pname = "ibis";
|
|
|
|
version = "0.0.0.0";
|
|
|
|
src = ./.;
|
|
|
|
isLibrary = false;
|
|
|
|
isExecutable = true;
|
2019-02-02 21:45:57 +00:00
|
|
|
executableHaskellDepends = [ base bytestring containers linear sdl2 magic
|
|
|
|
monad-loops OpenGL GLUtil optparse-applicative poppler split text
|
|
|
|
time
|
|
|
|
];
|
2019-01-29 22:55:45 +00:00
|
|
|
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
|