Skip to content

Commit

Permalink
Merge pull request #398 from input-output-hk/fix/playground-client-hydra
Browse files Browse the repository at this point in the history
[WIP] Build `plutus-playground-client` on Hydra
  • Loading branch information
shmish111 committed Dec 7, 2018
2 parents f9e2eda + 2e2108c commit 6fb21fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion plutus-playground/plutus-playground-client/default.nix
@@ -1,4 +1,4 @@
{ stdenv, pkgs, psSrc }:
{ stdenv, pkgs, fetchurl, psSrc }:

with pkgs;

Expand All @@ -15,6 +15,15 @@ let
-e 's@#!/.*/coffee@#!'"$coffee"'@' || true
'';

# node-sass is terrible and we have to get it its binaries otherwise it will try to build them
nodeSassBinLinux = fetchurl {
url = "https://github.com/sass/node-sass/releases/download/v4.11.0/linux-x64-48_binding.node";
sha256 = "0by4hp7wxdzl8dq5svs2c11i93zsdkmn1v2009lqcrw3jyg6fxym";
};
nodeSassBinDarwin = fetchurl {
url = "https://github.com/sass/node-sass/releases/download/v4.11.0/darwin-x64-48_binding.node";
sha256 = "11jik9r379dxnx5v9h79sirqlk7ixdspnccfibzd4pgm6s2mw4vn";
};
in {
plutus-playground-client = stdenv.mkDerivation {
src = ./.;
Expand All @@ -31,6 +40,7 @@ in {

configurePhase = ''
export HOME="$NIX_BUILD_TOP"
export SASS_BINARY_PATH=${if stdenv.isDarwin then nodeSassBinDarwin else nodeSassBinLinux}
sed -i -E 's|^(\s*resolved\s*")https?://.*/|\1|' yarn.lock
yarn --offline config set yarn-offline-mirror ${yarnDeps.offline_cache}
Expand Down
4 changes: 2 additions & 2 deletions release.nix
Expand Up @@ -37,7 +37,7 @@ let
f = name: value: if value ? testdata then value.testrun else value;
in pkgs.lib.mapAttrs f (lib.filterAttrs pred plutusPkgs.haskellPackages);
in pkgs.lib.fix (jobsets: mapped // {
inherit (plutusPkgs) tests docs;
inherit (plutusPkgs) tests docs plutus-playground-client;
all-plutus-tests = builtins.listToAttrs (map (arch: { name = arch; value = makePlutusTestRuns arch; }) supportedSystems);
required = pkgs.lib.hydraJob (pkgs.releaseTools.aggregate {
name = "plutus-required-checks";
Expand All @@ -48,6 +48,6 @@ in pkgs.lib.fix (jobsets: mapped // {
in
[
(builtins.concatLists (map lib.attrValues (all jobsets.all-plutus-tests)))
] ++ (builtins.attrValues jobsets.tests) ++ (builtins.attrValues jobsets.docs);
] ++ (builtins.attrValues jobsets.tests) ++ (builtins.attrValues jobsets.docs) ++ [jobsets.plutus-playground-client];
});
})

0 comments on commit 6fb21fa

Please sign in to comment.