Skip to content

Commit

Permalink
chore: update crate2nix
Browse files Browse the repository at this point in the history
  • Loading branch information
maulanasdqn committed Dec 11, 2024
1 parent 871d1ec commit 9ac6d3f
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10969,6 +10969,7 @@ rec {
{
name = "uuid";
packageId = "uuid";
features = [ "v4" ];
}
];

Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "Wedding API";
description = "Wedding API Nix Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
Expand Down
46 changes: 46 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,51 @@ pkgs.mkShell {
surrealdb
surrealist
surrealdb-migrations

(writeScriptBin "helpme" ''
__usage="
👋 Welcome to WeddingAPI development environment. 🚀
If you see this message, it means your are inside the Nix shell ❄️.
[Info]===============================================================>
Rustc Version: v${rustc.version}
Rustup Version: v${rustup.version}
Cargo Version: v${cargo.version}
Command available:
- start: start project in production ( need to run build first ) 🛹
- build: build project for production
- dev: start development server
- apply-env: apply environment variable to current shell
- helpme: show this messages
Repository:
- https://github.com/maulanasdqn/wedding-api
[Info]===============================================================>
"
echo "$__usage"
'')

(writeScriptBin "dev" ''
cargo watch -x "run -p api"
'')

(writeScriptBin "start" ''
echo "Starting project in production mode..."
./result/bin/api
'')

(writeScriptBin "build" ''
nix build -f Cargo.nix
'')

(writeScriptBin "apply-env" ''
export $(cat .env | xargs)
'')
];

shellHook = ''
helpme
'';
}
2 changes: 1 addition & 1 deletion src/libs/storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ serde_json = "1.0"
hyper = "0.14"
log = "0.4.22"
env_logger = "0.11.5"
uuid = "1.11.0"
uuid = { version = "1.11.0", features = ["v4"] }
minio-rsc = { version = "0.2.3", features = ["fs-tokio"] }
bytes = "1.9.0"
reqwest = "0.12.9"

0 comments on commit 9ac6d3f

Please # to comment.