diff --git a/aboutPages/default.nix b/aboutPages/default.nix new file mode 100644 index 0000000..061b69c --- /dev/null +++ b/aboutPages/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenvNoCC, zola, commitShaShort ? "" }: + +stdenvNoCC.mkDerivation rec { + pname = "hagridAboutPages"; + version = "2.1.0"; + + src = ./.; + + nativeBuildInputs = [ + zola + ]; + + buildPhase = '' + zola build --output-dir $out/about + ''; + + COMMIT_SHA_SHORT = commitShaShort; + + meta = with lib; { + description = "A verifying keyserver (about pages)"; + homepage = "https://gitlab.com/keys.openpgp.org/hagrid"; + license = with licenses; [ gpl3 ]; + maintainers = with maintainers; [ valodim ]; + platforms = platforms.all; + }; +} diff --git a/default.nix b/default.nix index d26d705..d1711c9 100644 --- a/default.nix +++ b/default.nix @@ -4,7 +4,12 @@ rustPlatform.buildRustPackage rec { pname = "hagrid"; version = "2.1.0"; - src = ./.; + # src = ./.; + # avoid rebuilds when only about pages change + src = builtins.filterSource + (path: type: !(type == "directory" && baseNameOf path == "aboutPages")) + ./.; + cargoLock = { lockFile = ./Cargo.lock; outputHashes = { diff --git a/flake.nix b/flake.nix index d0bdecd..f685bcb 100644 --- a/flake.nix +++ b/flake.nix @@ -13,10 +13,13 @@ packages.wkdDomainChecker = pkgs.callPackage ./wkd-domain-checker/. { }; packages.default = packages.hagrid; + + packages.hagridAboutPages = pkgs.callPackage ./aboutPages { }; }) // { overlays.hagrid = (final: prev: { hagrid = self.packages."${final.system}".hagrid; hagridctl = self.packages."${final.system}".hagridctl; + hagridAboutPages = self.packages."${final.system}".hagridAboutPages; }); overlays.wkdDomainChecker = (final: prev: { wkdDomainChecker = self.packages."${final.system}".wkdDomainChecker; }); diff --git a/shell.nix b/shell.nix index 69842c4..da745d8 100644 --- a/shell.nix +++ b/shell.nix @@ -25,6 +25,9 @@ pkgs.mkShell { gettext transifex-client + + # static site generator used for /about pages + zola ]; # Set Environment Variables