-
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: use nix flake Signed-off-by: Carlos Alexandro Becker <[email protected]> * docs: fmt --------- Signed-off-by: Carlos Alexandro Becker <[email protected]>
- Loading branch information
Showing
9 changed files
with
164 additions
and
46 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 +1 @@ | ||
use nix | ||
use flake |
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 |
---|---|---|
|
@@ -20,3 +20,4 @@ manpages | |
output.json | ||
!acceptance_test.go | ||
.direnv/ | ||
tmp/ |
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
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,46 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
staging.url = "github:caarlos0/nixpkgs/wip"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
outputs = { nixpkgs, staging, flake-utils, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
staging-pkgs = staging.legacyPackages.${system}; | ||
in | ||
{ | ||
packages.default = pkgs.buildGoModule { | ||
pname = "nfpm"; | ||
version = "unversioned"; | ||
src = ./.; | ||
ldflags = [ "-s" "-w" "-X main.version=dev" "-X main.builtBy=flake" ]; | ||
doCheck = false; | ||
vendorHash = "sha256-P9jSQG6EyVGMZKtThy8Q7Y/pV7mbMl2eGrylea0VHRc="; | ||
}; | ||
|
||
devShells.default = pkgs.mkShell { | ||
packages = with pkgs; with staging-pkgs.python311Packages; [ | ||
go | ||
go-task | ||
gofumpt | ||
]; | ||
shellHook = "go mod tidy"; | ||
}; | ||
|
||
devShells.docs = pkgs.mkShell { | ||
packages = with pkgs; with staging-pkgs.python311Packages; [ | ||
(pkgs.writeScriptBin "ci-docs" "task docs:test") | ||
go-task | ||
htmltest | ||
mkdocs-material | ||
mkdocs-minify | ||
] ++ mkdocs-material.passthru.optional-dependencies.git; | ||
}; | ||
} | ||
); | ||
} | ||
|
||
|
||
|
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