Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feat/ddw-1025-mato…
Browse files Browse the repository at this point in the history
…mo-poc
  • Loading branch information
Marcin Mazurek committed Aug 22, 2022
2 parents efeff61 + 98500a2 commit a64c5d1
Show file tree
Hide file tree
Showing 260 changed files with 1,106 additions and 539 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

## vNext

### Features

- Added new Mnemonic input component ([PR 2979](https://github.com/input-output-hk/daedalus/pull/2979))

### Fixes

- Ensured non-recommended decimal place setting alert is correctly shown ([PR 3007](https://github.com/input-output-hk/daedalus/pull/3007))
- Disabled the possibility to choose a syncing wallet for ITN rewards and delegation ([PR 3015](https://github.com/input-output-hk/daedalus/pull/3015))

### Chores

- Updated cardano-node to 1.35.3; added `vasil-dev`, `preprod`, `preview` variants ([PR 3025](https://github.com/input-output-hk/daedalus/pull/3025))
- Updated cardano-node to 1.35.2 ([PR 3021](https://github.com/input-output-hk/daedalus/pull/3021))
- Fix `darwin-launcher.go` to replace its process image with `cardano-launcher` (binary), and not swallow `stdout` ([PR 3023](https://github.com/input-output-hk/daedalus/pull/3023))
- Updated cardano-node to 1.35.1 ([PR 3012](https://github.com/input-output-hk/daedalus/pull/3012))
Expand Down Expand Up @@ -46,6 +51,7 @@

### Chores

- Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772))
- Bumped vulnerable dependencies versions ([PR 2943](https://github.com/input-output-hk/daedalus/pull/2943))
- Added support for Trezor firmware 2.5.1 ([PR 2991](https://github.com/input-output-hk/daedalus/pull/2991))
- Added steps on how to link with `react-polymorph` and other external UI libraries ([PR 2948](https://github.com/input-output-hk/daedalus/pull/2948))
Expand Down
25 changes: 22 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ let
aarch64-darwin = macos.silicon;
}.${target};
walletPkgs = import "${sources.cardano-wallet}/nix" {};
cardanoWorldFlake = (flake-compat { src = sources.cardano-world; }).defaultNix.outputs;
# only used for CLI, to be removed when upgraded to next node version
nodePkgs = import "${sources.cardano-node}/nix" {};
shellPkgs = (import "${sources.cardano-shell}/nix") {};
Expand All @@ -68,7 +69,7 @@ let
ostable.aarch64-darwin = "macos64-arm";

packages = self: {
inherit walletFlake cluster pkgs version target nodeImplementation;
inherit walletFlake cardanoWorldFlake cluster pkgs version target nodeImplementation;
cardanoLib = localLib.iohkNix.cardanoLib;
daedalus-bridge = self.bridgeTable.${nodeImplementation};

Expand Down Expand Up @@ -145,7 +146,7 @@ let
nsis = nsisNixPkgs.callPackage ./nix/nsis.nix {};

launcherConfigs = self.callPackage ./nix/launcher-config.nix {
inherit devShell topologyOverride configOverride genesisOverride;
inherit devShell topologyOverride configOverride genesisOverride system;
network = cluster;
os = ostable.${target};
backend = nodeImplementation;
Expand Down Expand Up @@ -261,6 +262,24 @@ let
'';
uninstaller = if needSignedBinaries then self.signedUninstaller else self.unsignedUninstaller;

windowsIcons = let
buildInputs = with pkgs; [ imagemagick ];
# Allow fallback to `mainnet` if cluster’s icons don’t exist:
srcCluster = if builtins.pathExists (./installers/icons + "/${cluster}") then cluster else "mainnet";
in pkgs.runCommand "windows-icons-${cluster}" { inherit buildInputs; } ''
mkdir -p $out/${cluster} $out
cp -r ${./installers/icons + "/${srcCluster}"}/. $out/${cluster}/.
cp ${./installers/icons/installBanner.bmp} $out/installBanner.bmp
cd $out/${cluster}
rm *.ico *.ICO || true # XXX: just in case
for f in *.png ; do
# XXX: these sizes are too large for the ICO format:
if [ "$f" == 1024x1024.png ] || [ "$f" == 512x512.png ] ; then continue ; fi
convert "$f" "''${f%.png}.ico"
done
convert 16x16.png 24x24.png 32x32.png 48x48.png 64x64.png 128x128.png 256x256.png ${cluster}.ico
'';

unsigned-windows-installer = let
installDir = self.launcherConfigs.installerConfig.spacedName;
in pkgs.runCommand "win64-installer-${cluster}" {
Expand All @@ -275,7 +294,7 @@ let
mkdir -p $out/{nix-support,cfg-files}
mkdir installers
cp -vir ${./installers/dhall} installers/dhall
cp -vir ${./installers/icons} installers/icons
cp -vir ${self.windowsIcons} installers/icons
cp -vir ${./package.json} package.json
chmod -R +w installers
cd installers
Expand Down
2 changes: 1 addition & 1 deletion installer-clusters.cfg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mainnet selfnode mainnet_flight testnet
mainnet preprod preview shelley_qa selfnode
6 changes: 6 additions & 0 deletions installers/common/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ data Cluster
| Shelley_QA
| Testnet
| Alonzo_Purple
| Vasil_Dev
| Preprod
| Preview
deriving (Bounded, Enum, Eq, Read, Show)

-- | The wallet backend to include in the installer.
Expand Down Expand Up @@ -109,6 +112,9 @@ clusterNetwork Staging = "staging"
clusterNetwork Shelley_QA = "shelley_qa"
clusterNetwork Testnet = "testnet"
clusterNetwork Alonzo_Purple = "alonzo_purple"
clusterNetwork Vasil_Dev = "vasil_dev"
clusterNetwork Preprod = "preprod"
clusterNetwork Preview = "preview"

packageFileName :: OS -> Cluster -> Version -> Backend -> Text -> Maybe BuildJob -> FilePath
packageFileName _os cluster ver backend _backendVer build = fromText name <.> ext
Expand Down
12 changes: 11 additions & 1 deletion installers/daedalus-installer.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@
mkDerivation {
pname = "daedalus-installer";
version = "0.1.0.0";
src = ./.;
src = lib.cleanSourceWith {
name = "daedalus-installer-src";
src = ./.;
filter = name: type: (type == "directory" && (
lib.hasSuffix "/common" name
)) || (type == "regular" && (
lib.hasSuffix ".hs" name ||
lib.hasSuffix ".cabal" name ||
lib.hasSuffix "/cabal.project" name
));
};
isLibrary = true;
isExecutable = true;
doCheck = false;
Expand Down
12 changes: 1 addition & 11 deletions installers/icons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,7 @@ directories.

### Windows

Use Nix to enter a shell with the necessary tools available:

nix run nixpkgs.icoutils nixpkgs.imagemagick

To generate ico files:

icotool -c -o 256x256.ico 256x256.png

To Merge all icons into a single bundle:

./update_icons
Are generated automatically, based on the PNG files.

Currently, the Windows installer uses the bundle with 8 of the icons.

Expand Down
Binary file removed installers/icons/alonzo_purple/128x128.ico
Binary file not shown.
Binary file removed installers/icons/alonzo_purple/16x16.ico
Binary file not shown.
Binary file removed installers/icons/alonzo_purple/18x18.ico
Binary file not shown.
Binary file removed installers/icons/alonzo_purple/19x19.ico
Binary file not shown.
Binary file removed installers/icons/alonzo_purple/22x22.ico
Binary file not shown.
Binary file removed installers/icons/alonzo_purple/24x24.ico
Binary file not shown.
Binary file removed installers/icons/alonzo_purple/256x256.ico
Binary file not shown.
Binary file removed installers/icons/alonzo_purple/32x32.ico
Binary file not shown.
Binary file removed installers/icons/alonzo_purple/40x40.ico
Binary file not shown.
Binary file removed installers/icons/alonzo_purple/48x48.ico
Binary file not shown.
Binary file removed installers/icons/alonzo_purple/64x64.ico
Binary file not shown.
Binary file removed installers/icons/alonzo_purple/alonzo_purple.ico
Binary file not shown.
Binary file removed installers/icons/local/128x128.ico
Binary file not shown.
Binary file removed installers/icons/local/16x16.ico
Binary file not shown.
Binary file removed installers/icons/local/18x18.ico
Binary file not shown.
Binary file removed installers/icons/local/19x19.ico
Binary file not shown.
Binary file removed installers/icons/local/22x22.ico
Binary file not shown.
Binary file removed installers/icons/local/24x24.ico
Binary file not shown.
Binary file removed installers/icons/local/256x256.ico
Binary file not shown.
Binary file removed installers/icons/local/32x32.ico
Binary file not shown.
Binary file removed installers/icons/local/40x40.ico
Binary file not shown.
Binary file removed installers/icons/local/48x48.ico
Binary file not shown.
Binary file removed installers/icons/local/64x64.ico
Binary file not shown.
Binary file removed installers/icons/local/selfnode.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/128x128.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/16x16.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/18x18.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/19x19.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/22x22.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/24x24.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/256x256.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/32x32.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/40x40.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/48x48.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/64x64.ico
Binary file not shown.
Binary file removed installers/icons/mainnet/mainnet.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/128x128.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/16x16.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/18x18.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/19x19.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/22x22.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/24x24.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/256x256.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/32x32.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/40x40.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/48x48.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/64x64.ico
Binary file not shown.
Binary file removed installers/icons/mainnet_flight/mainnet_flight.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod.iconset/icon_128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod.iconset/icon_16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod.iconset/icon_18x18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod.iconset/icon_19x19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod.iconset/icon_22x22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod.iconset/icon_24x24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod.iconset/icon_256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod.iconset/icon_32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod.iconset/icon_40x40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod.iconset/icon_48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod.iconset/icon_64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installers/icons/preprod/1024x1024.png
Binary file added installers/icons/preprod/128x128.png
Binary file added installers/icons/preprod/16x16.png
Binary file added installers/icons/preprod/18x18.png
Binary file added installers/icons/preprod/19x19.png
Binary file added installers/icons/preprod/22x22.png
Binary file added installers/icons/preprod/24x24.png
Binary file added installers/icons/preprod/256x256.png
Binary file added installers/icons/preprod/32x32.png
Binary file added installers/icons/preprod/40x40.png
Binary file added installers/icons/preprod/48x48.png
Binary file added installers/icons/preprod/512x512.png
Binary file added installers/icons/preprod/64x64.png
Binary file added installers/icons/preview.iconset/icon_128x128.png
Binary file added installers/icons/preview.iconset/icon_16x16.png
Binary file added installers/icons/preview.iconset/icon_18x18.png
Binary file added installers/icons/preview.iconset/icon_22x22.png
Binary file added installers/icons/preview.iconset/icon_24x24.png
Binary file added installers/icons/preview.iconset/icon_256x256.png
Binary file added installers/icons/preview.iconset/icon_32x32.png
Binary file added installers/icons/preview.iconset/icon_40x40.png
Binary file added installers/icons/preview.iconset/icon_48x48.png
Binary file added installers/icons/preview.iconset/icon_64x64.png
Binary file added installers/icons/preview/1024x1024.png
Binary file added installers/icons/preview/128x128.png
Binary file added installers/icons/preview/16x16.png
Binary file added installers/icons/preview/18x18.png
Binary file added installers/icons/preview/19x19.png
Binary file added installers/icons/preview/22x22.png
Binary file added installers/icons/preview/24x24.png
Binary file added installers/icons/preview/256x256.png
Binary file added installers/icons/preview/32x32.png
Binary file added installers/icons/preview/40x40.png
Binary file added installers/icons/preview/48x48.png
Binary file added installers/icons/preview/512x512.png
Binary file added installers/icons/preview/64x64.png
Binary file removed installers/icons/selfnode/128x128.ico
Binary file not shown.
Binary file removed installers/icons/selfnode/16x16.ico
Binary file not shown.
Binary file removed installers/icons/selfnode/18x18.ico
Binary file not shown.
Binary file removed installers/icons/selfnode/19x19.ico
Binary file not shown.
Binary file removed installers/icons/selfnode/22x22.ico
Binary file not shown.
Binary file removed installers/icons/selfnode/24x24.ico
Binary file not shown.
Binary file removed installers/icons/selfnode/256x256.ico
Binary file not shown.
Binary file removed installers/icons/selfnode/32x32.ico
Binary file not shown.
Binary file removed installers/icons/selfnode/40x40.ico
Binary file not shown.
Binary file removed installers/icons/selfnode/48x48.ico
Binary file not shown.
Binary file removed installers/icons/selfnode/64x64.ico
Binary file not shown.
Binary file removed installers/icons/selfnode/selfnode.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/128x128.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/16x16.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/18x18.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/19x19.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/22x22.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/24x24.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/256x256.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/32x32.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/40x40.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/48x48.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/64x64.ico
Binary file not shown.
Binary file removed installers/icons/shelley_qa/shelley_qa.ico
Binary file not shown.
Binary file removed installers/icons/staging/128x128.ico
Binary file not shown.
Binary file removed installers/icons/staging/16x16.ico
Binary file not shown.
Binary file removed installers/icons/staging/18x18.ico
Binary file not shown.
Binary file removed installers/icons/staging/19x19.ico
Binary file not shown.
Binary file removed installers/icons/staging/22x22.ico
Binary file not shown.
Binary file removed installers/icons/staging/24x24.ico
Binary file not shown.
Binary file removed installers/icons/staging/256x256.ico
Binary file not shown.
Binary file removed installers/icons/staging/32x32.ico
Binary file not shown.
Binary file removed installers/icons/staging/40x40.ico
Binary file not shown.
Binary file removed installers/icons/staging/48x48.ico
Binary file not shown.
Binary file removed installers/icons/staging/64x64.ico
Binary file not shown.
Binary file removed installers/icons/staging/staging.ico
Binary file not shown.
Binary file removed installers/icons/testnet/128x128.ico
Binary file not shown.
Binary file removed installers/icons/testnet/16x16.ico
Binary file not shown.
Binary file removed installers/icons/testnet/18x18.ico
Binary file not shown.
Binary file removed installers/icons/testnet/19x19.ico
Binary file not shown.
Binary file removed installers/icons/testnet/22x22.ico
Binary file not shown.
Binary file removed installers/icons/testnet/24x24.ico
Binary file not shown.
Binary file removed installers/icons/testnet/256x256.ico
Binary file not shown.
Binary file removed installers/icons/testnet/32x32.ico
Binary file not shown.
Binary file removed installers/icons/testnet/40x40.ico
Binary file not shown.
Binary file removed installers/icons/testnet/48x48.ico
Binary file not shown.
Binary file removed installers/icons/testnet/64x64.ico
Binary file not shown.
Binary file removed installers/icons/testnet/testnet.ico
Binary file not shown.
9 changes: 0 additions & 9 deletions installers/icons/update_icons

This file was deleted.

Binary file added installers/icons/vasil_dev.iconset/icon_16x16.png
Binary file added installers/icons/vasil_dev.iconset/icon_18x18.png
Binary file added installers/icons/vasil_dev.iconset/icon_19x19.png
Binary file added installers/icons/vasil_dev.iconset/icon_22x22.png
Binary file added installers/icons/vasil_dev.iconset/icon_24x24.png
Binary file added installers/icons/vasil_dev.iconset/icon_32x32.png
Binary file added installers/icons/vasil_dev.iconset/icon_40x40.png
Binary file added installers/icons/vasil_dev.iconset/icon_48x48.png
Binary file added installers/icons/vasil_dev/1024x1024.png
Binary file added installers/icons/vasil_dev/128x128.png
Binary file added installers/icons/vasil_dev/16x16.png
Binary file added installers/icons/vasil_dev/18x18.png
Binary file added installers/icons/vasil_dev/19x19.png
Binary file added installers/icons/vasil_dev/22x22.png
Binary file added installers/icons/vasil_dev/24x24.png
Binary file added installers/icons/vasil_dev/256x256.png
Binary file added installers/icons/vasil_dev/32x32.png
Binary file added installers/icons/vasil_dev/40x40.png
Binary file added installers/icons/vasil_dev/48x48.png
Binary file added installers/icons/vasil_dev/512x512.png
Binary file added installers/icons/vasil_dev/64x64.png
55 changes: 54 additions & 1 deletion nix/launcher-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
, topologyOverride ? null
, configOverride ? null
, genesisOverride ? null
, cardanoWorldFlake
, system
}:

# Creates an attr set for a cluster containing:
Expand All @@ -29,7 +31,48 @@ let
cluster = "alonzo-purple";
networkName = "alonzo-purple";
};
shelley_qa = fromCardanoWorld "shelley_qa";
vasil_dev = fromCardanoWorld "vasil-dev";
preprod = fromCardanoWorld "preprod";
preview = fromCardanoWorld "preview";
};

fromCardanoWorld = envName: let
originalFiles = builtins.path {
name = "cardano-world-config-${envName}";
path = cardanoWorldFlake.${system}.cardano.packages.cardano-config-html-internal + "/config/" + envName;
};

originalNodeConfig = builtins.fromJSON (builtins.unsafeDiscardStringContext (
builtins.readFile (originalFiles + "/config.json")));

topology = builtins.fromJSON (builtins.unsafeDiscardStringContext (
builtins.readFile (originalFiles + "/topology.json")));

topologyFirstAccessPoint = builtins.head (builtins.head topology.PublicRoots).publicRoots.accessPoints;

isP2P = originalNodeConfig ? EnableP2P && originalNodeConfig.EnableP2P;

nodeConfig = originalNodeConfig // {
AlonzoGenesisFile = originalFiles + "/" + originalNodeConfig.AlonzoGenesisFile;
ByronGenesisFile = originalFiles + "/" + originalNodeConfig.ByronGenesisFile;
ShelleyGenesisFile = originalFiles + "/" + originalNodeConfig.ShelleyGenesisFile;
minSeverity = "Info"; # XXX: Needed for sync % updates.
EnableP2P = false; # XXX: Doesn’t work behind NAT? Let’s use the legacy topology.
};
in {
cluster = envName;
networkName = envName;
cardanoEnv = {
inherit nodeConfig;
} // (if isP2P then {
relaysNew = topologyFirstAccessPoint.address;
edgePort = topologyFirstAccessPoint.port;
} else {
topologyFile = originalFiles + "/topology.json";
});
};

dirSep = if os == "windows" then "\\" else "/";
configDir = configFilesSource: {
linux = configFilesSource;
Expand Down Expand Up @@ -91,6 +134,9 @@ let
testnet = "Testnet";
shelley_qa = "Shelley QA";
alonzo_purple = "Alonzo Purple";
vasil_dev = "Vasil-Dev";
preprod = "Pre-Prod";
preview = "Preview";
};
unsupported = "Unsupported";
networkSupported = __hasAttr network supportedNetworks;
Expand Down Expand Up @@ -215,7 +261,14 @@ let
edgePort = 30001;
edgeNodes = [ "127.0.0.1" ];
};
topologyFile = if (topologyOverride == null) then (if network == "local" then localTopology else normalTopologyFile) else topologyOverride;
topologyFile =
if envCfg ? topologyFile
then envCfg.topologyFile
else if (topologyOverride == null)
then (if network == "local"
then localTopology
else normalTopologyFile)
else topologyOverride;
nodeConfigFiles = runCommand "node-cfg-files" {
inherit nodeConfig topologyFile;
passAsFile = [ "nodeConfig" ];
Expand Down
28 changes: 20 additions & 8 deletions nix/sources.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"cardano-node": {
"branch": "tags/1.35.2",
"branch": "tags/1.35.3",
"description": null,
"homepage": null,
"owner": "input-output-hk",
"repo": "cardano-node",
"rev": "7612a245a6e2c51d0f1c3e0d65d7fe9363850043",
"sha256": "01a5qdrmsag18s2mlf8axfbrag59j2fp6xyc89pwmzgs7x77ldsr",
"rev": "950c4e222086fed5ca53564e642434ce9307b0b9",
"sha256": "020fwimsm24yblr1fmnwx240wj8r3x715p89cpjgnnd8axwf32p0",
"type": "tarball",
"url": "https://github.com/input-output-hk/cardano-node/archive/7612a245a6e2c51d0f1c3e0d65d7fe9363850043.tar.gz",
"url": "https://github.com/input-output-hk/cardano-node/archive/950c4e222086fed5ca53564e642434ce9307b0b9.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"cardano-shell": {
Expand All @@ -24,15 +24,27 @@
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"cardano-wallet": {
"branch": "master",
"branch": "v2022-08-16",
"description": "Official Wallet Backend & API for Cardano decentralized",
"homepage": null,
"owner": "input-output-hk",
"repo": "cardano-wallet",
"rev": "7ed8f067dd6d5dc78e7353bf65ea5e3423cdfca8",
"sha256": "1f9lwqi4qghaqi3754732h0cz98f7qbjhcx416jliqy6nibly6lp",
"rev": "afe575663a866c612b4a4dc3a90a8a700e387a86",
"sha256": "03shbj5kxvcb22k1bvfcv9q529lg47g9y9pvvwkyb2jy285rwyhv",
"type": "tarball",
"url": "https://github.com/input-output-hk/cardano-wallet/archive/afe575663a866c612b4a4dc3a90a8a700e387a86.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"cardano-world": {
"branch": "master",
"description": "Future Cardano mono-repo",
"homepage": null,
"owner": "input-output-hk",
"repo": "cardano-world",
"rev": "74e93f9fdc863638ce43998e0ccccbf56b4612aa",
"sha256": "16nvwmb7n22x0ql1n2cah36dylxgcybm1mi9n4pbb3xsr75b8b5b",
"type": "tarball",
"url": "https://github.com/input-output-hk/cardano-wallet/archive/7ed8f067dd6d5dc78e7353bf65ea5e3423cdfca8.tar.gz",
"url": "https://github.com/input-output-hk/cardano-world/archive/74e93f9fdc863638ce43998e0ccccbf56b4612aa.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"flake-compat": {
Expand Down
7 changes: 5 additions & 2 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ let
shellEnvs = {
linux = import ./shell.nix { system = "x86_64-linux"; autoStartBackend = true; };
darwin = import ./shell.nix { system = "x86_64-darwin"; autoStartBackend = true; };
darwin-arm = import ./shell.nix { system = "aarch64-darwin"; autoStartBackend = true; };
# TODO: re-enable when we have `aarch64-darwin` in Hydra
#darwin-arm = import ./shell.nix { system = "aarch64-darwin"; autoStartBackend = true; };
};
suffix = if buildNum == null then "" else "-${toString buildNum}";
version = (builtins.fromJSON (builtins.readFile ./package.json)).version;
Expand All @@ -20,7 +21,8 @@ let
x86_64-linux = import ./. { target = "x86_64-linux"; };
x86_64-windows = import ./. { target = "x86_64-windows"; };
x86_64-darwin = import ./. { target = "x86_64-darwin"; };
aarch64-darwin = import ./. { target = "aarch64-darwin"; };
# TODO: re-enable when we have `aarch64-darwin` in Hydra
#aarch64-darwin = import ./. { target = "aarch64-darwin"; };
};
in
table.${system};
Expand Down Expand Up @@ -52,6 +54,7 @@ let
sources = import ./nix/sources.nix;
in {
inherit shellEnvs;
gcRoot = builtins.mapAttrs (_: v: v.gcRoot) shellEnvs;
inherit ((daedalusPkgs {}).pkgs) mono;
wine = (daedalusPkgs {}).wine;
wine64 = (daedalusPkgs {}).wine64;
Expand Down
12 changes: 11 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ let
name = "daedalus-build";
buildInputs = daedalusShellBuildInputs;
};

gcRoot = pkgs.runCommandLocal "gc-root" {
properBuildShell = buildShell.overrideAttrs (old: { buildCommand = "export >$out"; });
cardanoWalletsHaskellNix = daedalusPkgs.walletFlake.defaultNix.outputs.legacyPackages.${system}.roots;
ourHaskellNix = if pkgs.stdenv.isLinux then daedalusPkgs.yaml2json.project.roots else "";
daedalusInstallerInputs = with daedalusPkgs.daedalus-installer; buildInputs ++ nativeBuildInputs;
# cardano-bridge inputs are GC’d, and rebuilt too often on Apple M1 CI:
cardanoBridgeInputs = builtins.map (attr: if daedalusPkgs ? ${attr} && pkgs.lib.isDerivation daedalusPkgs.${attr} then daedalusPkgs.${attr} else null) (builtins.attrNames (builtins.functionArgs (import ./nix/cardano-bridge.nix)));
} "export >$out";

debug.node = pkgs.writeShellScriptBin "debug-node" (with daedalusPkgs.launcherConfigs.launcherConfig; ''
cardano-node run --topology ${nodeConfig.network.topologyFile} --config ${nodeConfig.network.configFile} --database-path ${stateDir}/chain --port 3001 --socket-path ${stateDir}/cardano-node.socket
'');
Expand Down Expand Up @@ -201,4 +211,4 @@ let
"
'';
};
in daedalusShell // { inherit fixYarnLock buildShell devops; }
in daedalusShell // { inherit fixYarnLock buildShell devops gcRoot; }
Loading

0 comments on commit a64c5d1

Please sign in to comment.