Skip to content

Commit

Permalink
Applied PR review recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
hrajchert committed Aug 19, 2022
1 parent 38f2458 commit 82de7b5
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 65 deletions.
36 changes: 0 additions & 36 deletions bitte/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,6 @@
let
staticSite = pkgs.callPackage (sources.plutus-apps + "/bitte/static-site.nix") { };
playgroundStatic = pkgs.callPackage (sources.plutus-apps + "/bitte/playground-static.nix") { inherit staticSite; docs = docs.site; };
wait-for-socket = pkgs.writeShellScriptBin "wait-for-socket" ''
set -eEuo pipefail
export PATH="${pkgs.lib.makeBinPath [ pkgs.coreutils pkgs.socat ]}"
sock_path="$1"
delay_iterations="''${2:-8}"
for ((i=0;i<delay_iterations;i++))
do
if socat -u OPEN:/dev/null "UNIX-CONNECT:''${sock_path}"
then
exit 0
fi
let delay=2**i
echo "Connecting to ''${sock_path} failed, sleeping for ''${delay} seconds" >&2
sleep "''${delay}"
done
socat -u OPEN:/dev/null "UNIX-CONNECT:''${sock_path}"
'';

sleep-until-restart-slot = pkgs.writeShellScriptBin "sleep-until-restart-slot" ''
set -eEuo pipefail
export PATH="${pkgs.coreutils}/bin"
nowHour=$(date -u +%-H)
hoursLeft=$((3 - (nowHour % 3)))
wakeHour=$(((nowHour + hoursLeft) % 24))
exec sleep $((($(date -u -f - +%s- <<< "$wakeHour"$':00 tomorrow\nnow')0)%86400))
'';

in
{
web-ghc-server-entrypoint = pkgs.callPackage (sources.plutus-apps + "/bitte/web-ghc-server.nix") {
Expand All @@ -49,7 +16,4 @@ in
client = marlowe-playground.client;
variant = "marlowe";
};
node-socat = pkgs.callPackage ./node-socat.nix {
inherit wait-for-socket;
};
}
11 changes: 0 additions & 11 deletions bitte/node-socat.nix

This file was deleted.

3 changes: 0 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ rec {

docs = import ./nix/docs.nix { inherit pkgs marlowe; };

# Test data needed by marlowe-actus provided via niv
inherit (sources) actus-tests;

# Packages needed for the bitte deployment
bitte-packages = import ./bitte {
inherit marlowe-playground web-ghc docs pkgs sources;
Expand Down
4 changes: 0 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
flake = false;
};

actus-tests = {
url = "github:actusfrf/actus-tests";
flake = false;
};
cardano-repo-tool = {
url = "github:input-output-hk/cardano-repo-tool";
flake = false;
Expand Down
1 change: 0 additions & 1 deletion nix/pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ let
inherit gitignore-nix sources;
inherit checkMaterialization enableHaskellProfiling;
inherit source-repo-override;
inherit (sources) actus-tests;

# This ensures that the utility scripts produced in here will run on the current system, not
# the build system, so we can run e.g. the darwin ones on linux
Expand Down
2 changes: 0 additions & 2 deletions nix/pkgs/haskell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
, rPackages
, z3
, enableHaskellProfiling
, actus-tests
, source-repo-override
}:
let
Expand Down Expand Up @@ -40,7 +39,6 @@ let
inherit checkMaterialization compiler-nix-name gitignore-nix;
inherit enableHaskellProfiling;
inherit deferPluginErrors;
inherit actus-tests;
inherit source-repo-override;
};
project = baseProject { deferPluginErrors = false; };
Expand Down
8 changes: 0 additions & 8 deletions nix/pkgs/haskell/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# Whether to set the `defer-plugin-errors` flag on those packages that need
# it. If set to true, we will also build the haddocks for those packages.
, deferPluginErrors
, actus-tests
, source-repo-override
}:
let
Expand Down Expand Up @@ -180,13 +179,6 @@ let
platforms = lib.platforms.linux;
};

# The marlowe-actus tests depend on external data which is
# provided from Nix (as niv dependency)
marlowe-actus.components.tests.marlowe-actus-test.preCheck = ''
export ACTUS_TEST_DATA_DIR=${actus-tests}/tests/
'';


# Note: The following two statements say that these tests should
# _only_ run on linux. In actual fact we just don't want them
# running on the 'mac-mini' instances, because these tests time out
Expand Down

0 comments on commit 82de7b5

Please sign in to comment.