From 48eedffcd8de37acb38f213dc449063670de268b Mon Sep 17 00:00:00 2001 From: Samuel Leathers Date: Sat, 20 Apr 2024 01:06:46 -0400 Subject: [PATCH] backend: use nix-inclusive to prevent unnecessary rebuilds --- flake.nix | 2 +- govtool/backend/default.nix | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 39fe5cf78..b8554a57f 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ { packages.scripts = defaultPkgs.callPackage ./scripts/govtool { pkgs = defaultPkgs; }; packages.infra = defaultPkgs.callPackage ./infra/terraform { pkgs = defaultPkgs; }; - packages.backend = defaultPkgs.callPackage ./govtool/backend { pkgs = defaultPkgs; }; + packages.backend = defaultPkgs.callPackage ./govtool/backend { pkgs = defaultPkgs; incl = nix-inclusive.lib.inclusive; }; packages.frontendModules = frontend.nodeModules; packages.frontend = frontend; packages.webserver = defaultPkgs.callPackage frontend.webserver { diff --git a/govtool/backend/default.nix b/govtool/backend/default.nix index 575bf4dcc..03df035c3 100644 --- a/govtool/backend/default.nix +++ b/govtool/backend/default.nix @@ -1,4 +1,4 @@ -{ pkgs ? import { } }: +{ pkgs ? import { }, incl }: let inherit (pkgs.lib.trivial) pipe; inherit (pkgs) haskell; @@ -22,7 +22,13 @@ let modifier = drv: pipe drv [ appendLibraries appendTools ]; project = ghcPackages.developPackage { - root = ./.; + root = incl ./. [ + ./vva-be.cabal + ./app + ./src + ./CHANGELOG.md + ./sql + ]; modifier = modifier; overrides = self: super: { openapi3 = useBroken super.openapi3; }; };