From 76f688b1e63ce9ef2b2435cd64e30d10d98fa9cd Mon Sep 17 00:00:00 2001 From: chaos Date: Thu, 21 Sep 2023 01:24:37 +0100 Subject: [PATCH] make deps its own package --- flake.nix | 5 ++++- packages/backend/default.nix | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 1b9ae2e..126197c 100644 --- a/flake.nix +++ b/flake.nix @@ -20,13 +20,16 @@ nixosModules.piped = import ./module/default.nix; nixosModules.default = self.nixosModules.piped; - overlays.piped = final: _prev: { + overlays.piped = final: _prev: rec { piped-frontend = final.callPackage ./packages/frontend {}; piped-backend = final.callPackage ./packages/backend { jre = final.openjdk19_headless; jdk = final.openjdk19; }; piped-proxy = final.callPackage ./packages/proxy {}; + piped-backend-deps = final.callPackage ./packages/backend/deps.nix { + jdk = final.openjdk19; + }; }; overlays.default = self.overlays.piped; } diff --git a/packages/backend/default.nix b/packages/backend/default.nix index c6016d7..c6be0d0 100644 --- a/packages/backend/default.nix +++ b/packages/backend/default.nix @@ -8,11 +8,11 @@ perl, writeText, callPackage, + piped-backend-deps, }: let meta = builtins.fromJSON (builtins.readFile ../../meta.json); - deps = - callPackage ./deps.nix {inherit stdenv fetchFromGitHub jdk gradle perl;}; + deps = piped-backend-deps; gradleInit = writeText "init.gradle" '' logger.lifecycle 'Replacing Maven repositories with ${deps}...'