Skip to content

Commit 24254f4

Browse files
author
Marcin Mazurek
committed
Merge branch 'feat/ddw-809-implement-analytics-part-3' into feat/ddw-809-implement-analytics-remaining-tracking
2 parents bca0dab + cd4fff1 commit 24254f4

File tree

261 files changed

+1115
-545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

261 files changed

+1115
-545
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions

default.nix

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ let
5050
aarch64-darwin = macos.silicon;
5151
}.${target};
5252
walletPkgs = import "${sources.cardano-wallet}/nix" {};
53+
cardanoWorldFlake = (flake-compat { src = sources.cardano-world; }).defaultNix.outputs;
5354
# only used for CLI, to be removed when upgraded to next node version
5455
nodePkgs = import "${sources.cardano-node}/nix" {};
5556
shellPkgs = (import "${sources.cardano-shell}/nix") {};
@@ -68,7 +69,7 @@ let
6869
ostable.aarch64-darwin = "macos64-arm";
6970

7071
packages = self: {
71-
inherit walletFlake cluster pkgs version target nodeImplementation;
72+
inherit walletFlake cardanoWorldFlake cluster pkgs version target nodeImplementation;
7273
cardanoLib = localLib.iohkNix.cardanoLib;
7374
daedalus-bridge = self.bridgeTable.${nodeImplementation};
7475

@@ -145,7 +146,7 @@ let
145146
nsis = nsisNixPkgs.callPackage ./nix/nsis.nix {};
146147

147148
launcherConfigs = self.callPackage ./nix/launcher-config.nix {
148-
inherit devShell topologyOverride configOverride genesisOverride;
149+
inherit devShell topologyOverride configOverride genesisOverride system;
149150
network = cluster;
150151
os = ostable.${target};
151152
backend = nodeImplementation;
@@ -261,6 +262,24 @@ let
261262
'';
262263
uninstaller = if needSignedBinaries then self.signedUninstaller else self.unsignedUninstaller;
263264

265+
windowsIcons = let
266+
buildInputs = with pkgs; [ imagemagick ];
267+
# Allow fallback to `mainnet` if cluster’s icons don’t exist:
268+
srcCluster = if builtins.pathExists (./installers/icons + "/${cluster}") then cluster else "mainnet";
269+
in pkgs.runCommand "windows-icons-${cluster}" { inherit buildInputs; } ''
270+
mkdir -p $out/${cluster} $out
271+
cp -r ${./installers/icons + "/${srcCluster}"}/. $out/${cluster}/.
272+
cp ${./installers/icons/installBanner.bmp} $out/installBanner.bmp
273+
cd $out/${cluster}
274+
rm *.ico *.ICO || true # XXX: just in case
275+
for f in *.png ; do
276+
# XXX: these sizes are too large for the ICO format:
277+
if [ "$f" == 1024x1024.png ] || [ "$f" == 512x512.png ] ; then continue ; fi
278+
convert "$f" "''${f%.png}.ico"
279+
done
280+
convert 16x16.png 24x24.png 32x32.png 48x48.png 64x64.png 128x128.png 256x256.png ${cluster}.ico
281+
'';
282+
264283
unsigned-windows-installer = let
265284
installDir = self.launcherConfigs.installerConfig.spacedName;
266285
in pkgs.runCommand "win64-installer-${cluster}" {
@@ -275,7 +294,7 @@ let
275294
mkdir -p $out/{nix-support,cfg-files}
276295
mkdir installers
277296
cp -vir ${./installers/dhall} installers/dhall
278-
cp -vir ${./installers/icons} installers/icons
297+
cp -vir ${self.windowsIcons} installers/icons
279298
cp -vir ${./package.json} package.json
280299
chmod -R +w installers
281300
cd installers

installer-clusters.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mainnet selfnode mainnet_flight testnet
1+
mainnet preprod preview shelley_qa selfnode

installers/common/Types.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ data Cluster
5858
| Shelley_QA
5959
| Testnet
6060
| Alonzo_Purple
61+
| Vasil_Dev
62+
| Preprod
63+
| Preview
6164
deriving (Bounded, Enum, Eq, Read, Show)
6265

6366
-- | The wallet backend to include in the installer.
@@ -109,6 +112,9 @@ clusterNetwork Staging = "staging"
109112
clusterNetwork Shelley_QA = "shelley_qa"
110113
clusterNetwork Testnet = "testnet"
111114
clusterNetwork Alonzo_Purple = "alonzo_purple"
115+
clusterNetwork Vasil_Dev = "vasil_dev"
116+
clusterNetwork Preprod = "preprod"
117+
clusterNetwork Preview = "preview"
112118

113119
packageFileName :: OS -> Cluster -> Version -> Backend -> Text -> Maybe BuildJob -> FilePath
114120
packageFileName _os cluster ver backend _backendVer build = fromText name <.> ext

installers/daedalus-installer.nix

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@
88
mkDerivation {
99
pname = "daedalus-installer";
1010
version = "0.1.0.0";
11-
src = ./.;
11+
src = lib.cleanSourceWith {
12+
name = "daedalus-installer-src";
13+
src = ./.;
14+
filter = name: type: (type == "directory" && (
15+
lib.hasSuffix "/common" name
16+
)) || (type == "regular" && (
17+
lib.hasSuffix ".hs" name ||
18+
lib.hasSuffix ".cabal" name ||
19+
lib.hasSuffix "/cabal.project" name
20+
));
21+
};
1222
isLibrary = true;
1323
isExecutable = true;
1424
doCheck = false;

installers/icons/README.md

Lines changed: 1 addition & 11 deletions
-66.1 KB
Binary file not shown.
-1.12 KB
Binary file not shown.
-1.4 KB
Binary file not shown.
-1.54 KB
Binary file not shown.

0 commit comments

Comments
 (0)