forked from dapphub/dapptools
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdefault.nix
38 lines (34 loc) · 1.1 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib, stdenv, fetchFromGitHub, makeWrapper, glibcLocales
, coreutils, git, gnused, gnumake, hevm, jshon, jq, nix
, nodejs, perl, seth, shellcheck, solc, dapptoolsSrc }:
stdenv.mkDerivation rec {
name = "dapp-${version}";
version = "0.30.0-v1.10.17-statediff-3.2.0";
src = ./.;
nativeBuildInputs = [makeWrapper shellcheck coreutils nodejs];
buildPhase = "true";
doCheck = true;
checkPhase = "make test";
makeFlags = ["prefix=$(out)"];
postInstall =
let
path = lib.makeBinPath [
coreutils git gnused gnumake hevm jshon jq nix nodejs perl seth solc
];
in
''
wrapProgram "$out/bin/dapp" \
--prefix PATH : ${path} \
--set DAPPTOOLS ${dapptoolsSrc} \
${lib.optionalString (glibcLocales != null) ''
--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive
''}
'';
meta = {
description = "Simple tool for creating Ethereum-based dapps";
homepage = https://github.com/dapphub/dapptools/src/dapp/;
maintainers = [stdenv.lib.maintainers.dbrock];
license = lib.licenses.gpl3;
inherit version;
};
}