1
1
mirror of https://github.com/srid/rib.git synced 2024-11-30 03:45:00 +03:00

Cabal'ify examples/hello-world

default.nix is mostly a copy of rib's default.nix
This commit is contained in:
Sridhar Ratnakumar 2019-08-03 10:02:32 -04:00
parent 07c341a664
commit 6704fbeb2c
3 changed files with 52 additions and 2 deletions

View File

@ -0,0 +1,34 @@
let
pkgs = import <nixpkgs> { };
compiler = "default";
haskellPackages =
if compiler == "default"
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
in
haskellPackages.developPackage {
root = ./.;
source-overrides = {
clay = pkgs.fetchFromGitHub {
owner = "sebastiaanvisser";
repo = "clay";
rev = "54dc9eaf0abd180ef9e35d97313062d99a02ee75";
sha256 = "0y38hyd2gvr7lrbxkrjwg4h0077a54m7gxlvm9s4kk0995z1ncax";
};
pandoc-include-code = pkgs.fetchFromGitHub {
owner = "owickstrom";
repo = "pandoc-include-code";
rev = "7e4d9d967ff3e3855a7eae48408c43b3400ae6f4";
sha256 = "0wvml63hkhgmmkdd2ml5a3g7cb69hxwdsjmdhdzjbqbrwkmc20rd";
};
rib = ./../..;
};
overrides = self: super: with pkgs.haskell.lib; {
clay = dontCheck super.clay;
};
modifier = drv: pkgs.haskell.lib.overrideCabal drv (attrs: {
buildTools = (attrs.buildTools or []) ++ [haskellPackages.ghcid] ;
});
}

View File

@ -0,0 +1,17 @@
cabal-version: 2.4
name: hello-world
version: 0.1.0.0
license: BSD-3-Clause
author: Sridhar Ratnakumar
maintainer: srid@srid.ca
category: Web
executable hello-world
main-is: Main.hs
build-depends: base ^>=4.12.0.0
, rib
, clay
, shake
, lucid
default-language: Haskell2010

View File

@ -21,10 +21,9 @@ library
exposed-modules:
Rib.App
, Rib.Pandoc
, Rib.Server
, Rib.Shake
, Rib.Simple
other-modules:
Rib.Server
hs-source-dirs:
src
ghc-options: -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates