Initial commit

This commit is contained in:
Mats Rauhala 2019-10-15 19:47:54 +03:00
commit 994532b71f
10 changed files with 71 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.txt

5
CHANGELOG.md Normal file
View File

@ -0,0 +1,5 @@
# Revision history for koodihaaste
## 0.1.0.0 -- YYYY-mm-dd
* First version. Released on an unsuspecting world.

0
LICENSE Normal file
View File

2
Setup.hs Normal file
View File

@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain

3
default.nix Normal file
View File

@ -0,0 +1,3 @@
{ haskellPackages }:
haskellPackages.callCabal2nix "koodihaaste" ./. {}

30
koodihaaste.cabal Normal file
View File

@ -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

7
nixpkgs.json Normal file
View File

@ -0,0 +1,7 @@
{
"url": "https://github.com/NixOS/nixpkgs",
"rev": "496bdc7e3340d944866d4735487fc2a2b9322fc9",
"date": "2019-10-15T15:44:45+00:00",
"sha256": "0nv56kn6xsn1mya2p99wgwgpwfmq3gkx46fjyprmm0w5dsj32351",
"fetchSubmodules": false
}

18
release.nix Normal file
View File

@ -0,0 +1,18 @@
let base = import <nixpkgs> {};
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))
];
};
}

1
shell.nix Normal file
View File

@ -0,0 +1 @@
(import ./release.nix {}).shell

4
src/Main.hs Normal file
View File

@ -0,0 +1,4 @@
module Main where
main :: IO ()
main = putStrLn "Hello, Haskell!"