Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEVOPS] Reduce the size of Linux installers #2260

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Changelog

## vNext

### Chores

- Reduced the size of Linux installer ([PR 2260](https://github.com/input-output-hk/daedalus/pull/2260))

### Features

- Added hardware wallet support for Testnet network ([PR 2264](https://github.com/input-output-hk/daedalus/pull/2264))
Expand Down
11 changes: 9 additions & 2 deletions nix/cardano-bridge.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ target, pkgs, cardanoWalletPkgs, runCommand, cardano-wallet, cardano-node, cardano-shell, cardano-cli, cardano-address }:
{ target, pkgs, cardanoWalletPkgs, runCommandCC, cardano-wallet, cardano-node, cardano-shell, cardano-cli, cardano-address, stdenv, lib }:

let
commonLib = import ../lib.nix {};
pkgsCross = import cardanoWalletPkgs.path { crossSystem = cardanoWalletPkgs.lib.systems.examples.mingwW64; config = {}; overlays = []; };
in runCommand "daedalus-cardano-bridge" {
in runCommandCC "daedalus-cardano-bridge" {
passthru = {
node-version = cardano-node.passthru.identifier.version;
wallet-version = cardano-wallet.version;
Expand All @@ -17,4 +17,11 @@ in runCommand "daedalus-cardano-bridge" {
cp -f ${cardano-shell.haskellPackages.cardano-launcher.components.exes.cardano-launcher}/bin/cardano-launcher* .
cp -f ${cardano-node}/bin/cardano-node* .
cp -f ${cardano-cli}/bin/cardano-cli* .
${lib.optionalString (target == "x86_64-linux") ''
chmod +w -R .
for x in cardano-address cardano-node cardano-launcher cardano-cli cardano-wallet; do
$STRIP $x
patchelf --shrink-rpath $x
done
''}
''
4 changes: 4 additions & 0 deletions yarn2nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ yarn2nix.mkYarnPackage {
mkdir -pv $out/share/daedalus/build
cp node_modules/usb/build/Debug/usb_bindings.node $out/share/daedalus/build/usb_bindings.node
cp node_modules/node-hid/build/Debug/HID-hidraw.node $out/share/daedalus/build/HID-hidraw.node
for file in $out/share/daedalus/build/usb_bindings.node $out/share/daedalus/build/HID-hidraw.node; do
$STRIP $file
patchelf --shrink-rpath $file
done
'';
#allowedReferences = [ "out" ];
#allowedRequisites = [
Expand Down