2020-08-30 15:53:03 +00:00
|
|
|
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
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 = ./extern/affection;
|
2020-10-17 08:35:25 +00:00
|
|
|
configureFlags = [ "-fverbose" ];
|
2020-08-30 15:53:03 +00:00
|
|
|
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;
|
|
|
|
}) {};
|
|
|
|
|
2020-12-04 04:22:56 +00:00
|
|
|
f = { mkDerivation, aeson, base, bytestring, containers, derive-storable
|
2020-12-05 09:10:37 +00:00
|
|
|
, JuicyPixels, JuicyPixels-extra, linear, monad-loops, OpenGL, OpenGLRaw
|
2020-12-06 07:15:31 +00:00
|
|
|
, stdenv, sdl2, StateVar, stm, text, vector}:
|
2020-08-30 15:53:03 +00:00
|
|
|
mkDerivation {
|
|
|
|
pname = "pituicat";
|
|
|
|
version = "0.0.0.0";
|
|
|
|
src = ./.;
|
|
|
|
isLibrary = false;
|
|
|
|
isExecutable = true;
|
2020-12-06 07:15:31 +00:00
|
|
|
executableHaskellDepends = [ aeson affection base bytestring containers
|
|
|
|
derive-storable JuicyPixels JuicyPixels-extra linear monad-loops OpenGL
|
|
|
|
OpenGLRaw sdl2 StateVar stm text vector];
|
2020-08-30 15:53:03 +00:00
|
|
|
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
|