diff --git a/flake.nix b/flake.nix
index f1e6ea9793d7370e8bf6c0a610ab618f0b86851e..36cdd0fe3aadff905b0652d6c36a3fd6fa8ebc18 100644
--- a/flake.nix
+++ b/flake.nix
@@ -54,7 +54,7 @@
       checks = hslib.checks {};
       devShells = hslib.devShells {
         shellHook = ''
-          nix run .#generate-cabal-project
+          nix run .#write-cabal-project
         '';
         extraBuildInputs = pkgs:
           with pkgs; [
@@ -64,27 +64,18 @@
       packages = hslib.packages {};
       apps.hlint = hslib.apps.hlint {};
 
-      apps.generate-cabal-project = {
-        type = "app";
-        program = "${
-          pkgs.writeShellApplication {
-            name = "generate-cabal-project";
-            text = ''
-              cat >cabal.project.local <<EOF
-              -- This file is auto-generated by the flake devShell's shellHook.  Do
-              -- not edit this file.  Make changes in flake.nix.
-              tests: true
-              EOF
-            '';
-          }
-        }/bin/generate-cabal-project";
+      apps.write-cabal-project = hslib.apps.write-cabal-project {
+        localPackages = {
+          "tahoe-chk" = tahoe-chk.sourceInfo.outPath;
+          "tahoe-ssk" = tahoe-ssk.sourceInfo.outPath;
+        };
       };
 
       # Using the working directory of `nix run`, do a build with cabal and
       # then run the test suite.
       apps.cabal-test = hslib.apps.cabal-test {
         preBuild = ''
-          nix run .#generate-cabal-project
+          nix run .#write-cabal-project
         '';
       };