-
Notifications
You must be signed in to change notification settings - Fork 134
/
ledger.nix
44 lines (32 loc) · 885 Bytes
/
ledger.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
44
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
pkgsStatic.stdenv.mkDerivation {
pname = "ledger";
version = "3.3.2";
src = fetchFromGitHub {
owner = "ledger";
repo = "ledger";
rev = "4355c4faf157d5ef47b126286aa501742732708d";
hash = "sha256-9IowdrQpJarALr21Y+Mhmld+eC4YUpEn+goqWyBb6Xc=";
};
outputs = [ "out" "dev" ];
buildInputs = [ pkgsStatic.gmp pkgsStatic.mpfr gnused pkgsStatic.boost ];
nativeBuildInputs = [ cmake tzdata ];
cmakeFlags = [
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DBUILD_DOCS:BOOL=OFF"
"-DUSE_PYTHON:BOOL=OFF"
"-DUSE_GPGME:BOOL=OFF"
"-DBUILD_LIBRARY:BOOL=OFF"
];
enableParallelBuilding = true;
installTargets = [ "install" ];
checkPhase = ''
runHook preCheck
env LD_LIBRARY_PATH=$PWD \
DYLD_LIBRARY_PATH=$PWD \
ctest -j$NIX_BUILD_CORES
runHook postCheck
'';
doCheck = true;
}