Skip to content

Commit

Permalink
fixing compile for modern ghc; adding nix build method
Browse files Browse the repository at this point in the history
  • Loading branch information
bbarker committed Sep 10, 2018
1 parent ffe6972 commit 41faa71
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,3 +1,6 @@
/.dist-buildwrapper
/cabal.sandbox.config
/.project

# Editor related:
*~
2 changes: 1 addition & 1 deletion MazesOfMonad.cabal
Expand Up @@ -11,7 +11,7 @@ Category: Game
Maintainer: jpmoresmau@gmail.com
Synopsis: Console-based Role Playing Game
Build-Type: Simple
tested-with: GHC==7.0.2
tested-with: GHC==8.4.3
data-files: README.txt, WHATSNEW.txt, TODO.txt
cabal-version: >= 1.6

Expand Down
9 changes: 9 additions & 0 deletions default.nix
@@ -0,0 +1,9 @@
with import <nixpkgs> { };
let
monadMaze = (haskellPackages.callPackage ./mmaze.nix {});
in stdenv.mkDerivation {
name = "maze-monad-env";
buildInputs = [
monadMaze
];
}
17 changes: 17 additions & 0 deletions mmaze.nix
@@ -0,0 +1,17 @@
{ mkDerivation, array, base, containers, directory, filepath, HUnit
, mtl, old-locale, pretty, random, regex-posix, stdenv, time
}:
mkDerivation {
pname = "MazesOfMonad";
version = "1.0.9";
src = ./.;
isLibrary = false;
isExecutable = true;
enableSeparateDataOutput = true;
executableHaskellDepends = [
array base containers directory filepath HUnit mtl old-locale
pretty random regex-posix time
];
description = "Console-based Role Playing Game";
license = stdenv.lib.licenses.bsd3;
}
3 changes: 1 addition & 2 deletions src/MoresmauJP/Rpg/Save.hs
Expand Up @@ -16,7 +16,6 @@ import MoresmauJP.Rpg.MazeObjects
import System.Directory
import System.FilePath
import System.IO
import System.Locale

import Text.Printf
import System.IO.Error (catchIOError)
Expand Down Expand Up @@ -261,4 +260,4 @@ readBackup s=do





0 comments on commit 41faa71

Please sign in to comment.