commit 994532b71f67285b99e5a850e0264a5f8474e4ab Author: Mats Rauhala Date: Tue Oct 15 19:47:54 2019 +0300 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2211df6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.txt diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..61c8d0e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Revision history for koodihaaste + +## 0.1.0.0 -- YYYY-mm-dd + +* First version. Released on an unsuspecting world. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e69de29 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..3993bab --- /dev/null +++ b/default.nix @@ -0,0 +1,3 @@ +{ haskellPackages }: + +haskellPackages.callCabal2nix "koodihaaste" ./. {} diff --git a/koodihaaste.cabal b/koodihaaste.cabal new file mode 100644 index 0000000..2ba2220 --- /dev/null +++ b/koodihaaste.cabal @@ -0,0 +1,30 @@ +cabal-version: >=1.10 +-- Initial package description 'koodihaaste.cabal' generated by 'cabal +-- init'. For further documentation, see +-- http://haskell.org/cabal/users-guide/ + +name: koodihaaste +version: 0.1.0.0 +-- synopsis: +-- description: +-- bug-reports: +-- license: +license-file: LICENSE +author: Mats Rauhala +maintainer: mats.rauhala@iki.fi +-- copyright: +-- category: +build-type: Simple +extra-source-files: CHANGELOG.md + +executable koodihaaste + main-is: Main.hs + -- other-modules: + -- other-extensions: + build-depends: base >=4.12 && <4.13 + , servant + , servant-server + , text + , containers + hs-source-dirs: src + default-language: Haskell2010 diff --git a/nixpkgs.json b/nixpkgs.json new file mode 100644 index 0000000..aa6e817 --- /dev/null +++ b/nixpkgs.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/NixOS/nixpkgs", + "rev": "496bdc7e3340d944866d4735487fc2a2b9322fc9", + "date": "2019-10-15T15:44:45+00:00", + "sha256": "0nv56kn6xsn1mya2p99wgwgpwfmq3gkx46fjyprmm0w5dsj32351", + "fetchSubmodules": false +} diff --git a/release.nix b/release.nix new file mode 100644 index 0000000..48b1285 --- /dev/null +++ b/release.nix @@ -0,0 +1,18 @@ +let base = import {}; + +in + +{ pkgs ? import (base.fetchgit { inherit (base.lib.importJSON ./nixpkgs.json) url rev sha256; }) {} }: + +rec { + koodihaaste = pkgs.haskellPackages.callPackage ./default.nix {}; + shell = pkgs.buildEnv { + name = "shell"; + paths = []; + buildInputs = with pkgs.haskellPackages; [ + ghcid + hlint + (ghcWithHoogle (h: koodihaaste.buildInputs ++ koodihaaste.propagatedBuildInputs)) + ]; + }; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..411af6f --- /dev/null +++ b/shell.nix @@ -0,0 +1 @@ +(import ./release.nix {}).shell 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!"