Initial commit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
{
|
||||
description = "Minimal static photo gallery with Atom feed and upload API";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
packages.default = pkgs.buildGoModule {
|
||||
pname = "photogallery";
|
||||
version = "0.1.0";
|
||||
src = self;
|
||||
|
||||
# Run `go mod tidy` to generate go.sum, then `nix build`.
|
||||
# Nix will fail and print the correct hash — paste it here.
|
||||
vendorHash = "sha256-SxQDRProQtauWXPvPzbZZChLQd0iey9hnXFLiPYTS98=";
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "Minimal static photo gallery";
|
||||
license = licenses.mit;
|
||||
mainProgram = "photogallery";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = [ pkgs.go pkgs.gopls pkgs.gotools ];
|
||||
};
|
||||
}
|
||||
) // {
|
||||
nixosModules.default = import ./module.nix self;
|
||||
|
||||
# Lets consumers add photogallery to their pkgs without
|
||||
# pulling in the full flake module.
|
||||
overlays.default = _final: _prev: {
|
||||
photogallery = self.packages.${_final.system}.default;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user