Skip to content

Commit ce2b1c1

Browse files
committed
Nix, sources
1 parent fd96c07 commit ce2b1c1

File tree

7 files changed

+57
-0
lines changed

7 files changed

+57
-0
lines changed

default.nix

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
pkgs.haskellPackages.callPackage ./project.nix {}

haskonf.cabal

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Name: blog
2+
Version: 0.0.1
3+
License: BSD2
4+
License-File: LICENSE
5+
Author: Jonn Mostovoy
6+
Synopsis: Reflective configuration library
7+
Description:
8+
A turtle script to instantiate hakyll posts remotely
9+
10+
Cabal-Version: >=1.10
11+
Build-Type: Simple
12+
13+
Library
14+
Build-Depends: base,
15+
turtle,
16+
haskonf
17+
18+
Hs-Source-Dirs: src
19+
GHC-Options: -Wall
20+
Exposed-Modules: Blog
21+
22+
Executable blog
23+
Build-Depends: base,
24+
turtle,
25+
haskonf
26+
Hs-source-dirs: src
27+
GHC-Options: -Wall
28+
Main-is: Main.hs

project.nix

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{ mkDerivation, base, haskonf, stdenv, turtle }:
2+
mkDerivation {
3+
pname = "blog";
4+
version = "0.0.1";
5+
src = ./.;
6+
isLibrary = true;
7+
isExecutable = true;
8+
buildDepends = [ base haskonf turtle ];
9+
description = "Reflective configuration library";
10+
license = stdenv.lib.licenses.bsd2;
11+
}

result

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/jpvp64xkh0y9axvrh5jxd6d6znl9i0zp-haskell-blog-0.0.1

shell.nix

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7101" }:
2+
let
3+
inherit (nixpkgs) pkgs;
4+
f = import ./project.nix;
5+
drv = pkgs.haskell.packages.${compiler}.callPackage f {};
6+
in
7+
if pkgs.lib.inNixShell then drv.env else drv

src/Blog.hs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Blog (instantiate) where
2+
3+
instantiate :: String
4+
instantiate = "???"

src/Main.hs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Main (main) where
2+
3+
main :: IO ()
4+
main = putStrLn "???"

0 commit comments

Comments
 (0)