Skip to content

Commit c0847d7

Browse files
Merge branch 'develop' into feature/ddw-409-new-mnemonic-input
2 parents b076b3b + af2c892 commit c0847d7

File tree

13 files changed

+153
-62
lines changed

13 files changed

+153
-62
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@
1414

1515
### Chores
1616

17+
- Updated cardano-node to 1.35.1 ([PR 3012](https://github.com/input-output-hk/daedalus/pull/3012))
1718
- Added Vasil-supported cardano-wallet ([PR 3001](https://github.com/input-output-hk/daedalus/pull/3001))
1819
- Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772))
1920

21+
### Features
22+
23+
- Updated Terms of Service ([PR 3009](https://github.com/input-output-hk/daedalus/pull/3009))
24+
2025
## 4.11.0
2126

2227
### Fixes

default.nix

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ let
3737
chmod -R +w $out
3838
cd $out
3939
patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch}
40+
patch -p1 -i ${pkgs.fetchurl {
41+
url = "https://github.com/input-output-hk/cardano-wallet/pull/3382.patch";
42+
sha256 = "1ii12g2zikv4197c7bsh4v5dc1jzygn1jap8xvnr7mvh3a09pdgn";
43+
}}
4044
'';
4145
};
4246
haskellNix = import sources."haskell.nix" {};
@@ -72,7 +76,20 @@ let
7276
cardanoLib = localLib.iohkNix.cardanoLib;
7377
daedalus-bridge = self.bridgeTable.${nodeImplementation};
7478

75-
nodejs = pkgs.nodejs-16_x;
79+
nodejs = let
80+
njPath = pkgs.path + "/pkgs/development/web/nodejs";
81+
buildNodeJs = pkgs.callPackage (import (njPath + "/nodejs.nix")) {
82+
python = pkgs.python3;
83+
icu = pkgs.icu68; # can’t build against ICU 69: <https://chromium-review.googlesource.com/c/v8/v8/+/2477751>
84+
};
85+
in
86+
buildNodeJs {
87+
enableNpm = true;
88+
version = "14.17.0";
89+
sha256 = "1vf989canwcx0wdpngvkbz2x232yccp7fzs1vcbr60rijgzmpq2n";
90+
patches = pkgs.lib.optional pkgs.stdenv.isDarwin (njPath + "/bypass-xcodebuild.diff");
91+
};
92+
7693
nodePackages = pkgs.nodePackages.override { nodejs = self.nodejs; };
7794
yarnInfo = {
7895
version = "1.22.4";

installers/nix/electron.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{ stdenv, lib, makeWrapper, fetchurl, unzip, atomEnv, libuuid, at-spi2-atk, at_spi2_core, libxshmfence,
2-
libxkbcommon }:
2+
libxkbcommon, runCommand, binutils-unwrapped }:
33

44
let
5-
version = "13.6.3";
5+
version = (builtins.fromJSON (builtins.readFile ../../package.json)).dependencies.electron;
66
name = "electron-${version}";
77

88
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";

nix/sources.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"cardano-node": {
3-
"branch": "tags/1.35.0",
3+
"branch": "tags/1.35.1",
44
"description": null,
55
"homepage": null,
66
"owner": "input-output-hk",
77
"repo": "cardano-node",
8-
"rev": "9f1d7dc163ee66410d912e48509d6a2300cfa68a",
9-
"sha256": "06arx9hv7dn3qxfy83f0b6018rxbsvh841nvfyg5w6qclm1hddj7",
8+
"rev": "c75451f0ffd7a60b5ad6c4263891e6c8acac105a",
9+
"sha256": "1z0zv1i58ikmbqg878f9z573jkwp4lzhmmswshm6c96rq6lprzh8",
1010
"type": "tarball",
11-
"url": "https://github.com/input-output-hk/cardano-node/archive/9f1d7dc163ee66410d912e48509d6a2300cfa68a.tar.gz",
11+
"url": "https://github.com/input-output-hk/cardano-node/archive/c75451f0ffd7a60b5ad6c4263891e6c8acac105a.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
},
1414
"cardano-shell": {

nix/yarn-nix-shell.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,9 @@ if [ -z "$command" ] ; then
2929
fi
3030

3131
export NETWORK
32+
33+
# Prevent segfaults on Darwin in `GC_*` code:
34+
export GC_DONT_GC=1
35+
3236
# `return` will make the user stay in `nix-shell` after the initial command finishes:
3337
exec nix-shell --argstr nodeImplementation cardano --argstr cluster "$cluster" --command "$command ; return"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"build:main": "yarn webpack -c source/main/webpack.config.js --progress",
1414
"build:renderer": "yarn webpack -c source/renderer/webpack.config.js --progress",
1515
"build:cleanup": "rimraf ./dist",
16-
"build:electron": "electron-rebuild -w usb --useCache -s --debug",
16+
"build:electron": "electron-rebuild --useCache && electron-rebuild -w usb --useCache -s --debug",
1717
"check:all": "yarn prettier:check && yarn lint && yarn compile && yarn stylelint && yarn lockfile:check && yarn i18n:manage && yarn storybook:build",
1818
"start": "yarn electron ./",
1919
"start:dev": "nodemon --watch 'dist/main' --exec 'NODE_ENV=development yarn start'",

release.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ in {
6969
in {
7070
daedalus-installer = allArchesNoWindows;
7171
yaml2json = allArchesNoWindows;
72+
nodejs = allArchesNoWindows;
7273
bridgeTable = {
7374
cardano = allArches;
7475
};
7576
cardano-node = allArches;
76-
}))
77+
})) // {
78+
recurseForDerivations = {};
79+
}

