summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-04-05 23:48:15 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2016-04-05 23:48:15 +0200
commit60a5da37a6f25d25963c9cbd2750ff16db2361a2 (patch)
tree7a5e72c21416543420a75e1855363907547ddd9d
downloadevents-60a5da37a6f25d25963c9cbd2750ff16db2361a2.tar
events-60a5da37a6f25d25963c9cbd2750ff16db2361a2.tar.gz
events-60a5da37a6f25d25963c9cbd2750ff16db2361a2.tar.bz2
events-60a5da37a6f25d25963c9cbd2750ff16db2361a2.tar.xz
events-60a5da37a6f25d25963c9cbd2750ff16db2361a2.zip
Framework
-rw-r--r--.gitignore1
-rw-r--r--default.nix8
-rw-r--r--events/LICENSE20
-rw-r--r--events/Setup.hs2
-rw-r--r--events/events.cabal25
-rw-r--r--events/events.nix12
-rw-r--r--events/src/Main.hs2
-rw-r--r--shell.nix16
8 files changed, 86 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c4a847d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
/result
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..6cb7da5
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,8 @@
1{ pkgs ? (import <nixpkgs> {})
2, compilerName ? "ghc7103"
3}:
4
5rec {
6 haskellPackages = pkgs.haskell.packages."${compilerName}";
7 events = haskellPackages.callPackage ./events/events.nix {};
8}
diff --git a/events/LICENSE b/events/LICENSE
new file mode 100644
index 0000000..bef535c
--- /dev/null
+++ b/events/LICENSE
@@ -0,0 +1,20 @@
1Copyright (c) 2016 Gregor Kleen
2
3Permission is hereby granted, free of charge, to any person obtaining
4a copy of this software and associated documentation files (the
5"Software"), to deal in the Software without restriction, including
6without limitation the rights to use, copy, modify, merge, publish,
7distribute, sublicense, and/or sell copies of the Software, and to
8permit persons to whom the Software is furnished to do so, subject to
9the following conditions:
10
11The above copyright notice and this permission notice shall be included
12in all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/events/Setup.hs b/events/Setup.hs
new file mode 100644
index 0000000..9a994af
--- /dev/null
+++ b/events/Setup.hs
@@ -0,0 +1,2 @@
1import Distribution.Simple
2main = defaultMain
diff --git a/events/events.cabal b/events/events.cabal
new file mode 100644
index 0000000..bb5d59b
--- /dev/null
+++ b/events/events.cabal
@@ -0,0 +1,25 @@
1-- Initial event.cabal generated by cabal init. For further documentation,
2-- see http://haskell.org/cabal/users-guide/
3
4name: events
5version: 0.0.0
6synopsis: An appointment book
7-- description:
8homepage: https://git.yggdrasil.li/gkleen/pub/events
9license: MIT
10license-file: LICENSE
11author: Gregor Kleen
12maintainer: aethoago@141.li
13-- copyright:
14category: Organization
15build-type: Simple
16-- extra-source-files:
17cabal-version: >=1.10
18
19executable event
20 main-is: Main.hs
21 -- other-modules:
22 -- other-extensions:
23 build-depends: base >=4.8 && <4.9
24 hs-source-dirs: src
25 default-language: Haskell2010 \ No newline at end of file
diff --git a/events/events.nix b/events/events.nix
new file mode 100644
index 0000000..dba4055
--- /dev/null
+++ b/events/events.nix
@@ -0,0 +1,12 @@
1{ mkDerivation, base, stdenv }:
2mkDerivation {
3 pname = "events";
4 version = "0.0.0";
5 src = ./.;
6 isLibrary = false;
7 isExecutable = true;
8 executableHaskellDepends = [ base ];
9 homepage = "https://git.yggdrasil.li/gkleen/pub/events";
10 description = "An appointment book";
11 license = stdenv.lib.licenses.mit;
12}
diff --git a/events/src/Main.hs b/events/src/Main.hs
new file mode 100644
index 0000000..e9e1deb
--- /dev/null
+++ b/events/src/Main.hs
@@ -0,0 +1,2 @@
1main :: IO ()
2main = undefined
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..684f721
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,16 @@
1{ pkgs ? (import <nixpkgs> {})
2, haskellPackages ? (import ./default.nix { inherit pkgs; }).haskellPackages
3}:
4
5let
6 ghc = haskellPackages.ghcWithPackages (ps: payload ++ (with ps; [ hlint cabal2nix cabal-install ]));
7 payload = builtins.attrValues (import ./default.nix {});
8in pkgs.stdenv.mkDerivation rec {
9 bareName = "event";
10 name = "${bareName}-env";
11 buildInputs = [ ghc ];
12 shellHook = ''
13 eval $(egrep ^export ${ghc}/bin/ghc)
14 export PROMPT_INFO="${name}"
15 '';
16}