Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2834045
D4432.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4432.diff
View Options
diff --git a/nix/dev-shell.nix b/nix/dev-shell.nix
--- a/nix/dev-shell.nix
+++ b/nix/dev-shell.nix
@@ -8,6 +8,7 @@
, cmake
, cryptopp
, darwin
+, fbjni
, folly
, fmt
, grpc
@@ -59,6 +60,7 @@
# include any libraries buildInputs
buildInputs = [
+ fbjni # android builds
protobuf_3_15_cmake # exposes both a library and a command, thus should appear in both inputs
folly # cpp tools
fmt # needed for folly
diff --git a/nix/fbjni.nix b/nix/fbjni.nix
new file mode 100644
--- /dev/null
+++ b/nix/fbjni.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, fetchpatch
+, openjdk
+, gtest
+}:
+
+stdenv.mkDerivation rec {
+ pname = "fbjni";
+ version = "0.3.0";
+
+ src = fetchFromGitHub {
+ owner = "facebookincubator";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "132s9c8vlx1r4zcjjsgii9n3f2fx5qxgj3yvg6hw0dzg61x07bpg";
+ };
+
+ patches = [
+ # fix cmake install of cmake and include directories
+ (fetchpatch {
+ url = "https://github.com/facebookincubator/fbjni/pull/76.patch";
+ sha256 = "sha256-ZCJmzwTKT/n4rdypXBZ2Vv8qYVcQxB3UoFIgoK7qmvE=";
+ })
+ ];
+
+ nativeBuildInputs = [
+ cmake
+ openjdk
+ ];
+
+ buildInputs = [
+ gtest
+ ];
+
+ cmakeFlags = [
+ "-DJAVA_HOME=${openjdk.passthru.home}"
+ ];
+
+ meta = with lib; {
+ description = "A library designed to simplify the usage of the Java Native Interface";
+ homepage = "https://github.com/facebookincubator/fbjni";
+ license = licenses.asl20;
+ };
+}
diff --git a/nix/overlay.nix b/nix/overlay.nix
--- a/nix/overlay.nix
+++ b/nix/overlay.nix
@@ -38,4 +38,6 @@
''${!outputDev}/include/olm
'';
});
+
+ fbjni = prev.callPackage ./fbjni.nix { };
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 29, 9:51 AM (21 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2199988
Default Alt Text
D4432.diff (1 KB)
Attached To
Mode
D4432: [nix] Add fbjni
Attached
Detach File
Event Timeline
Log In to Comment