tracer/shell.nix

103 lines
3.6 KiB
Nix
Raw Normal View History

2019-01-06 02:52:15 +00:00
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
2018-03-27 22:24:38 +00:00
let
inherit (nixpkgs) pkgs;
2019-11-11 23:49:54 +00:00
affection = with haskellPackages; callPackage(
{ mkDerivation, base, bytestring, clock, containers, glib, linear
, monad-loops, monad-parallel, mtl, OpenGL, sdl2, stdenv, stm, text
, uuid, vector
2018-09-24 22:13:09 +00:00
}:
mkDerivation {
pname = "affection";
2020-05-04 22:48:05 +00:00
version = "0.0.0.10";
2019-11-11 23:49:54 +00:00
src = ../affection;
2018-09-24 22:13:09 +00:00
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
base bytestring clock containers glib linear monad-loops
2019-11-11 23:49:54 +00:00
monad-parallel mtl OpenGL sdl2 stm text uuid vector
2018-09-24 22:13:09 +00:00
];
homepage = "https://github.com/nek0/affection#readme";
description = "A simple Game Engine using SDL";
license = stdenv.lib.licenses.lgpl3;
2019-11-11 23:49:54 +00:00
doHaddock = false;
2018-09-24 22:13:09 +00:00
}) {};
2019-11-11 23:49:54 +00:00
algebraic-graphs = with haskellPackages; callPackage(
2020-05-05 08:26:16 +00:00
{ mkDerivation, array, base, containers, deepseq, extra
, inspection-testing, mtl, QuickCheck, stdenv, transformers
2019-01-06 02:52:15 +00:00
}:
mkDerivation {
2019-11-11 23:49:54 +00:00
pname = "algebraic-graphs";
2020-05-05 08:26:16 +00:00
version = "0.5";
sha256 = "89b9fecf8245476ec823355125fcb95decf41fd9784e807d7bd0d09f0a79c50b";
2019-01-06 02:52:15 +00:00
libraryHaskellDepends = [
2020-05-05 08:26:16 +00:00
array base containers deepseq mtl transformers
2019-01-06 02:52:15 +00:00
];
2019-11-11 23:49:54 +00:00
testHaskellDepends = [
2020-05-05 08:26:16 +00:00
array base containers deepseq extra inspection-testing mtl
QuickCheck transformers
2018-08-03 00:18:19 +00:00
];
2019-11-11 23:49:54 +00:00
homepage = "https://github.com/snowleopard/alga";
description = "A library for algebraic graph construction and transformation";
license = stdenv.lib.licenses.mit;
2020-05-05 08:26:16 +00:00
}
) {};
2018-08-03 00:18:19 +00:00
2019-11-11 23:49:54 +00:00
nanovg = with haskellPackages; callPackage(
{ mkDerivation, base, bytestring, c2hs, containers, glew
, hspec, inline-c, libGL, libGLU, QuickCheck, stdenv, text, vector
2018-09-24 22:13:09 +00:00
}:
2018-03-27 22:24:38 +00:00
mkDerivation {
pname = "nanovg";
2018-06-03 02:25:19 +00:00
version = "0.6.0.0";
2019-11-11 23:49:54 +00:00
sha256 = "e35a2772f2a2e71916013cab70eeb8eedd6f66b5490ddf7ce237c8c76895d496";
revision = "1";
editedCabalFile = "1lhfsq50r9bdby7mfscw8ih3wsz2m19lr2a2z9b6diaf5kz76vij";
configureFlags = [ "-fgl3" ];
2018-03-27 22:24:38 +00:00
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [ base bytestring containers text vector ];
2020-05-12 14:22:21 +00:00
librarySystemDepends = [ glew libGL libGLU pkgs.xorg.libX11 ];
2018-09-24 22:13:09 +00:00
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;
2019-11-11 23:49:54 +00:00
doCheck = false;
2018-05-17 11:06:13 +00:00
}) {};
2019-11-11 23:49:54 +00:00
f = { mkDerivation, astar, base
2018-09-24 22:13:09 +00:00
, bytestring, containers, ecstasy, JuicyPixels, JuicyPixels-extra
2019-11-11 23:49:54 +00:00
, linear, matrix, mtl, OpenGL, parallel, random, sdl2
, split, stdenv, stm, text, unordered-containers, vector
2018-03-27 22:24:38 +00:00
}:
mkDerivation {
pname = "tracer-game";
version = "0.0.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
2019-11-11 23:49:54 +00:00
affection algebraic-graphs astar base bytestring containers ecstasy
JuicyPixels JuicyPixels-extra linear matrix mtl nanovg OpenGL
parallel random sdl2 split stm text unordered-containers vector
2018-03-27 22:24:38 +00:00
];
license = stdenv.lib.licenses.gpl3;
};
2019-01-06 02:52:15 +00:00
haskellPackages = if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
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