Skip to content

Commit b90dce1

Browse files
authored
Fantom blockchain (#26)
Adds the `go-opera` package.
1 parent b279964 commit b90dce1

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

overlay.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ _finalNixpkgs: prevNixpkgs: let
3636
erdpy = prevNixpkgs.callPackage ./packages/erdpy/default.nix {};
3737
elrond-go = prevNixpkgs.callPackage ./packages/elrond-go/default.nix {};
3838
elrond-proxy-go = prevNixpkgs.callPackage ./packages/elrond-proxy-go/default.nix {};
39+
40+
go-opera = prevNixpkgs.callPackage ./packages/go-opera/default.nix {};
3941
in {
4042
metacraft-labs = rec {
4143
solana = solana-full-sdk;
@@ -50,5 +52,6 @@ in {
5052
inherit cattrs22-2;
5153
inherit elrond-go;
5254
inherit elrond-proxy-go;
55+
inherit go-opera;
5356
};
5457
}

packages/go-opera/default.nix

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{pkgs}:
2+
with pkgs;
3+
buildGoModule rec {
4+
pname = "go-opera";
5+
version = "1.1.1-rc.2";
6+
7+
src = fetchgit {
8+
url = "https://github.com/Fantom-foundation/go-opera";
9+
rev = "v${version}";
10+
sha256 = "sha256-OoDjbCKUoWsZ6jfzmeCwDyvuo28H9YMXxPTRTJOsBcU=";
11+
};
12+
13+
karalabe-usb = fetchgit {
14+
url = "https://github.com/karalabe/usb";
15+
rev = "v0.0.2";
16+
sha256 = "sha256-liXTgMnA0W5CwfOkqaVLdWmDdBK+7DSWLQZuSLVOt6w=";
17+
};
18+
doCheck = false;
19+
buildInputs = [gcc-unwrapped];
20+
CGO_CFLAGS = "-I${karalabe-usb} -I${karalabe-usb}/hidapi/hidapi -I${karalabe-usb}/libusb/libusb";
21+
22+
# GIT_COMMIT = "e529a4e7317e2f02e284c194677b301bb640cd73";
23+
# GIT_DATE = "1669028682";
24+
# ldflags = "-s -w -X github.com/Fantom-foundation/go-opera/cmd/opera/launcher.gitCommit=$${GIT_COMMIT} -X github.com/Fantom-foundation/go-opera/cmd/opera/launcher.gitDate=$${GIT_DATE}";
25+
26+
vendorSha256 = "sha256-fRMMjPFyFpFbN/NRzi1KBwwMZsu6DFrVwRPsBW3J6uU=";
27+
modSha256 = lib.fakeSha256;
28+
29+
meta = with lib; {
30+
description = "Opera blockchain protocol secured by the Lachesis consensus algorithm ";
31+
homepage = "https://github.com/Fantom-foundation/go-opera";
32+
license = licenses.lgpl3;
33+
};
34+
}

shell.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ with pkgs;
1313
metacraft-labs.cosmos-theta-testnet
1414
metacraft-labs.circom
1515
metacraft-labs.circ
16+
metacraft-labs.go-opera
1617
]
1718
++ lib.optionals (!stdenv.isDarwin) [
1819
# Solana is still not compatible with macOS on M1

0 commit comments

Comments
 (0)