Browse Source

Update build settings

master
Peter J. Jones 1 year ago
parent
commit
758f645422
Signed by: Peter Jones <pjones@devalot.com> GPG Key ID: 9DAFAA8D01941E49
5 changed files with 34 additions and 42 deletions
  1. 1
    9
      .gitignore
  2. 0
    21
      build/nixpkgs.nix
  3. 0
    12
      build/stack.yaml
  4. 16
    0
      clockdown.nix
  5. 17
    0
      default.nix

+ 1
- 9
.gitignore View File

@@ -1,10 +1,2 @@
/default.nix
/dist/
/result
/.cabal-sandbox/
/cabal.sandbox.config
/.stack-work
/build/.stack-work
/stack.yaml
/cabal.project.local
/dist-newstyle


+ 0
- 21
build/nixpkgs.nix View File

@@ -1,21 +0,0 @@
with (import <nixpkgs> {});

stdenv.mkDerivation {
name = "clockdown";

buildInputs = [
# GHC:
haskell.packages.lts-5_15.ghc

# Non-Haskell Dependencies:
ncurses
zlib # For the header files.
zlib.out # For the .so file.
];

# Work around a bug in GHC:
# https://ghc.haskell.org/trac/ghc/ticket/11042
shellHook = ''
export LD_LIBRARY_PATH=${zlib.out}/lib:${ncurses.out}/lib
'';
}

+ 0
- 12
build/stack.yaml View File

@@ -1,12 +0,0 @@
resolver: lts-5.15

flags:
clockdown:
maintainer: true

packages:
- ../

extra-deps:
- byline-0.2.1.0
- terminfo-hs-0.2.1

+ 16
- 0
clockdown.nix View File

@@ -0,0 +1,16 @@
{ mkDerivation, async, base, byline, colour, containers, mtl
, stdenv, tasty, tasty-hunit, text, time, transformers, vty
}:
mkDerivation {
pname = "clockdown";
version = "0.2.1.0";
src = ./.;
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
async base byline colour containers mtl text time transformers vty
];
executableHaskellDepends = [ base ];
testHaskellDepends = [ base tasty tasty-hunit ];
license = stdenv.lib.licenses.bsd2;
}

+ 17
- 0
default.nix View File

@@ -0,0 +1,17 @@
# These arguments are so you can override settings from the command
# line using the `nix-hs' tool.
{ nixpkgs ? import <nixpkgs> { }
, compiler ? "default"
, profiling ? false
}:

let
pkgs = nixpkgs;

buildInputs = with pkgs; [
# List extra dependencies here.
];

in
pkgs.nix-hs.interactive ./clockdown.nix
{ inherit compiler profiling buildInputs; }

Loading…
Cancel
Save