summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <aethoago@141.li>2017-01-26 15:02:04 +0100
committerGregor Kleen <aethoago@141.li>2017-01-26 15:02:04 +0100
commit443f196032530cbd9eb39606c2daf4294460a44b (patch)
tree373c0ebddfc5483d673cd8509959220dba1858b1
downloadpostdelay-443f196032530cbd9eb39606c2daf4294460a44b.tar
postdelay-443f196032530cbd9eb39606c2daf4294460a44b.tar.gz
postdelay-443f196032530cbd9eb39606c2daf4294460a44b.tar.bz2
postdelay-443f196032530cbd9eb39606c2daf4294460a44b.tar.xz
postdelay-443f196032530cbd9eb39606c2daf4294460a44b.zip
Project skeleton
-rw-r--r--.gitignore2
-rw-r--r--LICENSE20
-rw-r--r--Setup.hs2
-rw-r--r--default.nix6
-rw-r--r--postdelay.cabal25
-rw-r--r--postdelay.nix12
-rwxr-xr-xpostdelay.nix.gup5
-rw-r--r--shell.nix9
-rw-r--r--src/Main.hs4
9 files changed, 85 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1acb835
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
1**/.gup
2**/result/ \ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..b5cb249
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,20 @@
1Copyright (c) 2017 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/Setup.hs b/Setup.hs
new file mode 100644
index 0000000..9a994af
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
1import Distribution.Simple
2main = defaultMain
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..0ba6150
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,6 @@
1argumentPackages@{ ... }:
2
3let
4 defaultPackages = with (import <nixpkgs> {}); haskellPackages;
5 pkgs = defaultPackages // argumentPackages;
6in pkgs.callPackage ./postdelay.nix {}
diff --git a/postdelay.cabal b/postdelay.cabal
new file mode 100644
index 0000000..9f13336
--- /dev/null
+++ b/postdelay.cabal
@@ -0,0 +1,25 @@
1-- Initial postdelay.cabal generated by cabal init. For further
2-- documentation, see http://haskell.org/cabal/users-guide/
3
4name: postdelay
5version: 0.0.0
6synopsis: A postfix content filter for delaying delivery of mail
7-- description:
8homepage: https://git.yggdrasil.li/gkleen/pub/postdelay
9license: MIT
10license-file: LICENSE
11author: Gregor Kleen
12maintainer: aethoago@141.li
13-- copyright:
14category: Network
15build-type: Simple
16-- extra-source-files:
17cabal-version: >=1.10
18
19executable postdelay
20 main-is: Main.hs
21 -- other-modules:
22 -- other-extensions:
23 build-depends: base >=4.9 && <5
24 hs-source-dirs: src
25 default-language: Haskell2010
diff --git a/postdelay.nix b/postdelay.nix
new file mode 100644
index 0000000..1ef3413
--- /dev/null
+++ b/postdelay.nix
@@ -0,0 +1,12 @@
1{ mkDerivation, base, stdenv }:
2mkDerivation {
3 pname = "postdelay";
4 version = "0.0.0";
5 src = ./.;
6 isLibrary = false;
7 isExecutable = true;
8 executableHaskellDepends = [ base ];
9 homepage = "https://git.yggdrasil.li/gkleen/pub/postdelay";
10 description = "A postfix content filter for delaying delivery of mail";
11 license = stdenv.lib.licenses.mit;
12}
diff --git a/postdelay.nix.gup b/postdelay.nix.gup
new file mode 100755
index 0000000..976221f
--- /dev/null
+++ b/postdelay.nix.gup
@@ -0,0 +1,5 @@
1#!/usr/bin/env zsh
2
3gup -u ${2:r}.cabal
4cd ${2:h}
5cabal2nix ./. >! ${1} \ No newline at end of file
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..a4274e7
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,9 @@
1{ pkgs ? (import <nixpkgs> {})
2}:
3
4pkgs.lib.overrideDerivation (pkgs.haskellPackages.callPackage ./default.nix {}) (oldArgs: {
5 buildInputs = with pkgs; [ cabal2nix gup ];
6 shellHook = ''
7 export PROMPT_INFO=${oldArgs.name}
8 '';
9})
diff --git a/src/Main.hs b/src/Main.hs
new file mode 100644
index 0000000..65ae4a0
--- /dev/null
+++ b/src/Main.hs
@@ -0,0 +1,4 @@
1module Main where
2
3main :: IO ()
4main = putStrLn "Hello, Haskell!"