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 @@
1
-/default.nix
2 1
 /dist/
3
-/result
4
-/.cabal-sandbox/
5
-/cabal.sandbox.config
6
-/.stack-work
7
-/build/.stack-work
8
-/stack.yaml
9
-/cabal.project.local
10
-/dist-newstyle
2
+

+ 0
- 21
build/nixpkgs.nix View File

@@ -1,21 +0,0 @@
1
-with (import <nixpkgs> {});
2
-
3
-stdenv.mkDerivation {
4
-  name = "clockdown";
5
-
6
-  buildInputs = [
7
-    # GHC:
8
-    haskell.packages.lts-5_15.ghc
9
-
10
-    # Non-Haskell Dependencies:
11
-    ncurses
12
-    zlib      # For the header files.
13
-    zlib.out  # For the .so file.
14
-  ];
15
-
16
-  # Work around a bug in GHC:
17
-  # https://ghc.haskell.org/trac/ghc/ticket/11042
18
-  shellHook = ''
19
-    export LD_LIBRARY_PATH=${zlib.out}/lib:${ncurses.out}/lib
20
-  '';
21
-}

+ 0
- 12
build/stack.yaml View File

@@ -1,12 +0,0 @@
1
-resolver: lts-5.15
2
-
3
-flags:
4
-  clockdown:
5
-    maintainer: true
6
-
7
-packages:
8
-  - ../
9
-
10
-extra-deps:
11
-  - byline-0.2.1.0
12
-  - terminfo-hs-0.2.1

+ 16
- 0
clockdown.nix View File

@@ -0,0 +1,16 @@
1
+{ mkDerivation, async, base, byline, colour, containers, mtl
2
+, stdenv, tasty, tasty-hunit, text, time, transformers, vty
3
+}:
4
+mkDerivation {
5
+  pname = "clockdown";
6
+  version = "0.2.1.0";
7
+  src = ./.;
8
+  isLibrary = true;
9
+  isExecutable = true;
10
+  libraryHaskellDepends = [
11
+    async base byline colour containers mtl text time transformers vty
12
+  ];
13
+  executableHaskellDepends = [ base ];
14
+  testHaskellDepends = [ base tasty tasty-hunit ];
15
+  license = stdenv.lib.licenses.bsd2;
16
+}

+ 17
- 0
default.nix View File

@@ -0,0 +1,17 @@
1
+# These arguments are so you can override settings from the command
2
+# line using the `nix-hs' tool.
3
+{ nixpkgs   ? import <nixpkgs> { }
4
+, compiler  ? "default"
5
+, profiling ? false
6
+}:
7
+
8
+let
9
+  pkgs = nixpkgs;
10
+
11
+  buildInputs = with pkgs; [
12
+    # List extra dependencies here.
13
+  ];
14
+
15
+in
16
+  pkgs.nix-hs.interactive ./clockdown.nix
17
+    { inherit compiler profiling buildInputs; }

Loading…
Cancel
Save