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