This repository has been archived by the owner on Jun 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.nix
94 lines (70 loc) · 2.23 KB
/
build.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{ pkgs, client-c-src, admin-src, tools-backup-src, src, version }:
with pkgs;
let
client = stdenv.mkDerivation rec {
name = "aerospike-client-c";
src = client-c-src;
nativeBuildInputs = [ autoconf automake libtool ];
buildInputs = [ openssl zlib lua ];
phases = [ "unpackPhase" "preBuild" "buildPhase" "installPhase" ];
preBuild = "export EVENT_LIB=";
installPhase = ''
mkdir -p $out/src
cp -rv $src/* $out/src/
cp -rv target $out/src/target
'';
};
yappi = with python38Packages; buildPythonPackage rec {
pname = "yappi";
version = "1.0";
src = fetchPypi {
inherit pname version;
sha256 = "1gs48c5sy771lsjhca3m4j8ljc6yhk5qnim3n5idnlaxa4ql30bz";
};
checkInputs = [ nose ];
};
in
{
aerospike-admin = with python38Packages; buildPythonApplication rec {
name = "aerospike-admin";
src = admin-src;
buildInputs = [ bcrypt cryptography dateutil jsonschema pexpect ply pyasn1 pyopenssl toml yappi future distro enum34 ];
propagatedBuildInputs = buildInputs;
doCheck = false;
postPatch = ''
substituteInPlace ./asadm.py --replace '#!/bin/sh' '#!${python}/bin/python'
'';
postFixup = ''
cp -v $src/version.txt $out/bin/version.txt
'';
};
aerospike-tools-backup = stdenv.mkDerivation rec {
name = "aerospike-tools-backup";
src = tools-backup-src;
nativeBuildInputs = [ autoconf automake libtool ];
buildInputs = [ openssl zlib zstd ];
preBuild = "export CLIENTREPO=${client}/src";
installPhase = ''
mkdir -p $out/bin
cp -rv ./bin/{asbackup,asrestore} $out/bin/
'';
};
aerospike-server = stdenv.mkDerivation rec {
inherit src version;
pname = "aerospike-server";
nativeBuildInputs = [ autoconf automake libtool gnumake ];
buildInputs = [ openssl zlib lua ];
prePatch = ''
patchShebangs .
substituteInPlace build/gen_version --replace '`git describe --abbrev=7`' '${version}'
substituteInPlace build/gen_version --replace '`date`' ""
'';
NIX_CFLAGS_COMPILE = [
"-Wno-error=address-of-packed-member"
];
installPhase = ''
mkdir -p $out/bin $out/share/udf/lua
cp target/Linux-x86_64/bin/asd $out/bin/asd
'';
};
}