2018-10-08 16:58:23 +00:00
|
|
|
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc861", doBenchmark ? false }:
|
2018-03-27 22:24:38 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
inherit (nixpkgs) pkgs;
|
|
|
|
|
2018-09-24 22:13:09 +00:00
|
|
|
provideOldHaskellAttributeNames = true;
|
|
|
|
|
|
|
|
aff = with haskellPackages; callPackage(
|
|
|
|
{ mkDerivation, base, bytestring, clock, containers, fetchgit, glib
|
|
|
|
, linear, monad-loops, monad-parallel, mtl, OpenGL, stdenv
|
|
|
|
, stm, text, uuid, vector
|
|
|
|
}:
|
|
|
|
mkDerivation {
|
|
|
|
pname = "affection";
|
|
|
|
version = "0.0.0.9";
|
2018-09-25 23:17:31 +00:00
|
|
|
sha256 = "d9feed3eed54ad2ae61ebc560af8761959cb4dc46c2bbf5a804f586b9244cb4e";
|
2018-09-24 22:13:09 +00:00
|
|
|
configureFlags = [ "-fdebug" ];
|
|
|
|
isLibrary = true;
|
|
|
|
isExecutable = true;
|
|
|
|
libraryHaskellDepends = [
|
|
|
|
base bytestring clock containers glib linear monad-loops
|
|
|
|
monad-parallel mtl OpenGL sdl stm text uuid vector
|
|
|
|
];
|
|
|
|
homepage = "https://github.com/nek0/affection#readme";
|
|
|
|
description = "A simple Game Engine using SDL";
|
|
|
|
license = stdenv.lib.licenses.lgpl3;
|
|
|
|
}) {};
|
|
|
|
|
|
|
|
sdl = with haskellPackages; callPackage(
|
|
|
|
{ mkDerivation, base, bytestring, deepseq, exceptions, linear
|
|
|
|
, StateVar, stdenv, text, transformers, vector, weigh, pkgconfig
|
2018-08-03 00:18:19 +00:00
|
|
|
}:
|
|
|
|
mkDerivation {
|
|
|
|
pname = "sdl2";
|
2018-09-24 22:13:09 +00:00
|
|
|
version = "2.4.1.0";
|
|
|
|
sha256 = "21a569c0c19f8ff2bbe1cf1d3eb32f65e8143806de353cedd240df5e9d088b5c";
|
2018-08-03 00:18:19 +00:00
|
|
|
isLibrary = true;
|
|
|
|
isExecutable = true;
|
|
|
|
enableSeparateDataOutput = true;
|
|
|
|
libraryHaskellDepends = [
|
|
|
|
base bytestring exceptions linear StateVar text transformers vector
|
|
|
|
];
|
2018-09-24 22:13:09 +00:00
|
|
|
buildDepends = [ pkgconfig ];
|
|
|
|
librarySystemDepends = [ nixpkgs.SDL2 pkgconfig ];
|
|
|
|
libraryPkgconfigDepends = [ nixpkgs.SDL2 pkgconfig ];
|
|
|
|
testHaskellDepends = [ base deepseq linear vector weigh ];
|
2018-08-03 00:18:19 +00:00
|
|
|
doCheck = false;
|
|
|
|
description = "Both high- and low-level bindings to the SDL library (version 2.0.4+).";
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
}) {};
|
|
|
|
|
2018-09-24 22:13:09 +00:00
|
|
|
nano = with haskellPackages; callPackage(
|
|
|
|
{ mkDerivation, base, bytestring, c2hs, containers, fetchgit
|
|
|
|
, glew, hspec, inline-c, libGL, libGLU, QuickCheck, stdenv, text
|
|
|
|
, vector
|
|
|
|
}:
|
2018-03-27 22:24:38 +00:00
|
|
|
mkDerivation {
|
|
|
|
pname = "nanovg";
|
2018-06-03 02:25:19 +00:00
|
|
|
version = "0.6.0.0";
|
2018-09-24 22:13:09 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/nek0/nanovg-hs.git";
|
|
|
|
sha256 = "1lh7y7n97md585y7wic4sn240ifpdmcgfrvyvmmdngaz4s8zy47f";
|
|
|
|
rev = "09b613ab382e73e401ed8c2bbf936b39a92a17e1";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
2018-03-27 22:24:38 +00:00
|
|
|
isLibrary = true;
|
|
|
|
isExecutable = true;
|
|
|
|
libraryHaskellDepends = [ base bytestring containers text vector ];
|
2018-09-24 22:13:09 +00:00
|
|
|
librarySystemDepends = [ glew libGL libGLU ];
|
|
|
|
libraryPkgconfigDepends = [ glew ];
|
2018-03-27 22:24:38 +00:00
|
|
|
libraryToolDepends = [ c2hs ];
|
|
|
|
testHaskellDepends = [ base containers hspec inline-c QuickCheck ];
|
|
|
|
homepage = "https://github.com/cocreature/nanovg-hs";
|
|
|
|
description = "Haskell bindings for nanovg";
|
2018-09-24 22:13:09 +00:00
|
|
|
license = stdenv.lib.licenses.isc;
|
2018-05-17 11:06:13 +00:00
|
|
|
}) {};
|
|
|
|
|
2018-09-24 22:13:09 +00:00
|
|
|
f = { mkDerivation, algebraic-graphs, astar, base
|
|
|
|
, bytestring, containers, ecstasy, JuicyPixels, JuicyPixels-extra
|
|
|
|
, linear, matrix, mtl, OpenGL, random, stdenv, stm
|
|
|
|
, text, unordered-containers, vector, pkgconfig
|
2018-03-27 22:24:38 +00:00
|
|
|
}:
|
|
|
|
mkDerivation {
|
|
|
|
pname = "tracer-game";
|
|
|
|
version = "0.0.0.0";
|
|
|
|
src = ./.;
|
|
|
|
isLibrary = false;
|
|
|
|
isExecutable = true;
|
|
|
|
executableHaskellDepends = [
|
2018-09-24 22:13:09 +00:00
|
|
|
aff algebraic-graphs astar base bytestring containers ecstasy
|
|
|
|
JuicyPixels JuicyPixels-extra linear matrix mtl nano OpenGL
|
|
|
|
random sdl stm text unordered-containers vector pkgconfig
|
2018-03-27 22:24:38 +00:00
|
|
|
];
|
2018-09-24 22:13:09 +00:00
|
|
|
enableExecutableProfiling = true;
|
2018-03-27 22:24:38 +00:00
|
|
|
license = stdenv.lib.licenses.gpl3;
|
|
|
|
};
|
|
|
|
|
2018-09-24 22:13:09 +00:00
|
|
|
haskellPackages = pkgs.haskellPackages;
|
2018-03-27 22:24:38 +00:00
|
|
|
|
|
|
|
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
|