Skip to content

Commit

Permalink
Updates v2-integration branch (#1498)
Browse files Browse the repository at this point in the history
* [DDW-761] Fix 'To addresses' in the same line (#1476)

* [DDW-761] Fix 'To addresses' in the same line

* [DDW-761] Add 2 'TO' addresses in the Storybook Transactions story

* [DDW-761] Fix address/transaction hover effect

* [DDW-762] Fix broken 'Read the Article' button (#1479)

* [DDW-762] Fix broken 'Read the Article' button

* [DDW-762] CHANGELOG

* [DDW-764] Fix timestamp date format handling (#1482)

* [DDW-757] Implement new themes (#1480)

* [DDW-757] Introduce yellow / white / dark-cardano themes base setup

* [DDW-757] Add new themes to Settings page

* [DDW-757] Run translations manager

* [DDW-757] Add missing config for new themes create/update and theme images

* [DDW-757] Generate css variables for new themes and yellow theme overrides

* [DDW-757] Adjusts buttons colors in all states, and input/select border colors

* [DDW-757] Auto-updates defaultMessages.json

* [DDW-757] Fixes delegation icon in SideBar to use fill/stroke color in CSS vars

* [DDW-757] Fixes delegation-progress icon in SideBar to use fill/stroke color in CSS vars

* [DDW-757] Fixes create paper wallet icon in SideBar to use fill/stroke color in CSS vars

* [DDW-757] Yellow theme fine tuning and storybook menu new themes selection

* [DDW-757] Fix dark cardano theme config and vars creation

* [DDW-757] Introduce Dark-Cardano theme partial varibles override

* [DDW-757] Yellow theme styles improvements

* [DDW-757] Generating new additional variables for all themes

* [DDW-757] Introduce basic layout variables overrides for White theme

* [DDW-757] Small color improvements for BigDialogButtons, StakePool cards and tooltips, delegation dropdowns on Yellow theme

* [DDW-757] Dark-Blue theme border color on stake pool boxes fix

* [DDW-757] Support icon for yellow theme

* [DDW-757] Fix Support icon disappearing

* [DDW-757] Main background color change

* [DDW-757] Yellow theme - about window fixes

* [DDW-757] Stories to get the current theme and dark icon for white theme

* [DDW-757] Yellow theme - about window overlay color

* [DDW-757] Add MINT variations to White theme and settings page translation improvement

* [DDW-757] Adding new theme images for setting page

* [DDW-757] White overrides - WIP

* [DDW-757] Theme buttons better arrangement

* [DDW-757] Finalizing Yellow theme by resolving requested changes

* [DDW-757] Run prettier

* [DDW-757] UTXO graph colors improvement and options list bg color

* [DDW-757] Fix copy notification text color

* [DDW-757] Fix dropdown bg colors

* [DDW-757] Fix support request hover

* [DDW-757] Update dark cardano theme

* [DDW-757] White theme - WIP

* [DDW-757] White theme - Block consolidation done

* [DDW-757] White theme - Paper Wallet

* [DDW-757] White theme - Transactions

* [DDW-757] Matches Block Consolidation screen to mockups in fine detail

* [DDW-757] Imports taller, thinner cross svg for use in About/Block Consolidation screens

* [DDW-757] Replaces hard coded fill value with CSS variable

* [DDW-757] Uses thinner cross in About.js

* [DDW-757] Handles active/pressed button state on Block Consolidation screen

* [DDW-757] Color value adjustments in all theme files

* [DDW-757] Auto update in defaultMessages.json

* [DDW-757] Fixes checkbox and link colors in white theme

* [DDW-757] Fixes flat button on white and dark cardano themes, fixes utxo chart on white theme

* [DDW-757] Updates white theme with fixes

* [DDW-757] Imports correct svg cross icon

* [DDW-757] Fixes remaining issues in white theme and also learn more buttons in dark-cardano

* [DDW-757] Darkens mnemonics background color in white theme

* [DDW-757] White theme CSS fixes

* [DDW-757] Add missing stories

* [DDW-757] Fixes AdaRedemptionSuccessOverlay styles in white, yellow, and dark-cardano themes

* [DDW-757] Fixes AdaRedemptionDisclaimer styles in white, yellow, and dark-cardano themes

* [DDW-757] Fixes button colors on trouble syncing/connecting screens in dark-cardano.js

* [DDW-757] Fixes Data Layer Migration screen in white, yellow, and dark-cardano themes

* [DDW-757] Fixes Data Layer Migration screen in white, yellow, and dark-cardano themes

* [DDW-757] Fixes Node Update Notification in yellow theme

* [DDW-757] Update storybook stories

* [DDW-757] Fixing themes

* [DDW-757] Storybook topbar expand icon, loading wallet progress bar color and UTXO charts on white theme

* [DDW-757] White theme improvements

* [DDW-757] Fixing themes

* [DDW-757] White theme final imporvements

* [DDW-757] Fixing themes

* [DDW-757] Remove testing faked data

* [DDW-757] Run prettier

* [DDW-757] Fixing themes

* [DDW-757] Fixing themes

* [DDW-757] Dark Cardano theme UTXO charts improvements

* [DDW-757] Failed transactions colors imporovement

* [DDW-757] Cardano Dark and White theme improvements

* [DDW-757] Eslint warning and prettier fix

* [DDW-757] Fix storybook restoration progress

* [DDW-757] Different BGs on Overlays

* [DDW-757] Syncing screen - tooltip not visible

* [DDW-757] Wrong border Staking on Staking screens

* [DDW-757] Wrong strip colors on progress bar

* [DDW-757] Dropdown triangle arrow on dark theme

* [DDW-757] Wrong pop-over colors on Delegation Center

* [DDW-757] The final piece of the puzzle

* [DDW-757] Adds CHANGELOG entry

* [DDW-776] Fix wrong styling of the Stake Pool in the Dark Blue theme (#1484)

* DDW-776 Fix wrong styling of the Stake Pool in the Dark Blue theme

* DDW-776 CHANGELOG

* DDW-776 missing border for big pool

* [DDW-776] Stake pool thumb colors improvements

* [DDW-776] Apply new stake pool thumb colors to selection box

* [DDW-777] Implement link to feature requests (#1487)

* [DDW-785] Reverse buttons order (#1489)

* DDW-780 Truncated third Loading Dot. (#1490)

* [DDW-781] Blank Screen Fix - Default Selection. (#1488)

* [DDW-781] Blank Screen Fix - Default Selection.

* [DDW-711] Replaces button No by Cancel

* [DDW-781] Fixes buttons focus

* DDW-781 CHANGELOG

* [DDW-789] Fix focused button of the 'Blank Screen fix' prompt on Windows (#1493)

* [DDW-775] Cardano SL 3.0.3 integration (#1477)

* support haskell.nix builds of cardano

* fix icon on `daedalus.exe`

* implement HSM client

* [DEVOPS-970] re-enable signed uninstallers
fix staging cross build

* [DDW-775] set cardano revision to 3.0.3

* set target to x86_64-windows in build-cross-windows.sh

* add buildNum to release-build and fix suffixes for windows
  • Loading branch information
thedanheller committed Jul 30, 2019
1 parent 3466293 commit 9bdb6aa
Show file tree
Hide file tree
Showing 99 changed files with 3,323 additions and 413 deletions.
11 changes: 6 additions & 5 deletions CHANGELOG.md
Expand Up @@ -7,7 +7,7 @@ Changelog

- Implemented guided manual updates ([PR 1410](https://github.com/input-output-hk/daedalus/pull/1410), [PR 1423](https://github.com/input-output-hk/daedalus/pull/1423))
- Application menu improvements:
- Implemented "Help" application menu item with "Known Issues", "Blank Screen Fix", "Support Request", "Download Logs", "Block Consolidation Status" and "Daedalus Diagnostics" options ([PR 1382](https://github.com/input-output-hk/daedalus/pull/1382), [PR 1459](https://github.com/input-output-hk/daedalus/pull/1459))
- Implemented "Help" application menu item with "Known Issues", "Blank Screen Fix", "Feature Request", "Support Request", "Download Logs", "Block Consolidation Status" and "Daedalus Diagnostics" options ([PR 1382](https://github.com/input-output-hk/daedalus/pull/1382), [PR 1459](https://github.com/input-output-hk/daedalus/pull/1459), [PR 1487](https://github.com/input-output-hk/daedalus/issues/1487), [PR 1488](https://github.com/input-output-hk/daedalus/pull/1488), [PR 1493](https://github.com/input-output-hk/daedalus/pull/1493))
- Improved the "Ada redemption" menu item UX by disabling the option while Daedalus is not fully synced ([PR 1458](https://github.com/input-output-hk/daedalus/pull/1458))
- Application dialogs improvements:
- Implemented new "About Us" dialog design ([PR 1369](https://github.com/input-output-hk/daedalus/pull/1369), [PR 1450](https://github.com/input-output-hk/daedalus/pull/1450))
Expand All @@ -22,22 +22,23 @@ Changelog
- "Loading" screen improvements:
- Implemented animated Daedalus logo ([PR 1457](https://github.com/input-output-hk/daedalus/pull/1457))
- Implemented status icons ([PR 1325](https://github.com/input-output-hk/daedalus/pull/1325), [PR 1365](https://github.com/input-output-hk/daedalus/pull/1365), [PR 1452](https://github.com/input-output-hk/daedalus/pull/1452))
- Improved "Having trouble connecting/syncing?" notification ([PR 1453](https://github.com/input-output-hk/daedalus/pull/1453))
- Improved "Having trouble connecting/syncing?" notification ([PR 1453](https://github.com/input-output-hk/daedalus/pull/1453), [PR 1479](https://github.com/input-output-hk/daedalus/pull/1479), [PR 1489](https://github.com/input-output-hk/daedalus/pull/1489))
- Improved handling of "Invalid TLS certificate" error ([PR 1344](https://github.com/input-output-hk/daedalus/pull/1344)), ([PR 1471](https://github.com/input-output-hk/daedalus/pull/1471))
- Improved clock synchronisation checks (NTP) ([PR 1462](https://github.com/input-output-hk/daedalus/pull/1462))
- Improved code structure by adding containers for each overlay ([PR 1446](https://github.com/input-output-hk/daedalus/pull/1446))
- Implemented "Wallet UTXO distribution" screen ([PR 1353](https://github.com/input-output-hk/daedalus/pull/1353), [PR 1437](https://github.com/input-output-hk/daedalus/pull/1437))
- Implemented "External link" icon on all links which open external content ([PR 1447](https://github.com/input-output-hk/daedalus/pull/1447), [PR 1455](https://github.com/input-output-hk/daedalus/pull/1455))
- Implemented "External link" icon on all links which open external content ([PR 1447](https://github.com/input-output-hk/daedalus/pull/1447), [PR 1455](https://github.com/input-output-hk/daedalus/pull/1455), [PR 1476](https://github.com/input-output-hk/daedalus/pull/1476))
- Implemented "Preparing logs for download" notification ([PR 1341](https://github.com/input-output-hk/daedalus/pull/1341))
- Implemented autmated scrolling of error messages into view ([PR 1383](https://github.com/input-output-hk/daedalus/pull/1383))
- Implemented timestamp on "Paper wallet certificate" PDF ([PR 1385](https://github.com/input-output-hk/daedalus/pull/1385), [PR 1400](https://github.com/input-output-hk/daedalus/pull/1400))
- Implemented timestamp on "Paper wallet certificate" PDF ([PR 1385](https://github.com/input-output-hk/daedalus/pull/1385), [PR 1400](https://github.com/input-output-hk/daedalus/pull/1400), [PR 1482](https://github.com/input-output-hk/daedalus/pull/1482))
- Implemented three new themes: "Yellow", "White" and "Dark Cardano" ([PR 1480](https://github.com/input-output-hk/daedalus/pull/1480))
- "Delegation" screens UI:
- Implemented "Legacy wallet" notification UI ([PR 1409](https://github.com/input-output-hk/daedalus/pull/1409))
- Implemented "Decentralisation countdown" screen UI ([PR 1390](https://github.com/input-output-hk/daedalus/pull/1390))
- Implemented "Staking" screens navigation ([PR 1395](https://github.com/input-output-hk/daedalus/pull/1395), [PR 1400](https://github.com/input-output-hk/daedalus/pull/1400), [PR 1461](https://github.com/input-output-hk/daedalus/pull/1461))
- Implemented "Delegation center" screen UI ([PR 1440](https://github.com/input-output-hk/daedalus/pull/1440), [PR 1463](https://github.com/input-output-hk/daedalus/pull/1463))
- Implemented "Delegation setup" wizard UI ([PR 1416](https://github.com/input-output-hk/daedalus/pull/1416)), [PR 1430](https://github.com/input-output-hk/daedalus/pull/1430), [PR 1439](https://github.com/input-output-hk/daedalus/pull/1439), [PR 1442](https://github.com/input-output-hk/daedalus/pull/1442))
- Implemented "Stake pools" screen UI ([PR 1397](https://github.com/input-output-hk/daedalus/pull/1397), [PR 1412](https://github.com/input-output-hk/daedalus/pull/1412), [PR 1420](https://github.com/input-output-hk/daedalus/pull/1420), [PR 1429](https://github.com/input-output-hk/daedalus/pull/1429), [PR 1431](https://github.com/input-output-hk/daedalus/pull/1431))
- Implemented "Stake pools" screen UI ([PR 1397](https://github.com/input-output-hk/daedalus/pull/1397), [PR 1412](https://github.com/input-output-hk/daedalus/pull/1412), [PR 1420](https://github.com/input-output-hk/daedalus/pull/1420), [PR 1429](https://github.com/input-output-hk/daedalus/pull/1429), [PR 1431](https://github.com/input-output-hk/daedalus/pull/1431), [PR 1484](https://github.com/input-output-hk/daedalus/pull/1484))
- Implemented "Rewards" screen UI ([PR 1403](https://github.com/input-output-hk/daedalus/pull/1403))
- Implemented "Epochs" screen UI ([PR 1418](https://github.com/input-output-hk/daedalus/pull/1418))
- Implemented "Info" screen UI ([PR 1394](https://github.com/input-output-hk/daedalus/pull/1394))
Expand Down
45 changes: 1 addition & 44 deletions appveyor.yml
@@ -1,49 +1,6 @@
version: "{build}"

environment:
nodejs_version: "8"
AWS_ACCESS_KEY_ID:
secure: O0+bBTm/Ud3pxP8nvC3ZuDSkmmlr+b8hVluqpRdJGBg=
AWS_SECRET_ACCESS_KEY:
secure: DbpP02aDGoC3Tdsi3+ONm8ov0nuXzEF/Yi453SBKj38qjROzvPXo6qW44bYiKBf4
CERT_PASS:
secure: Y3pbyZBSORhsefMiSFBBm2nuhHQ2Hmmfppm3E+Fr7U+EXYrXwdCNl8wLwfCCMK2k
GITHUB_OAUTH_TOKEN:
secure: prH84TwXLO2CGaiwmipj05AAndcR7bDDxTv9hL8adIpr2bNjrV7pN15JKVmsxISc
# Avoid long paths on Windows
STACK_ROOT: "c:\\sr"

build: off

cache:
- C:\sr -> installers/stack.yaml

install:
- ps: Install-Product node $env:nodejs_version x64
- IF NOT DEFINED APPVEYOR_PULL_REQUEST_NUMBER aws s3 cp --region eu-central-1 s3://iohk-private-2/iohk-windows-certificate-5.p12 C:/iohk-windows-certificate.p12

test_script:
- scripts\build-installer-win64.bat %APPVEYOR_BUILD_VERSION%

artifacts:
- path: release\win32-x64\Daedalus-win32-x64
name: Daedalus Electron application
type: zip
- path: installers\daedalus-*.exe
name: Daedalus Win64 Installer
- path: installers\launcher-config-*.yaml
name: Cardano launcher configuration
- path: installers\wallet-topology-*.yaml
name: Wallet topology

deploy:
provider: S3
access_key_id:
secure: IEky6PsMzHaKHNBMxR8tQaQI8X7qWRB9+HuEroTVRBk=
secret_access_key:
secure: cqjzG96hWB1x3JDbVSbF9E+aJ5jKvIGacJRUDWATHaTOYfSt6Rvive/NrF4lKBIm
bucket: appveyor-ci-deploy
region: ap-northeast-1
folder:
artifact: Daedalus Win64 Installer
set_public: true
- ps: echo "No Longer Used, windows binaries cross compiled in hydra"
5 changes: 3 additions & 2 deletions cardano-sl-src.json
@@ -1,6 +1,7 @@
{
"url": "https://github.com/input-output-hk/cardano-sl",
"rev": "403e26a1d33623f4537517535b7de37773ae9259",
"sha256": "1si78f8019j3zh2y1pdx848yni2ykqkq17s18smh89mcnk09z5cq",
"rev": "9ff0015ce9e4f366c77e93976e4639077959b836",
"date": "2019-07-29T21:46:37-04:00",
"sha256": "0hwabpn1p3p8v7mxrvhkyiw9r8laxnrjpl7sjha3lpvg3b7jgwzs",
"fetchSubmodules": false
}
76 changes: 55 additions & 21 deletions default.nix
@@ -1,14 +1,17 @@
let
localLib = import ./lib.nix;
system = builtins.currentSystem; # todo
in
{ system ? builtins.currentSystem
{ target ? builtins.currentSystem
#system ? builtins.currentSystem
, config ? {}
, pkgs ? localLib.iohkNix.getPkgs { inherit system config; }
, cluster ? "mainnet"
, version ? "versionNotSet"
, buildNum ? null
, dummyInstaller ? false
, signingKeys ? null
, HSMServer ? null
, fudgeConfig ? null
}:

Expand All @@ -22,14 +25,16 @@ let
}) {};
installPath = ".daedalus";
lib = pkgs.lib;
cardanoSL = localLib.cardanoSL { inherit system config; };
cardanoSL = localLib.cardanoSL { inherit target config; };
cardanoJSON = builtins.fromJSON (builtins.readFile ./cardano-sl-src.json);
cardanoSrc = pkgs.fetchFromGitHub {
owner = "input-output-hk";
repo = "cardano-sl";
rev = cardanoJSON.rev;
sha256 = cardanoJSON.sha256;
};
needSignedBinaries = (signingKeys != null) || (HSMServer != null);
buildNumSuffix = if buildNum == null then "" else ("-${builtins.toString buildNum}");
cleanSourceFilter = with pkgs.stdenv;
name: type: let baseName = baseNameOf (toString name); in ! (
# Filter out .git repo
Expand Down Expand Up @@ -67,16 +72,10 @@ let
# the native makensis binary, with cross-compiled windows stubs
nsis = nsisNixPkgs.callPackage ./nsis.nix {};

# TODO, put the cross bridge into cardano's default.nix
crossCompiledCardano = (import (cardanoSrc + "/release.nix") { cardano = { outPath = cardanoSrc; rev = cardanoJSON.rev; }; }).daedalus-mingw32-pkg;
unsignedUnpackedCardano = pkgs.runCommand "daedalus-bridge" { buildInputs = [ pkgs.unzip ]; } ''
mkdir $out
cd $out
unzip ${self.crossCompiledCardano}/CardanoSL.zip
'';
unpackedCardano = if dummyInstaller then self.dummyUnpacked else (if signingKeys != null then self.signedCardano else self.unsignedUnpackedCardano);
unsignedUnpackedCardano = cardanoSL.daedalus-bridge;
unpackedCardano = if dummyInstaller then self.dummyUnpacked else (if needSignedBinaries then self.signedCardano else self.unsignedUnpackedCardano);
signFile = file: let
signingScript = pkgs.writeScript "signing-script" ''
localSigningScript = pkgs.writeScript "signing-script" ''
#!${pkgs.stdenv.shell}
exec 3>&1
Expand All @@ -99,18 +98,40 @@ let
rm -rf $DIR
echo $storePath >&3
'';
remoteSigningScript = pkgs.writeScript "signing-script" ''
#!${pkgs.stdenv.shell}
exec 3>&1
exec 1>&2
echo signing "${file}"
set -e
DIR=$(realpath $(mktemp -d))
cd $DIR
FILE=$(basename ${file})
cat ${file} | ssh ${HSMServer} > $FILE
storePath=$(nix-store --add-fixed sha256 $FILE)
cd /
rm -rf $DIR
echo $storePath >&3
'';
signingScript = if (HSMServer != null) then remoteSigningScript else localSigningScript;
# requires --allow-unsafe-native-code-during-evaluation
res = builtins.exec [ signingScript ];
in res;
signedCardano = pkgs.runCommand "signed-daedalus-bridge" {} ''
cp -r ${self.unsignedUnpackedCardano} $out
chmod -R +w $out
cd $out
rm *.exe
cp ${self.signFile "${self.unsignedUnpackedCardano}/cardano-launcher.exe"} cardano-launcher.exe
cp ${self.signFile "${self.unsignedUnpackedCardano}/cardano-node.exe"} cardano-node.exe
cp ${self.signFile "${self.unsignedUnpackedCardano}/cardano-x509-certificates.exe"} cardano-x509-certificates.exe
cp ${self.signFile "${self.unsignedUnpackedCardano}/wallet-extractor.exe"} wallet-extractor.exe
rm bin/*.exe
cp ${self.signFile "${self.unsignedUnpackedCardano}/bin/cardano-launcher.exe"} bin/cardano-launcher.exe
cp ${self.signFile "${self.unsignedUnpackedCardano}/bin/cardano-node.exe"} bin/cardano-node.exe
cp ${self.signFile "${self.unsignedUnpackedCardano}/bin/cardano-x509-certificates.exe"} bin/cardano-x509-certificates.exe
cp ${self.signFile "${self.unsignedUnpackedCardano}/bin/wallet-extractor.exe"} bin/wallet-extractor.exe
'';
dummyUnpacked = pkgs.runCommand "dummy-unpacked-cardano" {} ''
mkdir $out
Expand Down Expand Up @@ -149,16 +170,20 @@ let
mkdir $out
cp ${self.signFile "${self.unsignedUninstaller}/uninstall.exe"} $out/uninstall.exe
'';
uninstaller = if (signingKeys != null) then self.signedUninstaller else self.unsignedUninstaller;
uninstaller = if needSignedBinaries then self.signedUninstaller else self.unsignedUninstaller;

windows-installer = let
unsigned-windows-installer = let
mapping = {
mainnet = "Daedalus";
staging = "Daedalus Staging";
testnet = "Daedalus Testnet";
};
installDir = mapping.${cluster};
in pkgs.runCommand "win64-installer-${cluster}" { buildInputs = [ self.daedalus-installer self.nsis pkgs.unzip self.configMutator pkgs.jq self.yaml2json ]; } ''
in pkgs.runCommand "win64-installer-${cluster}" {
buildInputs = [
self.daedalus-installer self.nsis pkgs.unzip pkgs.jq self.yaml2json
] ++ lib.optional (fudgeConfig != null) self.configMutator;
} ''
mkdir home
export HOME=$(realpath home)
Expand All @@ -180,8 +205,8 @@ let
pushd dlls
${if dummyInstaller then "touch foo" else "unzip ${self.dlls}"}
popd
cp -v ${self.unpackedCardano}/* .
cp ${self.unsignedUninstaller}/uninstall.exe ../uninstall.exe
cp -v ${self.unpackedCardano}/{bin,config}/* .
cp ${self.uninstaller}/uninstall.exe ../uninstall.exe
cp -v ${self.nsisFiles}/{daedalus.nsi,wallet-topology.yaml,launcher-config.yaml} .
chmod -R +w .
${lib.optionalString (fudgeConfig != null) ''
Expand All @@ -198,6 +223,15 @@ let
cp *.yaml $out/cfg-files/
echo file installer $out/*.exe > $out/nix-support/hydra-build-products
'';
signed-windows-installer = let
backend_version = lib.removeSuffix "\n" (builtins.readFile "${self.unpackedCardano}/version"); # TODO, get from a nix expr
frontend_version = (builtins.fromJSON (builtins.readFile ./package.json)).version;
fullName = "daedalus-${frontend_version}-cardano-sl-${backend_version}-${cluster}-windows${buildNumSuffix}.exe"; # must match to packageFileName in make-installer
in pkgs.runCommand "signed-windows-installer-${cluster}" {} ''
mkdir $out
cp -v ${self.signFile "${self.unsigned-windows-installer}/${fullName}"} $out/${fullName}
'';
windows-installer = if needSignedBinaries then self.signed-windows-installer else self.unsigned-windows-installer;

## TODO: move to installers/nix
hsDaedalusPkgs = import ./installers {
Expand Down
3 changes: 3 additions & 0 deletions gulpfile.js
Expand Up @@ -136,6 +136,9 @@ gulp.task('prepare:themes:daedalus', () =>
'source/renderer/app/themes/daedalus/cardano.js',
'source/renderer/app/themes/daedalus/dark-blue.js',
'source/renderer/app/themes/daedalus/light-blue.js',
'source/renderer/app/themes/daedalus/dark-cardano.js',
'source/renderer/app/themes/daedalus/yellow.js',
'source/renderer/app/themes/daedalus/white.js',
])
.pipe(flowRemoveTypes())
.pipe(gulp.dest('dist/daedalus'))
Expand Down
1 change: 1 addition & 0 deletions installers/daedalus-installer.nix
Expand Up @@ -11,6 +11,7 @@ mkDerivation {
src = ./.;
isLibrary = true;
isExecutable = true;
doCheck = false;
libraryHaskellDepends = [
aeson base bytestring containers dhall dhall-json directory github
Glob lens-aeson megaparsec microlens network-uri nsis optional-args
Expand Down
6 changes: 3 additions & 3 deletions lib.nix
Expand Up @@ -15,17 +15,17 @@ let

# NIX_PATH=cardano-sl=/path/to/cardano-sl
# WARNING: currently broken with infinite recursion
cardanoSL = { config ? {}, system ? builtins.currentSystem }:
cardanoSL = { config ? {}, target }:
let try = builtins.tryEval <cardano-sl>;
in if try.success
then builtins.trace "using host <cardano-sl>" (import try.value { inherit system config; })
then builtins.trace "using host <cardano-sl>" (import try.value { inherit target; })
else
let
spec = builtins.fromJSON (builtins.readFile ./cardano-sl-src.json);
in import (builtins.fetchTarball {
url = "${spec.url}/archive/${spec.rev}.tar.gz";
inherit (spec) sha256;
}) { inherit system config; gitrev = spec.rev; };
}) { inherit target; gitrev = spec.rev; };

# nixpkgs can be overridden for debugging purposes by setting
# NIX_PATH=custom_nixpkgs=/path/to/nixpkgs
Expand Down
17 changes: 17 additions & 0 deletions release-build.nix
@@ -0,0 +1,17 @@
{
buildNum ? null
}:

let
mkWindows = cluster: (import ./. { inherit cluster buildNum; target = "x86_64-windows"; HSMServer = "HSM"; }).windows-installer;
mkLinux = cluster: (import ./release.nix { inherit buildNum;}).${cluster}.installer.x86_64-linux;
pkgs = (import ./. {}).pkgs;
in pkgs.runCommand "signed-release" {} ''
mkdir $out
cp -v ${mkWindows "mainnet"}/*exe $out/
cp -v ${mkWindows "staging"}/*exe $out/
cp -v ${mkWindows "testnet"}/*exe $out/
cp -v ${mkLinux "mainnet"}/*bin $out/
cp -v ${mkLinux "staging"}/*bin $out/
cp -v ${mkLinux "testnet"}/*bin $out/
''
7 changes: 4 additions & 3 deletions release.nix
Expand Up @@ -3,7 +3,8 @@
}:
let
daedalusPkgs = { cluster ? null }: import ./. {
inherit system buildNum cluster;
inherit buildNum cluster;
target = system;
version = "${version}${suffix}";
};
shellEnvs = {
Expand All @@ -12,7 +13,7 @@ let
};
suffix = if buildNum == null then "" else "-${toString buildNum}";
version = (builtins.fromJSON (builtins.readFile ./package.json)).version;
daedalusPkgsWithSystem = system: import ./. { inherit system; };
daedalusPkgsWithSystem = system: import ./. { target = system; };
yaml2json = {
x86_64-linux = (daedalusPkgsWithSystem "x86_64-linux").yaml2json;
x86_64-darwin = (daedalusPkgsWithSystem "x86_64-darwin").yaml2json;
Expand All @@ -25,7 +26,7 @@ let
makeJobs = cluster: with daedalusPkgs { inherit cluster; }; {
daedalus.x86_64-linux = daedalus;
installer.x86_64-linux = wrappedBundle newBundle pkgs cluster daedalus-bridge.version;
installer.x86_64-windows = (import ./. { inherit cluster; }).windows-installer;
installer.x86_64-windows = (import ./. { inherit cluster; target = "x86_64-windows"; }).windows-installer;
};
wrappedBundle = newBundle: pkgs: cluster: cardanoVersion: let
backend = "cardano-sl-${cardanoVersion}";
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-cross-windows.sh
Expand Up @@ -16,7 +16,7 @@ CLUSTERS="$(xargs echo -n < "$(dirname "$0")/../installer-clusters.cfg")"

for cluster in ${CLUSTERS}; do
echo '~~~ Building '"${cluster}"' installer'
nix-build default.nix -A windows-installer --arg signingKeys '{ spc = ./dummy-certs/authenticode.spc; pvk = ./dummy-certs/authenticode.pvk; }' --show-trace --allow-unsafe-native-code-during-evaluation --argstr cluster "$cluster" --argstr buildNum "$BUILDKITE_BUILD_NUMBER"
nix-build default.nix -A windows-installer --arg signingKeys '{ spc = ./dummy-certs/authenticode.spc; pvk = ./dummy-certs/authenticode.pvk; }' --show-trace --allow-unsafe-native-code-during-evaluation --argstr cluster "$cluster" --argstr buildNum "$BUILDKITE_BUILD_NUMBER" --argstr target "x86_64-windows"
if [ -n "${BUILDKITE_JOB_ID:-}" ]; then
upload_artifacts_public result/daedalus-*-windows*.exe
fi
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Expand Up @@ -13,7 +13,7 @@ in
}:

let
daedalusPkgs = import ./. { inherit cluster system; };
daedalusPkgs = import ./. { inherit cluster; target = system; };
hostPkgs = import pkgs.path { config = {}; overlays = []; };
yaml2json = pkgs.haskell.lib.disableCabalFlag pkgs.haskellPackages.yaml "no-exe";
yarn = pkgs.yarn.override { inherit nodejs; };
Expand Down

0 comments on commit 9bdb6aa

Please sign in to comment.