From 406e163afadf50018acd75eaaf25eee966a31568 Mon Sep 17 00:00:00 2001 From: Mats Rauhala Date: Thu, 20 Sep 2018 21:14:24 +0300 Subject: [PATCH] Boilerplate operations --- .gitignore | 2 ++ default.nix | 3 +++ release.nix | 21 +++++++++++++++++++++ hakylltest.cabal => site.cabal | 2 +- 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 default.nix create mode 100644 release.nix rename hakylltest.cabal => site.cabal (89%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2f71f5d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +_site +_cache diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..582bcfb --- /dev/null +++ b/default.nix @@ -0,0 +1,3 @@ +{ haskellPackages }: + +haskellPackages.callCabal2nix "site" ./. {} diff --git a/release.nix b/release.nix new file mode 100644 index 0000000..4157852 --- /dev/null +++ b/release.nix @@ -0,0 +1,21 @@ +{ pkgs ? import {} }: + +let + haskellPackages = pkgs.haskellPackages; + site = pkgs.callPackage ./default.nix {}; + shell = pkgs.buildEnv { + name = "site-shell"; + paths = []; + buildInputs = [ + haskellPackages.ghcid + haskellPackages.hasktags + (haskellPackages.ghcWithHoogle (h: site.buildInputs ++ site.propagatedBuildInputs)) + ]; + }; + +in + +{ + site = site; + shell = shell; +} diff --git a/hakylltest.cabal b/site.cabal similarity index 89% rename from hakylltest.cabal rename to site.cabal index dbcf5f3..28499ee 100644 --- a/hakylltest.cabal +++ b/site.cabal @@ -1,4 +1,4 @@ -name: hakylltest +name: site version: 0.1.0.0 build-type: Simple cabal-version: >= 1.10