scripts/postinstall.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22

33
if [[ "$CI" != "true" ]]; then
44
yarn lockfile:fix
5+
6+
# Let’s patch electron-rebuild to force correct Node.js headers to
7+
# build native modules against even in `nix-shell`, otherwise, it
8+
# doesn’t work reliably.
9+
eval "$(nix-build -A rawapp.patchElectronRebuild)"
510
fi

shell.nix

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,6 @@ let
111111
ln -svf $(type -P cardano-node)
112112
ln -svf $(type -P cardano-wallet)
113113
ln -svf $(type -P cardano-cli)
114-
mkdir -p ${BUILDTYPE}/
115-
${let
116-
# (TODO: investigate why – @michalrus)
117-
sourceBUILDTYPE = "Release";
118-
in ''
119-
ln -svf $PWD/node_modules/usb/build/${sourceBUILDTYPE}/usb_bindings.node ${BUILDTYPE}/
120-
ln -svf $PWD/node_modules/node-hid/build/${sourceBUILDTYPE}/HID.node ${BUILDTYPE}/
121-
ln -svf $PWD/node_modules/node-hid/build/${sourceBUILDTYPE}/HID_hidraw.node ${BUILDTYPE}/
122-
ln -svf $PWD/node_modules/usb-detection/build/${sourceBUILDTYPE}/detection.node ${BUILDTYPE}/
123-
''}
124114
125115
${pkgs.lib.optionalString (nodeImplementation == "cardano") ''
126116
source <(cardano-node --bash-completion-script `type -p cardano-node`)
@@ -135,14 +125,51 @@ let
135125
''
136126
}
137127
yarn install --frozen-lockfile
128+
129+
# Rebuild native modules for <https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules>:
130+
find Debug/ Release/ -name '*.node' | xargs rm -v || true
138131
yarn build:electron
132+
133+
${let
134+
# Several native modules have to be linked in ${BUILDTYPE}/ in
135+
# root directory, for `yarn dev` to work correctly. If a Debug
136+
# version of such extension exists, we use it, otherwise, we
137+
# use Release:
138+
tryLink = dependency: fileName: ''
139+
symlinkTarget=$(ls 2>/dev/null -d \
140+
"$PWD/node_modules/${dependency}/build/Debug/${fileName}" \
141+
"$PWD/node_modules/${dependency}/build/Release/${fileName}" \
142+
| head -1
143+
)
144+
145+
if [ -z "$symlinkTarget" ] ; then
146+
echo >&2 "error: symlink target not found: ‘${fileName}’ in ‘${dependency}’"
147+
# ~exit 1~ — do not exit, let the person fix from inside `nix-shell`
148+
fi
149+
150+
${localLib.optionalString pkgs.stdenv.isLinux ''
151+
${pkgs.patchelf}/bin/patchelf --set-rpath ${pkgs.lib.makeLibraryPath [
152+
pkgs.stdenv.cc.cc pkgs.udev
153+
]} "$symlinkTarget"
154+
''}
155+
156+
mkdir -p ${BUILDTYPE}/
157+
ln -svf "$symlinkTarget" ${BUILDTYPE}/
158+
unset symlinkTarget
159+
'';
160+
in ''
161+
${tryLink "usb" "usb_bindings.node"}
162+
${tryLink "usb-detection" "detection.node"}
163+
${tryLink "node-hid" "HID.node"}
164+
${localLib.optionalString pkgs.stdenv.isLinux ''
165+
${tryLink "node-hid" "HID_hidraw.node"}
166+
''}
167+
''}
168+
139169
${localLib.optionalString pkgs.stdenv.isLinux ''
140-
${pkgs.patchelf}/bin/patchelf --set-rpath ${pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc pkgs.udev ]} ${BUILDTYPE}/usb_bindings.node
141-
${pkgs.patchelf}/bin/patchelf --set-rpath ${pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc pkgs.udev ]} ${BUILDTYPE}/HID.node
142-
# TODO: is this needed for `detection.node`?
143-
${pkgs.patchelf}/bin/patchelf --set-rpath ${pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc pkgs.udev ]} ${BUILDTYPE}/detection.node
144170
ln -svf ${daedalusPkgs.electron}/bin/electron ./node_modules/electron/dist/electron
145171
''}
172+
146173
echo 'jq < $LAUNCHER_CONFIG'
147174
echo debug the node by running debug-node
148175
'';

source/main/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const isSelfnode = checkIsSelfnode(NETWORK);
4646
const isDevelopment = checkIsDevelopment(NETWORK);
4747
const keepLocalClusterRunning = process.env.KEEP_LOCAL_CLUSTER_RUNNING;
4848
const API_VERSION = process.env.API_VERSION || 'dev';
49-
const NODE_VERSION = '1.35.0'; // TODO: pick up this value from process.env
49+
const NODE_VERSION = '1.35.1'; // TODO: pick up this value from process.env
5050

5151
const mainProcessID = get(process, 'ppid', '-');
5252
const rendererProcessID = process.pid;

0 commit comments

Comments
 (0)