Skip to content

Commit e8d1c02

Browse files
committed
basic build infrastructure
1 parent a1fb94c commit e8d1c02

File tree

6 files changed

+40
-2
lines changed

6 files changed

+40
-2
lines changed

Main.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import Urbit.Airlock
2+
3+
main = print "TODO"

default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc884" }:
2+
nixpkgs.pkgs.haskell.packages.${compiler}.callPackage ./urbit-airlock.nix { }

shell.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc884" }:
2+
(import ./default.nix { inherit nixpkgs compiler; }).env

test.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module Main where
2+
3+
import System.Exit (exitFailure)
4+
5+
main = do
6+
putStrLn "goodbye world"
7+
exitFailure

urbit-airlock.cabal

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: urbit-airlock
22
version: 0.1.0.0
33
-- synopsis:
44
-- description:
5-
homepage: https://github.com/bsima/urbit-airlock#readme
5+
homepage: https://github.com/bsima/urbit-airlock
66
license: BSD3
77
license-file: LICENSE
88
author: Ben Sima
@@ -28,9 +28,16 @@ library
2828
wreq
2929

3030
executable urlock
31-
hs-source-dirs: urlock
31+
hs-source-dirs: .
3232
main-is: Main.hs
3333
default-language: Haskell2010
3434
build-depends:
3535
base >= 4.7 && < 5,
3636
urbit-airlock
37+
38+
Test-Suite test-urbit-airlock
39+
type: exitcode-stdio-1.0
40+
main-is: test.hs
41+
build-depends:
42+
base >= 4.7 && < 5,
43+
urbit-airlock

urbit-airlock.nix

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{ mkDerivation, aeson, base, bytestring, lens, stdenv, text, wai
2+
, wai-extra, wreq
3+
}:
4+
mkDerivation {
5+
pname = "urbit-airlock";
6+
version = "0.1.0.0";
7+
src = ./.;
8+
isLibrary = true;
9+
isExecutable = true;
10+
libraryHaskellDepends = [
11+
aeson base bytestring lens text wai wai-extra wreq
12+
];
13+
executableHaskellDepends = [ base ];
14+
testHaskellDepends = [ base ];
15+
homepage = "https://github.com/bsima/urbit-airlock";
16+
license = stdenv.lib.licenses.bsd3;
17+
}

0 commit comments

Comments
 (0)