From 1cb54dcce29c51fced01d6e4e5d4bff651585e49 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Thu, 21 Mar 2024 11:02:36 +0000 Subject: [PATCH] feat(packages/tx5-signal-srv): only compile single binary --- modules/flake-parts/packages.holochain-tx5.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/flake-parts/packages.holochain-tx5.nix b/modules/flake-parts/packages.holochain-tx5.nix index 16c99dcd..1f04146c 100644 --- a/modules/flake-parts/packages.holochain-tx5.nix +++ b/modules/flake-parts/packages.holochain-tx5.nix @@ -16,8 +16,8 @@ system = pkgs.system; craneLib = inputs.crane.lib.${system}; cranePkgs = inputs.crane.inputs.nixpkgs.legacyPackages.${system}; - in { - tx5 = craneLib.buildPackage { + + tx5Args = { pname = "tx5"; src = inputs.tx5; version = inputs.tx5.rev; @@ -30,11 +30,15 @@ doCheck = false; }; + tx5Deps = lib.makeOverridable craneLib.buildDepsOnly tx5Args; + in { + tx5 = lib.makeOverridable craneLib.buildPackage (tx5Args // { + cargoArtifacts = tx5Deps; + }); - tx5-signal-srv = pkgs.runCommandNoCC "tx5-signal-srv" {} '' - mkdir -p $out/bin - cp ${self'.packages.tx5}/bin/tx5-signal-srv $out/bin/ - ''; + tx5-signal-srv = self'.packages.tx5.override { + cargoExtraArgs = "--bin tx5-signal-srv"; + }; }; }; flake = {