-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create flake.nix * chore: Updates to code and to README --------- Co-authored-by: Luciano Mammino <lucianomammino@gmail.com>
- Loading branch information
Showing
5 changed files
with
164 additions
and
30 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
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,9 @@ | ||
{ pkgs ? import <nixpkgs> { } }: | ||
let manifest = (pkgs.lib.importTOML ./Cargo.toml).package; | ||
in | ||
pkgs.rustPlatform.buildRustPackage rec { | ||
pname = manifest.name; | ||
version = manifest.version; | ||
cargoLock.lockFile = ./Cargo.lock; | ||
src = pkgs.lib.cleanSource ./.; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
{ | ||
description = "jwtinfo"; | ||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
}; | ||
outputs = { self, nixpkgs }: | ||
let | ||
supportedSystems = [ | ||
"x86_64-linux" | ||
"aarch64-linux" | ||
"x86_64-darwin" | ||
"aarch64-darwin" | ||
"x86_64-windows" | ||
"aarch64-windows" | ||
]; | ||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems; | ||
pkgsFor = nixpkgs.legacyPackages; | ||
in | ||
{ | ||
packages = forAllSystems (system: { | ||
default = pkgsFor.${system}.callPackage ./default.nix { }; | ||
}); | ||
devShells = forAllSystems (system: { | ||
default = pkgsFor.${system}.callPackage ./shell.nix { }; | ||
}); | ||
}; | ||
} |
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,11 @@ | ||
{ pkgs ? import <nixpkgs> { } }: | ||
pkgs.mkShell { | ||
# Get dependencies from the main package | ||
inputsFrom = [ (pkgs.callPackage ./default.nix { }) ]; | ||
# Additional tooling | ||
buildInputs = with pkgs; [ | ||
rust-analyzer # LSP Server | ||
rustfmt # Formatter | ||
clippy # Linter | ||
]; | ||
} |