diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | LICENSE | 20 | ||||
-rw-r--r-- | Setup.hs | 2 | ||||
-rw-r--r-- | default.nix | 6 | ||||
-rw-r--r-- | lullaby.cabal | 24 | ||||
-rw-r--r-- | lullaby.nix | 12 | ||||
-rw-r--r-- | src/Main.hs | 4 |
7 files changed, 69 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..41fbeb0 --- /dev/null +++ b/.gitignore | |||
@@ -0,0 +1 @@ | |||
**/result | |||
@@ -0,0 +1,20 @@ | |||
1 | Copyright (c) 2017 Gregor Kleen | ||
2 | |||
3 | Permission is hereby granted, free of charge, to any person obtaining | ||
4 | a copy of this software and associated documentation files (the | ||
5 | "Software"), to deal in the Software without restriction, including | ||
6 | without limitation the rights to use, copy, modify, merge, publish, | ||
7 | distribute, sublicense, and/or sell copies of the Software, and to | ||
8 | permit persons to whom the Software is furnished to do so, subject to | ||
9 | the following conditions: | ||
10 | |||
11 | The above copyright notice and this permission notice shall be included | ||
12 | in all copies or substantial portions of the Software. | ||
13 | |||
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
20 | SOFTWARE 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 @@ | |||
1 | import Distribution.Simple | ||
2 | main = defaultMain | ||
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..62376b5 --- /dev/null +++ b/default.nix | |||
@@ -0,0 +1,6 @@ | |||
1 | argumentPackages@{ ... }: | ||
2 | |||
3 | let | ||
4 | defaultPackages = with (import <nixpkgs> {}); haskellPackages; | ||
5 | pkgs = defaultPackages // argumentPackages; | ||
6 | in pkgs.callPackage ./lullaby.nix {} | ||
diff --git a/lullaby.cabal b/lullaby.cabal new file mode 100644 index 0000000..e8b0925 --- /dev/null +++ b/lullaby.cabal | |||
@@ -0,0 +1,24 @@ | |||
1 | -- Initial lullaby.cabal generated by cabal init. For further | ||
2 | -- documentation, see http://haskell.org/cabal/users-guide/ | ||
3 | |||
4 | name: lullaby | ||
5 | version: 0.0.0 | ||
6 | synopsis: A daemon attaching executable hooks to systemd's inhibitor API | ||
7 | -- description: | ||
8 | homepage: https://git.yggdrasil.li/gkleen/pub/lullaby | ||
9 | license: MIT | ||
10 | license-file: LICENSE | ||
11 | author: Gregor Kleen | ||
12 | maintainer: aethoago@141.li | ||
13 | -- copyright: | ||
14 | category: System | ||
15 | build-type: Simple | ||
16 | cabal-version: >=1.10 | ||
17 | |||
18 | executable lullaby | ||
19 | main-is: Main.hs | ||
20 | -- other-modules: | ||
21 | -- other-extensions: | ||
22 | build-depends: base >=4.9 && <4.10 | ||
23 | hs-source-dirs: src | ||
24 | default-language: Haskell2010 | ||
diff --git a/lullaby.nix b/lullaby.nix new file mode 100644 index 0000000..a80696b --- /dev/null +++ b/lullaby.nix | |||
@@ -0,0 +1,12 @@ | |||
1 | { mkDerivation, base, stdenv }: | ||
2 | mkDerivation { | ||
3 | pname = "lullaby"; | ||
4 | version = "0.0.0"; | ||
5 | src = ./.; | ||
6 | isLibrary = false; | ||
7 | isExecutable = true; | ||
8 | executableHaskellDepends = [ base ]; | ||
9 | homepage = "https://git.yggdrasil.li/gkleen/pub/lullaby"; | ||
10 | description = "A daemon attaching executable hooks to systemd's inhibitor API"; | ||
11 | license = stdenv.lib.licenses.mit; | ||
12 | } | ||
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 @@ | |||
1 | module Main where | ||
2 | |||
3 | main :: IO () | ||
4 | main = putStrLn "Hello, Haskell!" | ||