Skip to content

Commit

Permalink
feat: add nix flake for devenv and build (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eisfunke authored Mar 2, 2024
1 parent 265c8f9 commit 05df4b2
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 1 deletion.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,8 @@ Temporary Items
# Ignore code-workspaces
*.code-workspace

# End of https://www.toptal.com/developers/gitignore/api/macos,linux,go,visualstudiocode
# End of https://www.toptal.com/developers/gitignore/api/macos,linux,go,visualstudiocode

# Nix
result*
.direnv
64 changes: 64 additions & 0 deletions flake.lock

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

38 changes: 38 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
description = "A simple Debugger for OpenID Connect IdPs.";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default";
};

outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;

perSystem = { pkgs, self', ... }: {

devShells.default = pkgs.mkShellNoCC {
buildInputs = [ pkgs.go ];
};

packages.default = pkgs.buildGoModule {
pname = "openid-connect-debugger";
version = "1.1.0";
src = inputs.self;
vendorHash = null;
};

apps.default = {
type = "app";
program = pkgs.writeShellApplication {
name = "openid-connect-debugger";
text = "${self'.packages.default}/bin/openid-connect-debugger";
};
};
};
};
}

0 comments on commit 05df4b2

Please sign in to comment.