2020-05-13 02:21:49 +00:00
|
|
|
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
|
2020-02-05 06:21:39 +00:00
|
|
|
|
2020-02-01 15:09:09 +00:00
|
|
|
let
|
2020-05-13 02:21:49 +00:00
|
|
|
|
|
|
|
inherit (nixpkgs) pkgs;
|
|
|
|
|
|
|
|
affection = with haskellPackages; callPackage(
|
|
|
|
{ mkDerivation, base, bytestring, clock, containers, glib, linear
|
|
|
|
, monad-loops, monad-parallel, mtl, OpenGL, sdl2, stdenv, stm, text
|
|
|
|
, uuid, vector
|
|
|
|
}:
|
|
|
|
mkDerivation {
|
|
|
|
pname = "affection";
|
|
|
|
version = "0.0.0.10";
|
|
|
|
src = ../affection;
|
|
|
|
isLibrary = true;
|
|
|
|
isExecutable = true;
|
|
|
|
libraryHaskellDepends = [
|
|
|
|
base bytestring clock containers glib linear monad-loops
|
|
|
|
monad-parallel mtl OpenGL sdl2 stm text uuid vector
|
|
|
|
];
|
|
|
|
homepage = "https://github.com/nek0/affection#readme";
|
|
|
|
description = "A simple Game Engine using SDL";
|
|
|
|
license = stdenv.lib.licenses.lgpl3;
|
|
|
|
doHaddock = false;
|
|
|
|
}) {};
|
|
|
|
|
2020-05-13 03:42:32 +00:00
|
|
|
#GLUtil = with haskellPackages; callPackage(
|
|
|
|
# { mkDerivation, array, base, bytestring, containers, directory
|
|
|
|
# , filepath, hpp, JuicyPixels, linear, OpenGL, OpenGLRaw, stdenv
|
|
|
|
# , transformers, vector
|
|
|
|
# }:
|
|
|
|
# mkDerivation {
|
|
|
|
# pname = "GLUtil";
|
|
|
|
# version = "0.10.3";
|
|
|
|
# sha256 = "1933540d309209fb90f0632336ee6c54e160a12da8508dadaf16882a2358ec27";
|
|
|
|
# libraryHaskellDepends = [
|
|
|
|
# array base bytestring containers directory filepath hpp JuicyPixels
|
|
|
|
# linear OpenGL OpenGLRaw transformers vector
|
|
|
|
# ];
|
|
|
|
# libraryToolDepends = [ hpp ];
|
|
|
|
# description = "Miscellaneous OpenGL utilities";
|
|
|
|
# license = stdenv.lib.licenses.bsd3;
|
|
|
|
# }) {};
|
2020-05-13 02:21:49 +00:00
|
|
|
|
|
|
|
f = { mkDerivation, base, bytestring, containers
|
|
|
|
, JuicyPixels, JuicyPixels-extra, linear, OpenGL, OpenGLRaw
|
|
|
|
, random, sdl2, stdenv, stm
|
|
|
|
}:
|
|
|
|
mkDerivation {
|
|
|
|
pname = "canvas";
|
|
|
|
version = "0.0.0.0";
|
|
|
|
src = ./.;
|
|
|
|
isLibrary = false;
|
|
|
|
isExecutable = true;
|
|
|
|
executableHaskellDepends = [
|
2020-05-13 03:42:32 +00:00
|
|
|
affection base bytestring containers JuicyPixels
|
2020-05-13 02:21:49 +00:00
|
|
|
JuicyPixels-extra linear OpenGL OpenGLRaw random sdl2 stm
|
|
|
|
];
|
|
|
|
description = "A test implementation for drawing images with SDL2 and OpenGL";
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
};
|
|
|
|
|
|
|
|
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 {});
|
|
|
|
|
2020-02-01 15:09:09 +00:00
|
|
|
in
|
2020-05-13 02:21:49 +00:00
|
|
|
|
|
|
|
if pkgs.lib.inNixShell then drv.env else drv
|