From 7eaf686f90faaebbd822aa23f03b7cd6c8fcddd2 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Mon, 9 Oct 2023 13:18:02 -0400 Subject: [PATCH] bump hs-flake-utils and use the new write-cabal-project helper --- flake.lock | 8 ++++---- flake.nix | 28 ++++++---------------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/flake.lock b/flake.lock index c1bfd53..661f1e5 100644 --- a/flake.lock +++ b/flake.lock @@ -216,11 +216,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1692187439, - "narHash": "sha256-m7c4EPFWmB1OmV3dSYQk2qtXR53xOjZdLCjMtzHSK34=", + "lastModified": 1696619796, + "narHash": "sha256-4PjNRfnk22EuGCu7mF2sAb3JtaWKuBdgew4frd+Xpts=", "ref": "main", - "rev": "408f3deab2e2f6ae60349776dde02c44f71fb386", - "revCount": 16, + "rev": "8887555c96886d81d671fb68a3a2d000e578c4e0", + "revCount": 19, "type": "git", "url": "https://whetstone.private.storage/jcalderone/hs-flake-utils.git" }, diff --git a/flake.nix b/flake.nix index b52496a..4740de4 100644 --- a/flake.nix +++ b/flake.nix @@ -46,7 +46,7 @@ checks = hslib.checks {}; devShells = hslib.devShells { shellHook = '' - nix run .#generate-cabal-project + nix run .#write-cabal-project ''; extraBuildInputs = pkgs: with pkgs; [ @@ -56,27 +56,11 @@ 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 - packages: - -- These aren't released on hackage yet so we have to get them - -- another way. Here, we get them from the Nix store. - -- tahoe-chk - ${tahoe-chk} - -- tahoe-capabilities - ${tahoe-capabilities} - EOF - ''; - } - }/bin/generate-cabal-project"; + apps.write-cabal-project = hslib.apps.write-cabal-project { + localPackages = { + "tahoe-chk" = tahoe-chk.sourceInfo.outPath; + "tahoe-capabilities" = tahoe-capabilities.sourceInfo.outPath; + }; }; apps.cabal-test = hslib.apps.cabal-test { -- GitLab