From 0d782ceb7ec486fce37ea9b43e5d9de1b0eba986 Mon Sep 17 00:00:00 2001 From: "Robert W. Pearce" Date: Tue, 30 Jan 2024 10:52:21 -0500 Subject: [PATCH] fix build by updating cabal file and getting some nix things in line --- flake.nix | 7 +++++-- ssg/ssg.cabal | 24 +++++++++++++++++------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index d0d6fbd..c70f8d2 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ hakyllProject = final.haskell-nix.project' { src = ./ssg; compiler-nix-name = "ghc948"; + modules = [{ doHaddock = false; }]; shell.buildInputs = [ hakyll-site ]; @@ -43,7 +44,9 @@ flake = pkgs.hakyllProject.flake {}; - hakyll-site = flake.packages."ssg:exe:hakyll-site"; + executable = "ssg:exe:hakyll-site"; + + hakyll-site = flake.packages.${executable}; website = pkgs.stdenv.mkDerivation { name = "website"; @@ -64,7 +67,7 @@ "${pkgs.glibcLocales}/lib/locale/locale-archive"; buildPhase = '' - ${hakyll-site}/bin/hakyll-site build --verbose + ${flake.packages.${executable}}/bin/hakyll-site build --verbose ''; installPhase = '' diff --git a/ssg/ssg.cabal b/ssg/ssg.cabal index 6bbad66..47cea1f 100644 --- a/ssg/ssg.cabal +++ b/ssg/ssg.cabal @@ -1,4 +1,4 @@ -cabal-version: 2.4 +cabal-version: 3.6 name: ssg version: 0.1.0.0 @@ -7,13 +7,23 @@ license: BSD-3-Clause license-file: LICENSE executable hakyll-site + default-language: Haskell2010 main-is: Main.hs hs-source-dirs: src - build-depends: base >= 4.8 - , hakyll >= 4.14 + build-depends: base == 4.* + , hakyll == 4.15.* , filepath >= 1.0 , pandoc >= 2.11 - , slugger >= 0.1.0.1 - , text >= 1.2 && < 1.3 - ghc-options: -Wall -threaded - default-language: Haskell2010 + , slugger >= 0.1.0.2 + , text >= 1 && < 3 + ghc-options: -Wall + -Wcompat + -Widentities + -Wincomplete-record-updates + -Wincomplete-uni-patterns + -Wpartial-fields + -Wredundant-constraints + -O2 + -threaded + -rtsopts + -with-rtsopts=-N