Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3508394
D5727.id19059.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
D5727.id19059.diff
View Options
diff --git a/flake.nix b/flake.nix
--- a/flake.nix
+++ b/flake.nix
@@ -13,6 +13,7 @@
localOverlay = import ./nix/overlay.nix;
overlays = [
localOverlay
+ (_: _: { commSrc = toString self; })
];
# Since we build for many systems (e.g. aarch64, x86_64-linux), we
diff --git a/nix/blob.nix b/nix/blob.nix
new file mode 100644
--- /dev/null
+++ b/nix/blob.nix
@@ -0,0 +1,40 @@
+{ stdenv
+, lib
+, rustPlatform
+, fetchFromGitHub
+, commSrc
+, protobuf_3_15_cmake
+, dockerTools
+}:
+
+let
+ blob = rustPlatform.buildRustPackage rec {
+ pname = "blob";
+ version = "0.0.1";
+
+ src = commSrc;
+
+ prePatch = "cd services/blob";
+
+ cargoLock.lockFile = ../services/blob/Cargo.lock;
+
+ nativeBuildInputs = [
+ protobuf_3_15_cmake
+ ];
+
+ # Expose docker image for linux platforms
+ passthru = lib.optionalAttrs stdenv.isLinux {
+ dockerImage = dockerTools.buildImage {
+ name = "comm-blob";
+ tag = "latest";
+ contents = [ blob ];
+ config.Cmd = [ "/bin/blob" ];
+ }
+ };
+
+ meta = with lib; {
+ license = licenses.mit;
+ };
+ };
+in
+ blob
diff --git a/nix/overlay.nix b/nix/overlay.nix
--- a/nix/overlay.nix
+++ b/nix/overlay.nix
@@ -49,6 +49,8 @@
nativeBuildInputs = (o.nativeBuildInputs or []) ++ [ prev.cmake ];
});
+ comm-blob = final.callPackage ./blob.nix { };
+
protobuf_3_15_cmake = prev.callPackage ./protobuf_3_15.nix { };
devShells.default = final.callPackage ./dev-shell.nix { };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 9:55 PM (19 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2689678
Default Alt Text
D5727.id19059.diff (1 KB)
Attached To
Mode
D5727: [Nix] Package blob
Attached
Detach File
Event Timeline
Log In to Comment