aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2024-01-23 23:36:19 +0100
committerLibravatar Rutger Broekhoff2024-01-23 23:36:19 +0100
commitf5a460434b2a02ecc3c03ced6ee91df800824695 (patch)
tree828b9ed5d4a69e7142264be8af3fef1e573a0614
parent8e8403c7fbf5a0b2c4e0df41bc8b502ce4a79ec1 (diff)
downloadgitolfs3-f5a460434b2a02ecc3c03ced6ee91df800824695.tar.gz
gitolfs3-f5a460434b2a02ecc3c03ced6ee91df800824695.zip
Fix S3 env, set pname and version in package attribute set
-rw-r--r--flake.nix2
-rw-r--r--rs/server/src/main.rs2
2 files changed, 3 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index ebcc991..db5fc93 100644
--- a/flake.nix
+++ b/flake.nix
@@ -26,6 +26,8 @@
26 { 26 {
27 packages.gitolfs3 = gitolfs3; 27 packages.gitolfs3 = gitolfs3;
28 packages.gitolfs3-rs = craneLib.buildPackage { 28 packages.gitolfs3-rs = craneLib.buildPackage {
29 pname = "gitolfs3";
30 version = "0.1.0";
29 src = craneLib.cleanCargoSource (craneLib.path ./rs); 31 src = craneLib.cleanCargoSource (craneLib.path ./rs);
30 }; 32 };
31 packages.default = self.packages.${system}.gitolfs3; 33 packages.default = self.packages.${system}.gitolfs3;
diff --git a/rs/server/src/main.rs b/rs/server/src/main.rs
index 99805a4..880cb46 100644
--- a/rs/server/src/main.rs
+++ b/rs/server/src/main.rs
@@ -122,7 +122,7 @@ fn require_env(name: &str) -> Result<String, String> {
122impl Env { 122impl Env {
123 fn load() -> Result<Env, String> { 123 fn load() -> Result<Env, String> {
124 Ok(Env { 124 Ok(Env {
125 s3_secret_access_key: require_env("GITOLFS3_S3_ACCESS_KEY_FILE")?, 125 s3_secret_access_key: require_env("GITOLFS3_S3_SECRET_ACCESS_KEY_FILE")?,
126 s3_access_key_id: require_env("GITOLFS3_S3_ACCESS_KEY_ID_FILE")?, 126 s3_access_key_id: require_env("GITOLFS3_S3_ACCESS_KEY_ID_FILE")?,
127 s3_endpoint: require_env("GITOLFS3_S3_ENDPOINT")?, 127 s3_endpoint: require_env("GITOLFS3_S3_ENDPOINT")?,
128 s3_bucket: require_env("GITOLFS3_S3_BUCKET")?, 128 s3_bucket: require_env("GITOLFS3_S3_BUCKET")?,