Skip to content

Commit 1c2e195

Browse files
committed
chore: update nix flake
1 parent 195a94d commit 1c2e195

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

flake.nix

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,70 @@
3939

4040
in
4141
{
42+
packages.default = pkgs.rustPlatform.buildRustPackage {
43+
pname = "datum-connect";
44+
version = "0.1.0";
45+
46+
src = ./.;
47+
48+
cargoLock = {
49+
lockFile = ./Cargo.lock;
50+
outputHashes = {
51+
"iroh-proxy-utils-0.1.0" = "sha256-DRFxQusoBIh3IaYS2AlIbsKszNQuph5Xsm2h8n4Fkw8=";
52+
};
53+
};
54+
55+
nativeBuildInputs = with pkgs; [
56+
pkg-config
57+
];
58+
59+
buildInputs = with pkgs; [
60+
openssl
61+
] ++ lib.optionals stdenv.isDarwin [
62+
libiconv
63+
];
64+
65+
cargoBuildFlags = [ "--workspace" ];
66+
67+
meta = with pkgs.lib; {
68+
description = "Datum Connect - A tunneling solution built on iroh";
69+
homepage = "https://github.com/datum-cloud/datum-connect";
70+
license = licenses.agpl3Only;
71+
maintainers = [ ];
72+
};
73+
};
74+
75+
packages.cli = pkgs.rustPlatform.buildRustPackage {
76+
pname = "datum-connect-cli";
77+
version = "0.1.0";
78+
79+
src = ./.;
80+
81+
cargoLock = {
82+
lockFile = ./Cargo.lock;
83+
outputHashes = {
84+
"iroh-proxy-utils-0.1.0" = "sha256-DRFxQusoBIh3IaYS2AlIbsKszNQuph5Xsm2h8n4Fkw8=";
85+
};
86+
};
87+
88+
nativeBuildInputs = with pkgs; [
89+
pkg-config
90+
];
91+
92+
buildInputs = with pkgs; [
93+
openssl
94+
] ++ lib.optionals stdenv.isDarwin [
95+
libiconv
96+
];
97+
98+
cargoBuildFlags = [ "-p" "datum-connect" ];
99+
100+
meta = with pkgs.lib; {
101+
description = "Datum Connect CLI";
102+
mainProgram = "datum-connect";
103+
};
104+
};
105+
42106
devShells.default = pkgs.mkShell {
43107
buildInputs = with pkgs; [
44108
# Rust toolchain with WASM support
@@ -77,6 +141,8 @@
77141
echo " dx build --release # Build for production"
78142
'';
79143
};
144+
145+
formatter = pkgs.nixpkgs-fmt;
80146
}
81147
);
82148
}

0 commit comments

Comments
 (0)