diff --git a/index.html b/index.html index 02b4834..fe876d9 100644 --- a/index.html +++ b/index.html @@ -4861,26 +4861,24 @@ together with the high-level workflow described in 18 19 20 -21 -22
{
+21
{
   inputs = {
     nixpkgs.url = "github:NixOS/nixpkgs";
     flake-utils.url = "github:numtide/flake-utils";
-    pandoc-columns.url = "/home/amy/github/pandoc-columns";
-  };
-
-  outputs = { self, nixpkgs, flake-utils, pandoc-columns }:
-    flake-utils.lib.eachDefaultSystem (system:
-      let
+  };
+
+  outputs = { self, nixpkgs, flake-utils, pandoc-columns }:
+    flake-utils.lib.eachDefaultSystem (system:
+      let
         pkgs = import nixpkgs { inherit system; };
-        customGhc = pkgs.haskellPackages.ghcWithPackages (p: with p; [ pandoc-columns ]);
-      in
-      {
+        customGhc = pkgs.haskellPackages.ghcWithPackages (p: with p; [ extra ]);
+      in
+      {
         devShells = rec {
           default = pkgs.mkShell {
-	          buildInputs = [ customGhc ];
-          };
-        };
+	          buildInputs = [ customGhc ];
+          };
+        };
       }
     );
 }
@@ -4923,10 +4921,11 @@ and line 17 uses the custom GHC as a build input for this flake.

<no location info>: error: [GHC-49196] Can't find Main.hs *** Exception: ExitFailure 1 $ nix develop -$ runghc Main.hs # Works in development environemnt +error: Path 'source/recipes/devshell/haskell-pkg/tempwork' in the repository "/home/amy/codeberg/nix-book" is not tracked by Git. -<no location info>: error: [GHC-49196] Can't find Main.hs -*** Exception: ExitFailure 1
+ To make it visible to Nix, run: + + git -C "/home/amy/codeberg/nix-book" add "source/recipes/devshell/haskell-pkg/tempwork"
@@ -5636,7 +5635,7 @@ Hello from your flake! diff --git a/source/recipes/devshell/haskell-pkg/flake.nix b/source/recipes/devshell/haskell-pkg/flake.nix index 331af5e..00ce7dc 100644 --- a/source/recipes/devshell/haskell-pkg/flake.nix +++ b/source/recipes/devshell/haskell-pkg/flake.nix @@ -8,7 +8,7 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; - customGhc = pkgs.haskellPackages.ghcWithPackages (p: with p; [ extra ]); + customGhc = pkgs.haskellPackages.ghcWithPackages (p: with p; [ p.extra ]); in { devShells = rec { diff --git a/source/recipes/devshell/haskell-pkg/main.adoc0 b/source/recipes/devshell/haskell-pkg/main.adoc0 index 2dc745a..63da42b 100644 --- a/source/recipes/devshell/haskell-pkg/main.adoc0 +++ b/source/recipes/devshell/haskell-pkg/main.adoc0 @@ -21,16 +21,14 @@ it's usually more convenient to use `haskell-flake` as described in <<#haskell-f together with the _high-level workflow_ described in <<_development_workflows>>. ==== -[source,nix,linenums,highlight='5,8,12,17'] +[source,nix,linenums,highlight='11,16'] .flake.nix .... include::flake.nix[] .... -Line 5 adds `pandoc-columns` as an input to this flake. -Line 8 allows the output function to reference `pandoc-columns`. -Line 12 makes a custom GHC that knows about `pandoc-columns`, -and line 17 uses the custom GHC as a build input for this flake. +Line 12 makes a custom GHC that knows about `extra`, +and line 16 makes that custom GHC available in the development environment. Here's a short Haskell program that uses the new flake.