Skip to content

Commit 50a40e1

Browse files
committed
insert mantis-extvm-pb into the build instead of using submodules
1 parent a30bbdb commit 50a40e1

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

nix/mantis.nix

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
, gnused
1313
, protobuf
1414
, substituteAll
15-
, writeShellScriptBin
15+
, writeBashBinChecked
16+
, mantis-extvm-pb
1617
}:
1718

1819
let
@@ -25,17 +26,16 @@ let
2526
LD_LIBRARY_PATH = ''''; #lib.makeLibraryPath [ libsonic ];
2627

2728
# filter out mentions of protobridge, which is unable to execute
28-
protoc-wrapper = writeShellScriptBin "protoc" ''
29+
protoc-wrapper = writeBashBinChecked "protoc" ''
2930
set -e
3031
3132
for f in "$@"; do
32-
echo ''${f##*=}
33+
echo "''${f##*=}"
3334
done | grep protocbridge | xargs sed -i "1s|.*|#!${runtimeShell}|"
3435
3536
exec ${protobuf}/bin/protoc "$@"
3637
'';
3738

38-
3939
in sbt.mkDerivation rec {
4040
pname = "mantis";
4141
inherit src version;
@@ -45,6 +45,9 @@ in sbt.mkDerivation rec {
4545
preConfigure = ''
4646
HOME=$TMPDIR
4747
PROTOC_CACHE=.nix/protoc-cache
48+
49+
mkdir -p src/main/protobuf/extvm
50+
cp ${mantis-extvm-pb}/msg.proto src/main/protobuf/extvm/msg.proto
4851
'';
4952

5053
# used by sbt-derivation to modify vendor derivation

nix/overlay.nix

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,27 @@ rev: final: prev: {
22
jre = prev.jdk8.jre;
33

44
mantis = final.callPackage ./mantis.nix {
5-
src = builtins.fetchGit {
6-
url = "https://github.com/input-output-hk/mantis";
7-
ref = "develop";
8-
rev = rev;
9-
submodules = true;
10-
};
5+
src = ../.;
116
};
127

138
mantis-hash = { ref, rev }:
149
(final.callPackage ./mantis.nix {
1510
src = builtins.fetchGit {
1611
url = "https://github.com/input-output-hk/mantis";
1712
inherit rev ref;
18-
submodules = true;
1913
};
2014
}).overrideAttrs (_: {
2115
outputHash = "sha256-0000000000000000000000000000000000000000000=";
2216
outputHashMode = "recursive";
2317
});
2418

19+
# Last change to this was in 2018, so to avoid submodules we just clone
20+
# ourselves instead.
21+
mantis-extvm-pb = builtins.fetchGit {
22+
url = "https://github.com/input-output-hk/mantis-extvm-pb";
23+
rev = "53eb31f3c59f7200994915b834e626bd292df7ed";
24+
};
25+
2526
writeBashChecked = final.writers.makeScriptWriter {
2627
interpreter = "${final.bashInteractive}/bin/bash";
2728
check = final.writers.writeBash "shellcheck-check" ''

0 commit comments

Comments
 (0)