Skip to content

Commit 9c77ef6

Browse files
committed
[DDW-1227] Rename ‘newCommon’ → ‘common’
1 parent 76aceab commit 9c77ef6

File tree

6 files changed

+56
-56
lines changed

6 files changed

+56
-56
lines changed

nix/devshells.nix

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
let
66
internal = inputs.self.internal.${targetSystem};
7-
inherit (internal) newCommon;
8-
inherit (newCommon) pkgs;
7+
inherit (internal) common;
8+
inherit (common) pkgs;
99

1010
devShells = pkgs.lib.genAttrs inputs.self.internal.installerClusters (cluster: let
1111

12-
launcherConfigs = newCommon.mkLauncherConfigs {
12+
launcherConfigs = common.mkLauncherConfigs {
1313
inherit cluster;
1414
devShell = true;
1515
};
@@ -23,16 +23,16 @@ let
2323
));
2424
in
2525
pkgs.writeShellScriptBin "regenerate-dev-certs" ''
26-
${newCommon.daedalus-bridge.${cluster}}/bin/cardano-launcher --config ${moddedConfig}
26+
${common.daedalus-bridge.${cluster}}/bin/cardano-launcher --config ${moddedConfig}
2727
'';
2828

2929
in pkgs.stdenv.mkDerivation (rec {
3030
buildInputs = [
31-
internal.newCommon.nodejs
32-
internal.newCommon.yarn
33-
newCommon.daedalus-bridge.${cluster}
34-
newCommon.daedalus-installer
35-
newCommon.mock-token-metadata-server
31+
internal.common.nodejs
32+
internal.common.yarn
33+
common.daedalus-bridge.${cluster}
34+
common.daedalus-installer
35+
common.mock-token-metadata-server
3636
regenerateDevCerts
3737
] ++ (with pkgs; [
3838
nix bash binutils coreutils curl gnutar
@@ -54,8 +54,8 @@ let
5454
name = "daedalus";
5555
buildCommand = "touch $out";
5656
LAUNCHER_CONFIG = DAEDALUS_CONFIG + "/launcher-config.yaml";
57-
CARDANO_NODE_VERSION = newCommon.cardanoNodeVersion;
58-
CARDANO_WALLET_VERSION = newCommon.cardanoWalletVersion;
57+
CARDANO_NODE_VERSION = common.cardanoNodeVersion;
58+
CARDANO_WALLET_VERSION = common.cardanoWalletVersion;
5959
DAEDALUS_CONFIG = pkgs.runCommand "daedalus-config" {} ''
6060
mkdir -pv $out
6161
cp ${pkgs.writeText "launcher-config.yaml" (builtins.toJSON launcherConfigs.launcherConfig)} $out/launcher-config.yaml
@@ -92,7 +92,7 @@ let
9292
9393
source <(cardano-node --bash-completion-script `type -p cardano-node`)
9494
95-
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${internal.newCommon.nodejs}/include/node -I${toString ../../.}/node_modules/node-addon-api"
95+
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${internal.common.nodejs}/include/node -I${toString ../../.}/node_modules/node-addon-api"
9696
yarn install
9797
9898
# Rebuild native modules for <https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules>:

nix/internal/any-darwin.nix

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ assert targetSystem == "x86_64-darwin" || targetSystem == "aarch64-darwin";
44

55
let
66

7-
newCommon = import ./new-common.nix { inherit inputs targetSystem; };
7+
common = import ./common.nix { inherit inputs targetSystem; };
88

9-
inherit (newCommon) sourceLib pkgs;
9+
inherit (common) sourceLib pkgs;
1010
inherit (pkgs) lib;
1111

12-
inherit (newCommon)
12+
inherit (common)
1313
daedalus-bridge daedalus-installer launcherConfigs mock-token-metadata-server
1414
cardanoNodeVersion cardanoWalletVersion;
1515

16-
inherit (newCommon) originalPackageJson electronVersion electronChromedriverVersion commonSources;
16+
inherit (common) originalPackageJson electronVersion electronChromedriverVersion commonSources;
1717

1818
archSuffix = if pkgs.system == "aarch64-darwin" then "arm64" else "x64";
1919
packageVersion = originalPackageJson.version;
@@ -23,8 +23,8 @@ let
2323

2424
in rec {
2525

26-
inherit newCommon;
27-
inherit (newCommon) nodejs nodePackages yarn yarn2nix offlineCache srcLockfiles srcWithoutNix;
26+
inherit common;
27+
inherit (common) nodejs nodePackages yarn yarn2nix offlineCache srcLockfiles srcWithoutNix;
2828

2929
# The following is used in all `configurePhase`s:
3030
darwinSpecificCaches = let
@@ -67,7 +67,7 @@ in rec {
6767
apple_sdk.frameworks.CoreServices
6868
apple_sdk.frameworks.AppKit
6969
]);
70-
configurePhase = newCommon.setupCacheAndGypDirs + darwinSpecificCaches;
70+
configurePhase = common.setupCacheAndGypDirs + darwinSpecificCaches;
7171
buildPhase = ''
7272
# Do not look up in the registry, but in the offline cache:
7373
${yarn2nix.fixup_yarn_lock}/bin/fixup_yarn_lock yarn.lock
@@ -127,15 +127,15 @@ in rec {
127127
BUILD_COUNTER = sourceLib.buildCounter;
128128
CARDANO_WALLET_VERSION = cardanoWalletVersion;
129129
CARDANO_NODE_VERSION = cardanoNodeVersion;
130-
configurePhase = newCommon.setupCacheAndGypDirs + darwinSpecificCaches + ''
130+
configurePhase = common.setupCacheAndGypDirs + darwinSpecificCaches + ''
131131
# Grab all cached `node_modules` from above:
132132
cp -r ${node_modules}/. ./
133133
chmod -R +w .
134134
'';
135135
outputs = [ "out" "futureInstaller" ];
136136
buildPhase = ''
137137
patchShebangs .
138-
sed -r 's#.*patchElectronRebuild.*#${newCommon.patchElectronRebuild}/bin/*#' -i scripts/rebuild-native-modules.sh
138+
sed -r 's#.*patchElectronRebuild.*#${common.patchElectronRebuild}/bin/*#' -i scripts/rebuild-native-modules.sh
139139
140140
export DEVX_FIXME_DONT_YARN_INSTALL=1
141141
(
File renamed without changes.

nix/internal/x86_64-linux.nix

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ assert targetSystem == "x86_64-linux";
44

55
let
66

7-
newCommon = import ./new-common.nix { inherit inputs targetSystem; };
7+
common = import ./common.nix { inherit inputs targetSystem; };
88

9-
inherit (newCommon) sourceLib pkgs commonSources;
9+
inherit (common) sourceLib pkgs commonSources;
1010
inherit (sourceLib) installerClusters;
1111
inherit (pkgs) lib;
1212

1313
genClusters = lib.genAttrs installerClusters;
1414

1515
in rec {
1616

17-
inherit newCommon;
18-
inherit (newCommon) nodejs nodePackages yarn yarn2nix offlineCache srcLockfiles srcWithoutNix electronVersion electronChromedriverVersion originalPackageJson;
17+
inherit common;
18+
inherit (common) nodejs nodePackages yarn yarn2nix offlineCache srcLockfiles srcWithoutNix electronVersion electronChromedriverVersion originalPackageJson;
1919

2020
package = genClusters (cluster: mkDaedalus { sandboxed = false; inherit cluster; });
2121

@@ -48,7 +48,7 @@ in rec {
4848
nativeBuildInputs = [ yarn nodejs ]
4949
++ (with pkgs; [ python3 pkgconfig jq ]);
5050
buildInputs = with pkgs; [ libusb ];
51-
configurePhase = newCommon.setupCacheAndGypDirs + linuxSpecificCaches;
51+
configurePhase = common.setupCacheAndGypDirs + linuxSpecificCaches;
5252
buildPhase = ''
5353
# Do not look up in the registry, but in the offline cache:
5454
${yarn2nix.fixup_yarn_lock}/bin/fixup_yarn_lock yarn.lock
@@ -90,34 +90,34 @@ in rec {
9090
nativeBuildInputs = [ yarn nodejs ]
9191
++ (with pkgs; [ python3 pkgconfig ]);
9292
buildInputs = with pkgs; [ libusb ];
93-
CARDANO_WALLET_VERSION = newCommon.cardanoWalletVersion;
94-
CARDANO_NODE_VERSION = newCommon.cardanoNodeVersion;
93+
CARDANO_WALLET_VERSION = common.cardanoWalletVersion;
94+
CARDANO_NODE_VERSION = common.cardanoNodeVersion;
9595
CI = "nix";
96-
NETWORK = newCommon.launcherConfigs.${cluster}.launcherConfig.networkName;
96+
NETWORK = common.launcherConfigs.${cluster}.launcherConfig.networkName;
9797
BUILD_REV = sourceLib.buildRev;
9898
BUILD_REV_SHORT = sourceLib.buildRevShort;
9999
BUILD_COUNTER = sourceLib.buildCounter;
100100
NODE_ENV = "production";
101101
BUILDTYPE = "Release";
102-
configurePhase = newCommon.setupCacheAndGypDirs + linuxSpecificCaches + ''
102+
configurePhase = common.setupCacheAndGypDirs + linuxSpecificCaches + ''
103103
# Grab all cached `node_modules` from above:
104104
cp -r ${node_modules}/. ./
105105
chmod -R +w .
106106
'';
107107
patchedPackageJson = pkgs.writeText "package.json" (builtins.toJSON (
108108
pkgs.lib.recursiveUpdate originalPackageJson {
109-
productName = newCommon.launcherConfigs.${cluster}.installerConfig.spacedName;
109+
productName = common.launcherConfigs.${cluster}.installerConfig.spacedName;
110110
main = "dist/main/index.js";
111111
}
112112
));
113113
buildPhase = ''
114114
cp -v $patchedPackageJson package.json
115115
116116
patchShebangs .
117-
sed -r 's#.*patchElectronRebuild.*#${newCommon.patchElectronRebuild}/bin/*#' -i scripts/rebuild-native-modules.sh
117+
sed -r 's#.*patchElectronRebuild.*#${common.patchElectronRebuild}/bin/*#' -i scripts/rebuild-native-modules.sh
118118
yarn build:electron
119119
120-
yarn run package -- --name ${lib.escapeShellArg newCommon.launcherConfigs.${cluster}.installerConfig.spacedName}
120+
yarn run package -- --name ${lib.escapeShellArg common.launcherConfigs.${cluster}.installerConfig.spacedName}
121121
'';
122122
installPhase = ''
123123
mkdir -p $out/bin $out/share/daedalus
@@ -197,15 +197,15 @@ in rec {
197197
mkDaedalus = { sandboxed, cluster }: import ../../installers/nix/linux.nix {
198198
inherit (pkgs) stdenv runCommand writeText writeScriptBin coreutils
199199
utillinux procps gsettings-desktop-schemas gtk3 hicolor-icon-theme xfce;
200-
inherit (newCommon) daedalus-installer;
201-
daedalus-bridge = newCommon.daedalus-bridge.${cluster};
200+
inherit (common) daedalus-installer;
201+
daedalus-bridge = common.daedalus-bridge.${cluster};
202202
inherit cluster sandboxed;
203203

204204
rawapp = daedalusJs.${cluster};
205205
electron = electronBin;
206206

207207
# FIXME: ???
208-
launcherConfigs = newCommon.launcherConfigs.${cluster};
208+
launcherConfigs = common.launcherConfigs.${cluster};
209209
linuxClusterBinName = cluster;
210210
};
211211

@@ -222,7 +222,7 @@ in rec {
222222

223223
installPath = ".daedalus";
224224

225-
iconPath = newCommon.launcherConfigs.${cluster}.installerConfig.iconPath;
225+
iconPath = common.launcherConfigs.${cluster}.installerConfig.iconPath;
226226
linuxClusterBinName = cluster;
227227

228228
namespaceHelper = pkgs.writeScriptBin "namespaceHelper" ''
@@ -297,7 +297,7 @@ in rec {
297297

298298
newBundle = let
299299
daedalus' = mkDaedalus { sandboxed = true; };
300-
daedalus-bridge = newCommon.daedalus-bridge.${cluster};
300+
daedalus-bridge = common.daedalus-bridge.${cluster};
301301
in (import ../../installers/nix/nix-installer.nix {
302302
inherit postInstall preInstall linuxClusterBinName;
303303
rawapp = daedalusJs.${cluster};

nix/internal/x86_64-windows.nix

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ assert targetSystem == "x86_64-windows";
44

55
let
66

7-
newCommon = import ./new-common.nix { inherit inputs targetSystem; };
7+
common = import ./common.nix { inherit inputs targetSystem; };
88

9-
inherit (newCommon) sourceLib pkgs srcWithoutNix yarn nodejs originalPackageJson commonSources electronVersion;
9+
inherit (common) sourceLib pkgs srcWithoutNix yarn nodejs originalPackageJson commonSources electronVersion;
1010
inherit (sourceLib) installerClusters;
1111
inherit (pkgs) lib;
1212

1313
genClusters = lib.genAttrs installerClusters;
1414

1515
in rec {
1616

17-
inherit newCommon;
17+
inherit common;
1818

1919
package = preSigning; # XXX: this is slightly wrong, as not all files are in their final relative paths
2020

@@ -50,23 +50,23 @@ in rec {
5050
nativeBuildInputs = [ yarn nodejs wine64 ]
5151
++ (with pkgs; [ python3 pkgconfig unzip ]);
5252
buildInputs = with pkgs; [ libusb ];
53-
CARDANO_WALLET_VERSION = newCommon.cardanoWalletVersion;
54-
CARDANO_NODE_VERSION = newCommon.cardanoNodeVersion;
53+
CARDANO_WALLET_VERSION = common.cardanoWalletVersion;
54+
CARDANO_NODE_VERSION = common.cardanoNodeVersion;
5555
CI = "nix";
56-
NETWORK = newCommon.launcherConfigs.${cluster}.launcherConfig.networkName;
56+
NETWORK = common.launcherConfigs.${cluster}.launcherConfig.networkName;
5757
BUILD_REV = sourceLib.buildRev;
5858
BUILD_REV_SHORT = sourceLib.buildRevShort;
5959
BUILD_COUNTER = sourceLib.buildCounter;
6060
NODE_ENV = "production";
6161
BUILDTYPE = "Release";
62-
configurePhase = newCommon.setupCacheAndGypDirs + ''
62+
configurePhase = common.setupCacheAndGypDirs + ''
6363
# Grab all cached `node_modules` from above:
6464
cp -r ${node_modules}/. ./
6565
chmod -R +w .
6666
'';
6767
patchedPackageJson = pkgs.writeText "package.json" (builtins.toJSON (
6868
pkgs.lib.recursiveUpdate originalPackageJson {
69-
productName = newCommon.launcherConfigs.${cluster}.installerConfig.spacedName;
69+
productName = common.launcherConfigs.${cluster}.installerConfig.spacedName;
7070
}
7171
));
7272
buildPhase = ''
@@ -206,12 +206,12 @@ in rec {
206206

207207
nativeModules = pkgs.stdenv.mkDerivation {
208208
name = "daedalus-native-modules";
209-
src = newCommon.srcLockfiles;
209+
src = common.srcLockfiles;
210210
nativeBuildInputs = [ yarn nodejs ]
211211
++ (with fresherPkgs; [ wineWowPackages.stableFull fontconfig winetricks samba /* samba for bin/ntlm_auth */ ])
212212
++ (with pkgs; [ python3 pkgconfig jq file procps ]);
213213
buildInputs = with pkgs; [ libusb ];
214-
configurePhase = newCommon.setupCacheAndGypDirs + ''
214+
configurePhase = common.setupCacheAndGypDirs + ''
215215
# Grab all cached `node_modules` from above:
216216
cp -r ${node_modules}/. ./
217217
chmod -R +w .
@@ -319,7 +319,7 @@ in rec {
319319
320320
${mkSection "Patching node_modules"}
321321
# Point electron-rebuild to the correct Node (Electron) headers location:
322-
${newCommon.patchElectronRebuild}/bin/* \
322+
${common.patchElectronRebuild}/bin/* \
323323
"$(winepath -w ${electronHeadersWithNodeLib.src} | sed -r 's,\\,\\\\\\\\,g')" \
324324
"$(winepath -w ${electronHeadersWithNodeLib} | sed -r 's,\\,\\\\\\\\,g')"
325325
@@ -403,7 +403,7 @@ in rec {
403403

404404
native = rec {
405405
nodejs = pkgs.fetchzip {
406-
url = "https://nodejs.org/dist/v${newCommon.nodejs.version}/node-v${newCommon.nodejs.version}-win-x64.zip";
406+
url = "https://nodejs.org/dist/v${common.nodejs.version}/node-v${common.nodejs.version}-win-x64.zip";
407407
hash = "sha256-n8ux67xrq3Rta1nE715y1m040oaLxUI2bIt12RaJdeM=";
408408
};
409409

@@ -433,14 +433,14 @@ in rec {
433433
'');
434434

435435
nsisFiles = genClusters (cluster: pkgs.runCommand "nsis-files" {
436-
buildInputs = [ newCommon.daedalus-installer pkgs.glibcLocales ];
436+
buildInputs = [ common.daedalus-installer pkgs.glibcLocales ];
437437
} ''
438438
mkdir installers
439439
cp -vir ${../../package.json} package.json
440440
cd installers
441441
442442
export LANG=en_US.UTF-8
443-
cp -v ${newCommon.launcherConfigs.${cluster}.configFiles}/* .
443+
cp -v ${common.launcherConfigs.${cluster}.configFiles}/* .
444444
make-installer --cardano dummy \
445445
--os win64 \
446446
-o $out \
@@ -451,7 +451,7 @@ in rec {
451451
452452
mkdir $out
453453
cp -v daedalus.nsi uninstaller.nsi $out/
454-
cp -v ${newCommon.launcherConfigs.${cluster}.configFiles}/* $out/
454+
cp -v ${common.launcherConfigs.${cluster}.configFiles}/* $out/
455455
ls -lR $out
456456
'');
457457

@@ -488,7 +488,7 @@ in rec {
488488
fastlist = pkgs.pkgsCross.mingwW64.callPackage ./fastlist.nix {};
489489

490490
preSigning = genClusters (cluster: let
491-
installDir = newCommon.launcherConfigs.${cluster}.installerConfig.spacedName;
491+
installDir = common.launcherConfigs.${cluster}.installerConfig.spacedName;
492492
in pkgs.runCommand "pre-signing" { buildInputs = [ pkgs.unzip ]; } ''
493493
mkdir $out
494494
cd $out
@@ -505,7 +505,7 @@ in rec {
505505
cp -v ${fastlist}/bin/fastlist.exe "../release/win32-x64/${installDir}-win32-x64/resources/app/dist/main/fastlist.exe"
506506
ln -s ${../../installers/nsis_plugins} nsis_plugins
507507
508-
cp -vr ${newCommon.daedalus-bridge.${cluster}}/bin/* .
508+
cp -vr ${common.daedalus-bridge.${cluster}}/bin/* .
509509
cp -v ${nsisFiles.${cluster}}/{*.yaml,*.json,daedalus.nsi,*.key,*.cert} .
510510
cp ${unsignedUninstaller.${cluster}}/uninstall.exe .
511511
if [ -f ${nsisFiles.${cluster}}/block-0.bin ]; then

scripts/rebuild-native-modules.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ find . -type f -name '*.node' -not -path '*/@swc*/*' -exec rm -vf {} ';'
1515
# Let’s patch electron-rebuild to force correct Node.js headers to
1616
# build native modules against even in `nix-shell`, otherwise, it
1717
# doesn’t work reliably.
18-
nix run -L .#internal."${system:-x86_64-darwin}".mainnet.newCommon.patchElectronRebuild
18+
nix run -L .#internal."${system:-x86_64-darwin}".mainnet.common.patchElectronRebuild
1919

2020
# XXX: Electron 24.2 requires c++17, not 14 (or old 1y):
2121
sed -r 's,std=c\+\+(14|1y),std=c++17,g' -i node_modules/usb/binding.gyp

0 commit comments

Comments
 (0)