From 13b6da1e44bf5369d12b3421b6ca1e3b8c309270 Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 4 May 2020 15:44:14 +0200 Subject: [PATCH] preparating transition to affectionate affection engine --- cabal.config | 1 - cabal.project | 4 ++++ haskelloids.cabal | 6 ++--- shell.nix | 58 +++++++++++++++++++++++++++++------------------ 4 files changed, 43 insertions(+), 26 deletions(-) delete mode 100644 cabal.config create mode 100644 cabal.project diff --git a/cabal.config b/cabal.config deleted file mode 100644 index 2544e4b..0000000 --- a/cabal.config +++ /dev/null @@ -1 +0,0 @@ -constraints: affection +debug diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000..3de47ff --- /dev/null +++ b/cabal.project @@ -0,0 +1,4 @@ +constraints: affection +debug +packages: + ./. + ../affection diff --git a/haskelloids.cabal b/haskelloids.cabal index e6a5f80..6a9e25c 100644 --- a/haskelloids.cabal +++ b/haskelloids.cabal @@ -67,9 +67,9 @@ executable haskelloids -- other-extensions: -- Other library packages from which modules are imported. - build-depends: base >=4.9 && <4.12 - , affection >= 0.0.0.9 - , sdl2 >= 2.1.3.1 + build-depends: base >=4.12 && <5 + , affection == 0.0.0.10 + , sdl2 >= 2.5.0.0 , OpenGL , containers , random diff --git a/shell.nix b/shell.nix index 95293b5..eb75d1d 100644 --- a/shell.nix +++ b/shell.nix @@ -13,8 +13,8 @@ let }: mkDerivation { pname = "sdl2"; - version = "2.4.1.0"; - sha256 = "21a569c0c19f8ff2bbe1cf1d3eb32f65e8143806de353cedd240df5e9d088b5c"; + version = "2.5.2.0"; + sha256 = "9c4110b1e772739bf62c641d375665f9d0af3ad64ed73b24ef407a82e7648fa1"; isLibrary = true; isExecutable = true; enableSeparateDataOutput = true; @@ -23,42 +23,56 @@ let ]; librarySystemDepends = [ SDL2 ]; libraryPkgconfigDepends = [ SDL2 ]; - doCheck = false; testHaskellDepends = [ base deepseq linear vector weigh ]; - description = "Both high- and low-level bindings to the SDL library (version 2.0.4+)."; + doHaddock = false; + doCheck = false; + description = "Both high- and low-level bindings to the SDL library (version 2.0.6+)."; license = stdenv.lib.licenses.bsd3; }) {}; - nanovgNeko = with haskellPackages; callPackage ({ - mkDerivation, base, bytestring, c2hs, containers, glew, hspec, - inline-c, libGL, libGLU, QuickCheck, text, vector, pkgconfig }: + nanovg = with haskellPackages; callPackage ( + { mkDerivation, base, bytestring, c2hs, containers, glew + , hspec, inline-c, libGL, libGLU, QuickCheck, stdenv, text, vector + }: mkDerivation { pname = "nanovg"; version = "0.6.0.0"; - #src = pkgs.fetchFromGitHub { - # owner = "nek0"; - # repo = "nanovg-hs"; - # rev = "21868dc2c8e6eae8e7c0962d22890a8f2522cab0"; - # sha256 = "0diyyajniyxzmg5za34crwwlajf40x8bplja6mbgv2syax5d446d"; - # fetchSubmodules = true; - #}; src = ../nanovg-hs; - revision = "1"; isLibrary = true; isExecutable = true; - doCheck = false; libraryHaskellDepends = [ base bytestring containers text vector ]; - librarySystemDepends = [ glew libGL libGLU pkgconfig ]; + librarySystemDepends = [ glew libGL libGLU ]; + libraryPkgconfigDepends = [ glew ]; 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; }; + license = stdenv.lib.licenses.isc; + } + ) {}; + affection = with haskellPackages; callPackage( + { mkDerivation, base, bytestring, clock, containers, glib, linear + , monad-loops, monad-parallel, mtl, OpenGL, stdenv, stm, text + , uuid, vector + }: + mkDerivation { + pname = "affection"; + version = "0.0.0.10"; + src = ../affection; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + base bytestring clock containers glib linear monad-loops + monad-parallel mtl OpenGL sdl2 stm text uuid vector + ]; + homepage = "https://github.com/nek0/affection#readme"; + description = "A simple Game Engine using SDL"; + license = stdenv.lib.licenses.lgpl3; + } + ) {}; - f = { mkDerivation, affection, base, containers, glew + f = { mkDerivation, base, containers, glew , linear, OpenGL, random, stdenv, stm }: mkDerivation { @@ -69,7 +83,7 @@ let isExecutable = true; enableExecutableProfiling = true; executableHaskellDepends = [ - affection base containers linear nanovgNeko OpenGL random sdl stm + affection base containers linear nanovg OpenGL random sdl stm ]; executableSystemDepends = [ glew ]; executablePkgconfigDepends = [ glew ];