diff --git a/shell.nix b/shell.nix index 1ff269f..f29725d 100644 --- a/shell.nix +++ b/shell.nix @@ -1,15 +1,69 @@ { nixpkgs ? import {} , compiler ? "default" , doBenchmark ? false -, nanovg }: let inherit (nixpkgs) pkgs; - f = { mkDerivation, affection, base, containers, glew - , linear, nanovg, OpenGL, random, sdl2, stdenv, stm + nanovgNeko = with haskellPackages; callPackage ({ + mkDerivation, base, bytestring, c2hs, containers, glew, hspec, + inline-c, libGL, libGLU, QuickCheck, text, vector, pkgconfig }: + mkDerivation { + pname = "nanovg"; + version = "0.5.2.0"; + src = pkgs.fetchFromGitHub { + owner = "nek0"; + repo = "nanovg-hs"; + rev = "21868dc2c8e6eae8e7c0962d22890a8f2522cab0"; + sha256 = "0diyyajniyxzmg5za34crwwlajf40x8bplja6mbgv2syax5d446d"; + fetchSubmodules = true; + }; + 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; }; + + affectionNeko = with haskellPackages; callPackage ({ mkDerivation + , base, bytestring, clock, containers, glib, linear, monad-loops, monad-parallel + , mtl, OpenGL, sdl2, stdenv, stm, text, uuid, vector }: + mkDerivation { + pname = "affection"; + version = "0.0.0.9"; + src = pkgs.fetchFromGitHub { + owner = "nek0"; + repo = "affection"; + rev = "33c99b8888328e4ed17f5c65ac49f5eab2645549"; + sha256 = "0psqxqj1a8l5fia49ay2pb72kjnw5i54m6dcmrpz5hi1654aznll"; + }; + revision = "1"; + isLibrary = true; + libraryHaskellDepends = [ + base bytestring clock containers glib linear monad-loops + monad-parallel mtl OpenGL sdl2 stm text uuid vector + ]; + 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; + }) { }; + + + f = { mkDerivation, base, containers, glew + , linear, OpenGL, random, sdl2, stdenv, stm }: mkDerivation { pname = "haskelloids"; @@ -18,7 +72,7 @@ let isLibrary = false; isExecutable = true; executableHaskellDepends = [ - affection base containers linear nanovg OpenGL random sdl2 stm + affectionNeko base containers linear nanovgNeko OpenGL random sdl2 stm ]; executableSystemDepends = [ glew ]; executablePkgconfigDepends = [ glew ];