Skip to content

Commit

Permalink
Merge pull request #288 from jonathanmorley/add-nix
Browse files Browse the repository at this point in the history
add nix, move to upastream tracing-tree
  • Loading branch information
jonathanmorley authored Jul 24, 2023
2 parents acac630 + 6adb870 commit dfe8de8
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target/
**/*.rs.bk
result
7 changes: 4 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{ pkgs, lib, rustPlatform, perl }:
rustPlatform.buildRustPackage {
pname = "oktaws";
version = "0.17.3";

src = lib.cleanSource ./.;

cargoLock = {
lockFile = ./Cargo.lock;
};

buildInputs = [
# Add additional build inputs here
] ++ lib.optionals pkgs.stdenv.isDarwin [
# Additional darwin specific inputs can be set here
pkgs.libiconv
pkgs.darwin.Security
];

cargoBuildFlags = "--package=oktaws";

useNextest = true;
cargoTestFlags = "--package=oktaws";

meta = with lib; {
description = "AWS authentication via Okta";
homepage = "https://github.com/jonathanmorley/oktaws";
license = licenses.asl20;
};
}
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
{
overlay = final: prev: {
oktaws = prev.callPackage ./default.nix { };
};
} // flake-utils.lib.eachDefaultSystem(system:
let
pkgs = import nixpkgs { inherit system; };
oktaws = pkgs.callPackage ./default.nix { };
in
{
packages = {
inherit oktaws;
default = oktaws;
};
}
);
}
4 changes: 2 additions & 2 deletions oktaws/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Jonathan Morley <[email protected]>"]
description = "Generates temporary AWS credentials with Okta."
edition = "2021"
name = "oktaws"
version = "0.17.2"
version = "0.17.3"
license = "Apache-2.0"
repository = "https://github.com/jonathanmorley/oktaws"
keywords = ["okta", "aws", "saml"]
Expand Down Expand Up @@ -43,7 +43,7 @@ toml = "0.7"
tracing = "0.1"
tracing-log = "0.1"
tracing-subscriber = "0.3"
tracing-tree = { git = "https://github.com/davidbarsky/tracing-tree", branch = "main" }
tracing-tree = "0.2.4"
url = { version = "2", features = ["serde"] }
username = "0.2"
eyre = "0.6.8"
Expand Down

0 comments on commit dfe8de8

Please sign in to comment.