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";
version = "0.0.0.9";
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(
{ mkDerivation, array, base, base-compat, base-orphans, containers
, deepseq, extra, inspection-testing, mtl, QuickCheck, stdenv
2019-01-06 02:52:15 +00:00
}:
mkDerivation {
2019-11-11 23:49:54 +00:00
pname = "algebraic-graphs";
version = "0.4";
sha256 = "c905d32a6178a11e3c8096dbbf3bd19e570e87362c51fdc8653b43a51e46d3b7";
2019-01-06 02:52:15 +00:00
libraryHaskellDepends = [
2019-11-11 23:49:54 +00:00
array base base-compat containers deepseq mtl
2019-01-06 02:52:15 +00:00
];
2019-11-11 23:49:54 +00:00
testHaskellDepends = [
array base base-compat base-orphans containers extra
inspection-testing QuickCheck
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;
2018-08-03 00:18:19 +00:00
doCheck = false;
}) {};
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 ];
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;
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