mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-05-14 11:11:35 +00:00
This is only a breaking change if you've enabled the `audit` feature. All past audit reports should be removed once this commit is deployed, as both the Protobuf schema and the Snowflake epoch have changed.
69 lines
1.3 KiB
Nix
69 lines
1.3 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
nix-filter.url = "github:numtide/nix-filter";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
flake-utils,
|
|
nix-filter,
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
git-pages = pkgs.buildGo125Module {
|
|
pname = "git-pages";
|
|
version = "0";
|
|
|
|
src = nix-filter {
|
|
root = self;
|
|
|
|
include = [
|
|
"go.mod"
|
|
"go.sum"
|
|
"main.go"
|
|
|
|
(nix-filter.lib.inDirectory "src")
|
|
];
|
|
};
|
|
|
|
buildInputs = with pkgs; [
|
|
pkgsStatic.musl
|
|
];
|
|
|
|
ldflags = [
|
|
"-linkmode external"
|
|
"-extldflags -static"
|
|
"-s -w"
|
|
];
|
|
|
|
vendorHash = "sha256-LkHC/gFiSfYz9Z4bYMq1QNdapPYp8h1DSMRfFU9f7mw=";
|
|
};
|
|
in
|
|
{
|
|
formatter = pkgs.nixfmt-tree;
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
inputsFrom = [
|
|
git-pages
|
|
];
|
|
|
|
packages = with pkgs; [
|
|
caddy
|
|
];
|
|
};
|
|
|
|
packages = {
|
|
inherit git-pages;
|
|
default = git-pages;
|
|
};
|
|
}
|
|
);
|
|
}
|