Skip to content

Commit f803aff

Browse files
EmilIvanichkovvzah
authored andcommitted
feat(packages): Add wasmd nix package
1 parent 7ce97de commit f803aff

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

packages/wasmd/default.nix

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
buildGoModule,
6+
autoPatchelfHook,
7+
}:
8+
buildGoModule rec {
9+
pname = "wasmd";
10+
version = "1.0.0";
11+
12+
src = fetchFromGitHub {
13+
owner = "CosmWasm";
14+
repo = "wasmd";
15+
rev = "d63bea442bedf5b3055f3821472c7e6cafc3d813";
16+
sha256 = "sha256-hN7XJDoZ8El2tvwJnW67abhwg37e1ckFyreytN2AwZ0=";
17+
};
18+
proxyVendor = true;
19+
20+
subPackages = ["cmd/wasmd"];
21+
22+
buildInputs = [autoPatchelfHook];
23+
24+
postBuild = ''
25+
mkdir -p "$out/lib"
26+
cp "$GOPATH/pkg/mod/github.com/!cosm!wasm/[email protected]/api/libwasmvm.x86_64.so" "$out/lib"
27+
'';
28+
29+
postInstall = ''
30+
addAutoPatchelfSearchPath "$out/lib"
31+
autoPatchelf -- "$out/bin"
32+
'';
33+
34+
vendorSha256 = "sha256-4vW1+vGOwbaE6fVXtHjKMheX9UpiY7WVh7QCC57QQUM=";
35+
doCheck = false;
36+
meta = with lib; {
37+
description = "Basic cosmos-sdk app with web assembly smart contracts";
38+
homepage = "https://github.com/CosmWasm/wasmd";
39+
license = licenses.asl20;
40+
maintainers = with maintainers; [];
41+
};
42+
}

0 commit comments

Comments
 (0)