diff options
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 51 |
1 files changed, 2 insertions, 49 deletions
diff --git a/default.nix b/default.nix index 414e233..9c12498 100644 --- a/default.nix +++ b/default.nix @@ -1,24 +1,5 @@ let - pkgsUnstable = import <nixpkgs> { }; - pkgsPinned = import (pkgsUnstable.fetchzip { - url = "https://github.com/NixOS/nixpkgs/archive/18.03.zip"; - sha256 = "0hk4y2vkgm1qadpsm4b0q1vxq889jhxzjx3ragybrlwwg54mzp4f"; - }) { }; - pkgs = pkgsUnstable; - - # Taken from: - # http://www.cs.yale.edu/homes/lucas.paul/posts/2017-04-10-hakyll-on-nix.html - websiteBuilder = pkgs.stdenv.mkDerivation { - name = "website-builder"; - src = ./hakyll; - phases = "unpackPhase buildPhase"; - buildInputs = - [ (pkgsPinned.haskellPackages.ghcWithPackages (p: [ p.hakyll ])) ]; - buildPhase = '' - mkdir -p $out/bin - ghc -O2 -dynamic --make Main.hs -o $out/bin/build-site - ''; - }; + pkgs = import <nixpkgs> { }; in rec { utils = import ./utils.nix { pkgs = pkgs; @@ -26,32 +7,6 @@ in rec { baseName = "website"; }; subtasks = rec { - perlPodCheck = utils.baseTask.overrideAttrs (baseAttrs: { - name = "${baseAttrs.name}-perl-podcheck"; - buildInputs = baseAttrs.buildInputs ++ [ pkgs.perl ]; - buildPhase = '' - podchecker website pastebin/website-pastebin slides/website-slides - touch $out - ''; - }); - batsTest = utils.baseTask.overrideAttrs (baseAttrs: { - name = "${baseAttrs.name}-bats-test"; - buildInputs = baseAttrs.buildInputs ++ [ pkgs.bats pkgs.perl ]; - buildPhase = '' - patchShebangs . - ./t/website.bats - touch $out - ''; - }); - perlInternalTest = utils.baseTask.overrideAttrs (baseAttrs: { - name = "${baseAttrs.name}-perl-test"; - buildInputs = baseAttrs.buildInputs ++ [ pkgs.perl ]; - buildPhase = '' - patchShebangs . - ./website test - touch $out - ''; - }); hunspellCheck = utils.baseTask.overrideAttrs (baseAttrs: { name = "${baseAttrs.name}-hunspell"; buildInputs = baseAttrs.buildInputs @@ -65,7 +20,7 @@ in rec { docs = utils.baseTask.overrideAttrs (baseAttrs: { name = "${baseAttrs.name}-docs"; src = ./site; - buildInputs = [ websiteBuilder ]; + buildInputs = [ ]; buildPhase = '' export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive"; export LANG=en_US.UTF-8 @@ -87,8 +42,6 @@ in rec { shell = pkgs.mkShell rec { name = "website-shell"; buildInputs = [ - websiteBuilder - (pkgs.haskellPackages.ghcWithPackages (p: with p; [ hakyll ])) (pkgs.hunspellWithDicts (with pkgs.hunspellDicts; [ en-us ])) ]; }; |