-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdefault.nix
69 lines (63 loc) · 1.84 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
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
{
pkgs,
buildMavenRepositoryFromLockFile,
cacert,
cmake,
curl,
git,
jdk,
kognac,
lib,
lz4,
maven,
sparsehash,
stdenv,
trident,
zlib,
...
}: let
rulewerk-dependencies = buildMavenRepositoryFromLockFile {file = ../../../mvn2nix-lock.json;};
in
stdenv.mkDerivation rec {
pname = "vlog";
version = "unstable-2022-11-25";
src = pkgs.fetchFromGitHub {
owner = "karmaresearch";
repo = "vlog";
# rev = "v${version}";
# 'rev' and 'sha256' point to the latest VLog master branch tag/commit we want to test
rev = "ca63a3c6b32b0c4e5c099b645ff3d51a89212c76";
sha256 = "uyOSE01zc+D5Fqrex/fUespBKZgh+vDaAN/vE3ZW3RY=";
};
buildInputs = [kognac trident sparsehash jdk curl lz4];
nativeBuildInputs = [cmake git cacert maven];
cmakeFlags = [
"-DJAVA=1"
"-DSPARQL=1"
"-DCMAKE_CXX_FLAGS=-w"
"-DCMAKE_SKIP_RPATH=1"
"-DKOGNAC_LIB=${kognac}/lib"
"-DKOGNAC_INC=${kognac}/share/include"
"-DTRIDENT_LIB=${trident}/lib"
"-DTRIDENT_INC=${trident}/share/include"
];
# this patch forces CMake to prefer our provided lz4 library.
patches = [./patches/vlog-lz4.patch];
postInstall = ''
mkdir -p $out/bin
cp ./vlog $out/bin
mkdir -p $out/lib
cp ./libvlog-core.so $out/lib/
mkdir -p $out/share/java
# strip timestamps and other non-reproducible information from the jar
mvn --offline --no-transfer-progress io.github.zlika:reproducible-build-maven-plugin:0.16:strip-jar \
-Dreproducible.includes=./jvlog.jar \
-Dmaven.repo.local=${rulewerk-dependencies}
cp ./jvlog.jar $out/share/java
'';
meta = with lib; {
description = "A reasoner for Datalog and Existential Rules";
license = licenses.asl20;
homepage = "https://github.crom/karmaresearch/vlog";
};
}