diff options
-rw-r--r-- | default.nix | 32 | ||||
-rw-r--r-- | utils.nix | 3 |
2 files changed, 18 insertions, 17 deletions
diff --git a/default.nix b/default.nix index de75f93..930e70e 100644 --- a/default.nix +++ b/default.nix @@ -5,7 +5,7 @@ let sha256 = "0hk4y2vkgm1qadpsm4b0q1vxq889jhxzjx3ragybrlwwg54mzp4f"; }) { }; pkgs = pkgsUnstable; - rootSrc = pkgs.nix-gitignore.gitignoreSource [] ./.; + rootSrc = pkgs.nix-gitignore.gitignoreSource [ ] ./.; # Taken from: # http://www.cs.yale.edu/homes/lucas.paul/posts/2017-04-10-hakyll-on-nix.html @@ -14,7 +14,7 @@ let src = ./hakyll; phases = "unpackPhase buildPhase"; buildInputs = - [(pkgsPinned.haskellPackages.ghcWithPackages (p: with p; [hakyll]))]; + [ (pkgsPinned.haskellPackages.ghcWithPackages (p: with p; [ hakyll ])) ]; buildPhase = '' mkdir -p $out/bin ghc -O2 -dynamic --make Main.hs -o $out/bin/build-site @@ -29,7 +29,7 @@ in rec { subtasks = rec { perlPodCheck = utils.baseTask.overrideAttrs (baseAttrs: { name = "${baseAttrs.name}-perl-podcheck"; - buildInputs = baseAttrs.buildInputs ++ [pkgs.perl]; + buildInputs = baseAttrs.buildInputs ++ [ pkgs.perl ]; buildPhase = '' podchecker website pastebin/website-pastebin slides/website-slides touch $out @@ -37,7 +37,7 @@ in rec { }); batsTest = utils.baseTask.overrideAttrs (baseAttrs: { name = "${baseAttrs.name}-bats-test"; - buildInputs = baseAttrs.buildInputs ++ [pkgs.bats pkgs.perl]; + buildInputs = baseAttrs.buildInputs ++ [ pkgs.bats pkgs.perl ]; buildPhase = '' patchShebangs . ./t/website.bats @@ -46,7 +46,7 @@ in rec { }); perlInternalTest = utils.baseTask.overrideAttrs (baseAttrs: { name = "${baseAttrs.name}-perl-test"; - buildInputs = baseAttrs.buildInputs ++ [pkgs.perl]; + buildInputs = baseAttrs.buildInputs ++ [ pkgs.perl ]; buildPhase = '' patchShebangs . ./website test @@ -56,7 +56,7 @@ in rec { hunspellCheck = utils.baseTask.overrideAttrs (baseAttrs: { name = "${baseAttrs.name}-hunspell"; buildInputs = baseAttrs.buildInputs - ++ [(pkgs.hunspellWithDicts (with pkgs.hunspellDicts; [en-us]))]; + ++ [ (pkgs.hunspellWithDicts (with pkgs.hunspellDicts; [ en-us ])) ]; buildPhase = '' patchShebangs . ./spelling/check-spelling.sh "${subtasks.docs}" @@ -81,20 +81,20 @@ in rec { }); }; test = utils.test [ - utils.formatNix - (utils.shellcheck null) - (utils.fixme ["pastebin/skeleton.org" "utils.nix"]) - subtasks.perlPodCheck - subtasks.batsTest - subtasks.perlInternalTest - subtasks.hunspellCheck - ]; + utils.formatNix + (utils.shellcheck null) + (utils.fixme [ "pastebin/skeleton.org" "utils.nix" ]) + subtasks.perlPodCheck + subtasks.batsTest + subtasks.perlInternalTest + subtasks.hunspellCheck + ]; shell = pkgs.mkShell rec { name = "website-shell"; buildInputs = [ websiteBuilder - (pkgs.haskellPackages.ghcWithPackages (p: with p; [hakyll])) - (pkgs.hunspellWithDicts (with pkgs.hunspellDicts; [en-us])) + (pkgs.haskellPackages.ghcWithPackages (p: with p; [ hakyll ])) + (pkgs.hunspellWithDicts (with pkgs.hunspellDicts; [ en-us ])) ]; }; publishScript = utils.publishScript subtasks.docs; @@ -17,7 +17,8 @@ in rec { baseTask.overrideAttrs (baseAttrs: rec { name = "${baseAttrs.name}-shellcheck"; buildInputs = baseAttrs.buildInputs ++ [ pkgs.shellcheck ]; - ignoredPattern = if ignoredFindPattern == null then "" else ignoredFindPattern; + ignoredPattern = + if ignoredFindPattern == null then "" else ignoredFindPattern; buildPhase = '' find . -type f \( -name '*.sh' -and -regextype egrep ! -regex '${ignoredPattern}' \) -print0 | xargs -0 shellcheck touch $out |