tracer/shell.nix

165 lines
5.9 KiB
Nix
Raw Normal View History

2018-07-02 16:18:27 +00:00
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc843", doBenchmark ? false }:
2018-03-27 22:24:38 +00:00
let
inherit (nixpkgs) pkgs;
2018-08-03 00:18:19 +00:00
sdl2Nek0 = with haskellPackages; callPackage (
{ mkDerivation, base, bytestring, exceptions, linear, SDL2
, StateVar, stdenv, text, transformers, vector
}:
mkDerivation {
pname = "sdl2";
version = "2.4.0.1";
sha256 = "9a898d0acd6d7a4f341b3127d2c44e64b577e1128bc0b4d93a17ac510cb5644d";
isLibrary = true;
isExecutable = true;
enableSeparateDataOutput = true;
libraryHaskellDepends = [
base bytestring exceptions linear StateVar text transformers vector
];
doCheck = false;
librarySystemDepends = [ SDL2 ];
libraryPkgconfigDepends = [ SDL2 ];
description = "Both high- and low-level bindings to the SDL library (version 2.0.4+).";
license = stdenv.lib.licenses.bsd3;
}) {};
2018-03-27 22:24:38 +00:00
nanovgNeko = with haskellPackages; callPackage ({
mkDerivation, base, bytestring, c2hs, containers, glew, hspec,
inline-c, libGL, libGLU, QuickCheck, text, vector, pkgconfig }:
mkDerivation {
pname = "nanovg";
2018-06-03 02:25:19 +00:00
version = "0.6.0.0";
2018-03-27 22:24:38 +00:00
#src = pkgs.fetchFromGitHub {
# owner = "nek0";
# repo = "nanovg-hs";
# rev = "21868dc2c8e6eae8e7c0962d22890a8f2522cab0";
# sha256 = "0diyyajniyxzmg5za34crwwlajf40x8bplja6mbgv2syax5d446d";
# fetchSubmodules = true;
#};
2018-06-03 02:25:19 +00:00
#src = ../nanovg-hs;
2018-03-27 22:24:38 +00:00
revision = "1";
isLibrary = true;
isExecutable = true;
doCheck = false;
libraryHaskellDepends = [ base bytestring containers text vector ];
librarySystemDepends = [ glew libGL libGLU pkgconfig ];
libraryToolDepends = [ c2hs ];
testHaskellDepends = [ base containers hspec inline-c QuickCheck ];
homepage = "https://github.com/cocreature/nanovg-hs";
description = "Haskell bindings for nanovg";
license = pkgs.stdenv.lib.licenses.isc;
hydraPlatforms = pkgs.stdenv.lib.platforms.none;
}) { inherit (pkgs) glew; inherit (pkgs) libGL; inherit (pkgs) libGLU; inherit (pkgs) pkgconfig; };
2018-07-02 16:21:41 +00:00
agNek0 = with haskellPackages; callPackage (
{ mkDerivation, array, base, base-orphans, containers
, criterion, deepseq, extra, QuickCheck, stdenv
}:
mkDerivation {
pname = "algebraic-graphs";
version = "0.1.1.1";
sha256 = "8747a7d6f7a328b6073c1904883087a6a8e9a02d3bd8a5e35174c5f1c1cd1231";
libraryHaskellDepends = [
array base base-compat containers deepseq
];
testHaskellDepends = [
base bcNek0 base-orphans containers extra QuickCheck
];
benchmarkHaskellDepends = [
base base-compat containers criterion
];
homepage = "https://github.com/snowleopard/alga";
doCheck = false;
description = "A library for algebraic graph construction and transformation";
license = stdenv.lib.licenses.mit;
}) {};
bcNek0 = with haskellPackages; callpackage (
{ mkDerivation, base, stdenv, unix }:
mkDerivation {
pname = "base-compat";
version = "0.9.3";
libraryHaskellDepends = [ base unix ];
description = "A compatibility layer for base";
doCheck = false;
license = stdenv.lib.licenses.mit;
}) {};
2018-03-27 22:24:38 +00:00
affectionNeko = with haskellPackages; callPackage ({ mkDerivation
, base, bytestring, clock, containers, glib, linear, monad-loops, monad-parallel
2018-08-03 00:18:19 +00:00
, mtl, OpenGL, stdenv, stm, text, uuid, vector }:
2018-03-27 22:24:38 +00:00
mkDerivation {
pname = "affection";
version = "0.0.0.9";
#src = pkgs.fetchFromGitHub {
# owner = "nek0";
# repo = "affection";
# rev = "33c99b8888328e4ed17f5c65ac49f5eab2645549";
# sha256 = "0psqxqj1a8l5fia49ay2pb72kjnw5i54m6dcmrpz5hi1654aznll";
#};
src = ../affection;
2018-03-30 19:29:48 +00:00
configureFlags = [ "-fdebug" ];
2018-03-27 22:24:38 +00:00
revision = "1";
isLibrary = true;
libraryHaskellDepends = [
base bytestring clock containers glib linear monad-loops
2018-08-03 00:18:19 +00:00
monad-parallel mtl OpenGL sdl2Nek0 stm text uuid vector
2018-03-27 22:24:38 +00:00
];
librarySystemDepends = [ ];
libraryToolDepends = [ ];
testHaskellDepends = [ ];
homepage = "https://github.com/nek0/affection";
description = "A simple Game Engine in Haskell using SDL";
license = pkgs.stdenv.lib.licenses.gpl3;
hydraPlatforms = pkgs.stdenv.lib.platforms.none;
}) { };
2018-05-17 11:06:13 +00:00
ecstasyNeko = with haskellPackages; callPackage ({
mkDerivation, base, containers, kan-extensions, mtl, stdenv
, transformers
}:
mkDerivation {
pname = "ecstasy";
version = "0.2.1.0";
sha256 = "915942d3b8c3d61b98e5b2e825387d48cf3c2d17acdb2d377cb516c26c0fcbc3";
libraryHaskellDepends = [
base containers kan-extensions mtl transformers
];
homepage = "http://github.com/isovector/ecstasy/";
description = "A GHC.Generics based entity component system.";
license = stdenv.lib.licenses.bsd3;
}) {};
f = { mkDerivation, astar, base, containers, linear
2018-08-03 00:18:19 +00:00
, matrix, OpenGL, random, stdenv, stm, text, unordered-containers
2018-07-02 16:21:41 +00:00
, vector, JuicyPixels, JuicyPixels-extra, bytestring
2018-03-27 22:24:38 +00:00
}:
mkDerivation {
pname = "tracer-game";
version = "0.0.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
2018-04-11 18:01:58 +00:00
enableExecutableProfiling = true;
2018-03-27 22:24:38 +00:00
executableHaskellDepends = [
2018-05-17 11:06:13 +00:00
affectionNeko astar base containers ecstasyNeko linear matrix nanovgNeko
2018-08-03 00:18:19 +00:00
OpenGL random sdl2Nek0 stm text unordered-containers vector JuicyPixels
2018-07-02 16:21:41 +00:00
JuicyPixels-extra bytestring agNek0
2018-03-27 22:24:38 +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