Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33294814
D5727.1768749426.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D5727.1768749426.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,36 @@
+{ 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
+ ];
+
+ passthru.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
Sun, Jan 18, 3:17 PM (22 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5952098
Default Alt Text
D5727.1768749426.diff (1 KB)
Attached To
Mode
D5727: [Nix] Package blob
Attached
Detach File
Event Timeline
Log In to Comment