forked from makerdao/mcd-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmcd-cli.nix
43 lines (38 loc) · 1.12 KB
/
mcd-cli.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
39
40
41
42
43
{ lib, stdenv, fetchFromGitHub, makeWrapper, glibcLocales
, bc, coreutils, curl, findutils, gawk, gnugrep, gnused, perl
, jshon, jq, nodejs, git
, solc, go-ethereum, seth, ethabi, ethsign
}:
stdenv.mkDerivation rec {
name = "mcd-${version}";
version = lib.fileContents ./version;
src = lib.sourceByRegex ./. [
"bin" "bin/.*"
"libexec" "libexec/.*"
"Makefile"
];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
bc coreutils curl findutils gawk gnugrep gnused perl
jshon jq nodejs git
solc go-ethereum seth ethabi ethsign
];
buildPhase = "true";
makeFlags = ["prefix=$(out)"];
postInstall = let
path = lib.makeBinPath buildInputs;
locales = lib.optionalString (glibcLocales != null)
"--set LOCALE_ARCHIVE \"${glibcLocales}\"/lib/locale/locale-archive";
in ''
wrapProgram "$out/bin/mcd" \
--set PATH "${path}" \
${locales}
'';
meta = {
description = "Command-line client Multicollateral Dai";
homepage = https://github.com/makerdao/mcd-cli/;
maintainers = [stdenv.lib.maintainers.dbrock];
license = lib.licenses.gpl3;
inherit version;
};
}