Skip to content

Commit

Permalink
Merge branch 'iohk-nix' of github.com:input-output-hk/daedalus into i…
Browse files Browse the repository at this point in the history
…ohk-nix

Pulls latest iohk-nix
  • Loading branch information
MarcusHurney committed Dec 6, 2018
2 parents eab4b17 + 305498f commit b1f22ff
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 8 deletions.
17 changes: 17 additions & 0 deletions bors.toml
@@ -0,0 +1,17 @@
status = [
# Buildkite: osx/linux installers
"buildkite/daedalus",

# Appveyor: windows installers
"continuous-integration/appveyor/branch",

# Hydra: we just care about tests attribute set
"ci/hydra:serokell:daedalus:tests.runFlow",
"ci/hydra:serokell:daedalus:tests.runLint",
"ci/hydra:serokell:daedalus:tests.runShellCheck"
]
timeout_sec = 7200
required_approvals = 1
cut_body_after = "## Type of change"
delete_merged_branches = true
block_labels = [ "DO NOT MERGE", "WIP" ]
2 changes: 2 additions & 0 deletions default.nix
Expand Up @@ -48,6 +48,8 @@ let
};
source = builtins.filterSource cleanSourceFilter ./.;

yaml2json = pkgs.haskell.lib.disableCabalFlag pkgs.haskellPackages.yaml "no-exe";

tests = {
runFlow = self.callPackage ./tests/flow.nix {};
runLint = self.callPackage ./tests/lint.nix {};
Expand Down
8 changes: 7 additions & 1 deletion release.nix
Expand Up @@ -12,6 +12,12 @@ let
};
suffix = if buildNum == null then "" else "-${toString buildNum}";
version = (builtins.fromJSON (builtins.readFile (./. + "/package.json"))).version;
yaml2json = let
daedalusPkgsWithSystem = system: import ./. { inherit system; };
in {
x86_64-linux = (daedalusPkgsWithSystem "x86_64-linux").yaml2json;
x86_64-darwin = (daedalusPkgsWithSystem "x86_64-darwin").yaml2json;
};

makeJobs = cluster: with daedalusPkgs { inherit cluster; }; {
inherit daedalus;
Expand All @@ -30,6 +36,6 @@ let
lib = (import ./. {}).pkgs.lib;
clusters = lib.splitString " " (builtins.replaceStrings ["\n"] [""] (builtins.readFile ./installer-clusters.cfg));
in {
inherit shellEnvs;
inherit shellEnvs yaml2json;
tests = (daedalusPkgs {}).tests;
} // builtins.listToAttrs (map (x: { name = x; value = makeJobs x; }) clusters)
13 changes: 7 additions & 6 deletions scripts/build-installer-unix.sh
Expand Up @@ -129,12 +129,13 @@ pushd installers
APP_NAME="csl-daedalus"
rm -rf "${APP_NAME}"

INSTALLER_CMD="$INSTALLER/bin/make-installer ${test_installer}"
INSTALLER_CMD+=" --cardano ${DAEDALUS_BRIDGE}"
INSTALLER_CMD+=" --build-job ${build_id}"
INSTALLER_CMD+=" --cluster ${cluster}"
INSTALLER_CMD+=" --out-dir ${APP_NAME}"
nix-shell -p bash --run "${INSTALLER_CMD}"
INSTALLER_CMD=("$INSTALLER/bin/make-installer"
"${test_installer}"
" --cardano ${DAEDALUS_BRIDGE}"
" --build-job ${build_id}"
" --cluster ${cluster}"
" --out-dir ${APP_NAME}")
${INSTALLER_CMD[@]}

if [ -d ${APP_NAME} ]; then
if [ -n "${BUILDKITE_JOB_ID:-}" ]
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Expand Up @@ -13,8 +13,8 @@ in
}:

let
yaml2json = pkgs.haskell.lib.disableCabalFlag pkgs.haskellPackages.yaml "no-exe";
daedalusPkgs = import ./. { inherit cluster; };
inherit (daedalusPkgs) yaml2json;
yarn = pkgs.yarn.override { inherit nodejs; };
nodejs = pkgs.nodejs-8_x;
launcher-json = pkgs.runCommand "read-launcher-config.json" { buildInputs = [ yaml2json ]; } "yaml2json ${daedalusPkgs.daedalus.cfg}/etc/launcher-config.yaml > $out";
Expand Down

0 comments on commit b1f22ff

Please sign in to comment.