diff --git a/shell.nix b/shell.nix index 8d38a28..1db47b4 100644 --- a/shell.nix +++ b/shell.nix @@ -1,34 +1,191 @@ -{ nixpkgs ? import {}, compiler ? "ghc861", doBenchmark ? false }: +{ nixpkgs ? import {}, compiler ? "default", doBenchmark ? false }: let inherit (nixpkgs) pkgs; - provideOldHaskellAttributeNames = true; + #provideOldHaskellAttributeNames = true; + + glib = with haskellPackages; callPackage( + { mkDerivation, base, bytestring, Cabal, containers, glib + , stdenv, text, utf8-string + }: + mkDerivation { + pname = "glib"; + version = "0.13.6.0"; + sha256 = "4e71062c6a458440294d820e21449aa4666deed2ea233ef5915da7c1d4aee8eb"; + setupHaskellDepends = [ base Cabal gtk2hs-buildtools ]; + libraryHaskellDepends = [ + base bytestring containers text utf8-string + ]; + libraryPkgconfigDepends = [ pkgs.glib ]; + homepage = "http://projects.haskell.org/gtk2hs/"; + description = "Binding to the GLIB library for Gtk2Hs"; + license = stdenv.lib.licenses.lgpl21; + }) {}; + + gtk2hs-buildtools = with haskellPackages; callPackage( + { mkDerivation, alex, array, base, Cabal, containers, directory + , filepath, happy, hashtables, pretty, process, random, stdenv + }: + mkDerivation { + pname = "gtk2hs-buildtools"; + version = "0.13.4.0"; + src = ../gtk2hs/tools; + isLibrary = true; + isExecutable = true; + enableSeparateDataOutput = true; + libraryHaskellDepends = [ + array base Cabal containers directory filepath hashtables pretty + process random + ]; + libraryToolDepends = [ alex happy ]; + executableHaskellDepends = [ base ]; + homepage = "http://projects.haskell.org/gtk2hs/"; + description = "Tools to build the Gtk2Hs suite of User Interface libraries"; + license = stdenv.lib.licenses.gpl2; + }) {}; + + cereal = with haskellPackages; callPackage( + { mkDerivation, array, base, bytestring, containers, ghc-prim + , QuickCheck, stdenv, test-framework, test-framework-quickcheck2 + }: + mkDerivation { + pname = "cereal"; + version = "0.5.7.0"; + sha256 = "7abdaf6d52260e714adcf1c3e16f2e25a56492d90a747d1a9594e15f05acf1c8"; + libraryHaskellDepends = [ + array base bytestring containers ghc-prim + ]; + testHaskellDepends = [ + base bytestring QuickCheck test-framework + test-framework-quickcheck2 + ]; + homepage = "https://github.com/GaloisInc/cereal"; + description = "A binary serialization library"; + license = stdenv.lib.licenses.bsd3; + doCheck = false; + }) {}; + + linear = with haskellPackages; callPackage( + { mkDerivation, adjunctions, base, base-orphans, binary + , bytestring, Cabal, cabal-doctest, containers, deepseq + , distributive, doctest, ghc-prim, hashable, HUnit, lens + , reflection, semigroupoids, semigroups, simple-reflect, stdenv + , tagged, template-haskell, test-framework, test-framework-hunit + , transformers, transformers-compat, unordered-containers, vector + , void + }: + mkDerivation { + pname = "linear"; + version = "1.20.8"; + sha256 = "5ebd1b99837f2e3c7386bcd2ca425d9c66b09a61409792b141428345fb9edb10"; + setupHaskellDepends = [ base Cabal cabal-doctest ]; + libraryHaskellDepends = [ + adjunctions base base-orphans binary bytes cereal containers + deepseq distributive ghc-prim hashable lens reflection + semigroupoids semigroups tagged template-haskell transformers + transformers-compat unordered-containers vector void + ]; + testHaskellDepends = [ + base binary bytestring deepseq doctest HUnit lens reflection + simple-reflect test-framework test-framework-hunit vector + ]; + homepage = "http://github.com/ekmett/linear/"; + description = "Linear Algebra"; + license = stdenv.lib.licenses.bsd3; + }) {}; + + bytes = with haskellPackages; callPackage( + { mkDerivation, base, binary, bytestring, Cabal, cabal-doctest + , containers, directory, doctest, filepath, hashable, mtl + , scientific, stdenv, text, time, transformers, transformers-compat + , unordered-containers, void + }: + mkDerivation { + pname = "bytes"; + version = "0.15.5"; + sha256 = "039935e6b367eb8657aa3eb109e719b257a06524b0d9ff5246e8029bb7a07118"; + setupHaskellDepends = [ base Cabal cabal-doctest ]; + libraryHaskellDepends = [ + base binary bytestring cereal containers hashable mtl scientific + text time transformers transformers-compat unordered-containers + void + ]; + testHaskellDepends = [ base directory doctest filepath ]; + homepage = "https://github.com/ekmett/bytes"; + description = "Sharing code for serialization between binary and cereal"; + license = stdenv.lib.licenses.bsd3; + }) {}; aff = with haskellPackages; callPackage( - { mkDerivation, base, bytestring, clock, containers, fetchgit, glib - , linear, monad-loops, monad-parallel, mtl, OpenGL, stdenv - , stm, text, uuid, vector + { mkDerivation, base, bytestring, clock, containers, fetchgit + , monad-loops, monad-parallel, mtl, OpenGL, stdenv, stm + , text, uuid, vector }: mkDerivation { pname = "affection"; version = "0.0.0.9"; - sha256 = "d9feed3eed54ad2ae61ebc560af8761959cb4dc46c2bbf5a804f586b9244cb4e"; - configureFlags = [ "-fdebug" ]; + src = fetchgit { + url = "https://github.com/nek0/affection"; + sha256 = "08pf1nqha62m608zmcyyshljzga8h1p9hyxvwrk4affsaj7vpkpx"; + rev = "91c70c6ec62e407bd6d0233fbc2c64bafc3b6cdc"; + fetchSubmodules = true; + }; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ base bytestring clock containers glib linear monad-loops - monad-parallel mtl OpenGL sdl stm text uuid vector + monad-parallel mtl OpenGL sdl stm uuid text vector ]; homepage = "https://github.com/nek0/affection#readme"; description = "A simple Game Engine using SDL"; license = stdenv.lib.licenses.lgpl3; }) {}; + psq = with haskellPackages; callPackage( + { mkDerivation, array, base, containers, criterion, deepseq + , fingertree-psqueue, ghc-prim, hashable, HUnit, mtl, PSQueue + , QuickCheck, random, stdenv, tagged, test-framework + , test-framework-hunit, test-framework-quickcheck2 + , unordered-containers + }: + mkDerivation { + pname = "psqueues"; + version = "0.2.7.0"; + sha256 = "4cf3628884015b091471e4425f5414207fd547cf71d9546e9b7318d857624fea"; + libraryHaskellDepends = [ base deepseq ghc-prim hashable ]; + testHaskellDepends = [ + array base deepseq ghc-prim hashable HUnit QuickCheck tagged + test-framework test-framework-hunit test-framework-quickcheck2 + ]; + benchmarkHaskellDepends = [ + base containers criterion deepseq fingertree-psqueue ghc-prim + hashable mtl PSQueue random unordered-containers + ]; + description = "Pure priority search queues"; + license = stdenv.lib.licenses.bsd3; + doCheck = false; + }) {}; + + astar = with haskellPackages; callPackage( + { mkDerivation, base, hashable, stdenv + , unordered-containers + }: + mkDerivation { + pname = "astar"; + version = "0.3.0.0"; + sha256 = "2117c007d5daa88401a49c994b8e3361ddae331d458b1a403fac2a4f304b9b87"; + libraryHaskellDepends = [ + base hashable psq unordered-containers + ]; + homepage = "https://github.com/weissi/astar"; + description = "General A* search algorithm"; + license = stdenv.lib.licenses.bsd3; + }) {}; + sdl = with haskellPackages; callPackage( - { mkDerivation, base, bytestring, deepseq, exceptions, linear + { mkDerivation, base, bytestring, deepseq, exceptions , StateVar, stdenv, text, transformers, vector, weigh, pkgconfig }: mkDerivation { @@ -58,12 +215,7 @@ let mkDerivation { pname = "nanovg"; version = "0.6.0.0"; - src = fetchgit { - url = "https://github.com/nek0/nanovg-hs.git"; - sha256 = "1lh7y7n97md585y7wic4sn240ifpdmcgfrvyvmmdngaz4s8zy47f"; - rev = "09b613ab382e73e401ed8c2bbf936b39a92a17e1"; - fetchSubmodules = true; - }; + src = ../nanovg-hs; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ base bytestring containers text vector ]; @@ -73,12 +225,13 @@ let testHaskellDepends = [ base containers hspec inline-c QuickCheck ]; homepage = "https://github.com/cocreature/nanovg-hs"; description = "Haskell bindings for nanovg"; + doCheck = false; license = stdenv.lib.licenses.isc; }) {}; - f = { mkDerivation, algebraic-graphs, astar, base + f = { mkDerivation, algebraic-graphs, base , bytestring, containers, ecstasy, JuicyPixels, JuicyPixels-extra - , linear, matrix, mtl, OpenGL, random, stdenv, stm + , matrix, mtl, OpenGL, random, stdenv, stm , text, unordered-containers, vector, pkgconfig }: mkDerivation { @@ -96,7 +249,9 @@ let license = stdenv.lib.licenses.gpl3; }; - haskellPackages = pkgs.haskellPackages; + haskellPackages = if compiler == "default" + then pkgs.haskellPackages + else pkgs.haskell.packages.${compiler}; variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;