Skip to content

Commit

Permalink
chore: Fix integration with latest nix bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Oct 17, 2024
1 parent 64e41c6 commit c8eb1ac
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 12 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,32 +274,32 @@ jobs:
- name: Bundle Lair Keystore
run: |
nix bundle .#holonix_lair_keystore
./lair-keystore --version
cp ./lair-keystore deploy/lair-keystore-x86-64-linux-bundle
./lair-keystore-arx --version
cp ./lair-keystore-arx deploy/lair-keystore-x86-64-linux-bundle
- name: Bundle Holochain
run: |
nix bundle .#holonix_holochain
./holochain --version
cp ./holochain deploy/holochain-x86-64-linux-bundle
./holochain-arx --version
cp ./holochain-arx deploy/holochain-x86-64-linux-bundle
- name: Bundle the `hc` CLI
run: |
nix bundle .#holonix_hc
./hc --version
cp ./hc deploy/hc-x86-64-linux-bundle
./hc-arx --version
cp ./hc-arx deploy/hc-x86-64-linux-bundle
- name: Bundle the `hc-run-local-services` CLI
run: |
nix bundle .#holonix_hc_run_local_services
./hc-run-local-services --version
cp ./hc-run-local-services deploy/hc-run-local-services-x86-64-linux-bundle
./hc-run-local-services-arx --version
cp ./hc-run-local-services-arx deploy/hc-run-local-services-x86-64-linux-bundle
- name: Bundle the `hcterm` CLI
run: |
nix bundle .#holonix_hcterm
./hcterm --version
cp ./hcterm deploy/hcterm-x86-64-linux-bundle
./hcterm-arx --version
cp ./hcterm-arx deploy/hcterm-x86-64-linux-bundle
- name: Upload artifacts to release
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.upload-to-tag != '' }}
Expand Down
21 changes: 19 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,30 @@
} else { });

extractHolochainBin = bin: pkgs.stdenv.mkDerivation {
name = bin;
pname = bin;
version = inputs.holonix.packages.${localSystem}.holochain.version;
meta = {
mainProgram = bin;
};
unpackPhase = "true";
installPhase = ''
mkdir -p $out/bin
cp ${inputs.holonix.packages.${localSystem}.holochain}/bin/${bin} $out/bin
'';
};

lairKeystoreDrv = pkgs.stdenv.mkDerivation {
pname = "lair-keystore";
version = inputs.holonix.packages.${localSystem}.lair-keystore.version;
meta = {
mainProgram = "lair-keystore";
};
unpackPhase = "true";
installPhase = ''
mkdir -p $out
cp ${inputs.holonix.packages.${localSystem}.lair-keystore}/bin/lair-keystore $out
'';
};
in
(defineHolochainPackages { crate = "holochain"; package = "holochain"; }) //
(defineHolochainPackages { crate = "hc"; package = "holochain_cli"; }) //
Expand All @@ -130,7 +147,7 @@
holonix_hc = extractHolochainBin "hc";
holonix_hc_run_local_services = extractHolochainBin "hc-run-local-services";
holonix_hcterm = extractHolochainBin "hcterm";
holonix_lair_keystore = inputs.holonix.packages.${localSystem}.lair-keystore;
holonix_lair_keystore = lairKeystoreDrv;
} else { })
;

Expand Down

0 comments on commit c8eb1ac

Please sign in to comment.