-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from juspay/mono-repo
Move Rust project to a sub directory
- Loading branch information
Showing
7 changed files
with
45 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
result | ||
.direnv | ||
|
||
|
||
# Added by cargo | ||
|
||
/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Added by cargo | ||
/target |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
perSystem = { self', pkgs, lib, ... }: | ||
let | ||
src = lib.sourceFilesBySuffices ./. [ ".rs" ".toml" "Cargo.lock" ]; | ||
inherit (lib.importTOML (src + "/Cargo.toml")) package; | ||
in | ||
{ | ||
packages = { | ||
${package.name} = pkgs.rustPlatform.buildRustPackage { | ||
pname = package.name; | ||
inherit (package) version; | ||
inherit src; | ||
cargoLock.lockFile = (src + "/Cargo.lock"); | ||
}; | ||
default = self'.packages.${package.name}; | ||
}; | ||
|
||
devShells.backend = pkgs.mkShell { | ||
inherit (package) name; | ||
inputsFrom = [ self'.packages.${package.name} ]; | ||
packages = with pkgs; [ | ||
rust-analyzer | ||
nil | ||
]; | ||
}; | ||
}; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters