43 lines
878 B
Nix
43 lines
878 B
Nix
{
|
|
lib,
|
|
fetchgit,
|
|
buildGoModule,
|
|
hugo,
|
|
git,
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "homepage";
|
|
version = "b796f72abceee0227fd93b64dae630b22c90c090";
|
|
|
|
src = fetchgit {
|
|
url = "https://git.dotya.ml/dotya.ml/${pname}";
|
|
deepClone = true;
|
|
fetchSubmodules = true;
|
|
leaveDotGit = true;
|
|
rev = version;
|
|
sha256 = "sha256-YrLPZ82nmRiSsEdSm6YKopcK/C7Wm5kMlZ5FtILzV8s=";
|
|
};
|
|
|
|
# no vendored Go deps, set to null.
|
|
vendorHash = null;
|
|
nativeBuildInputs = [hugo git];
|
|
patchPhase = ''
|
|
hugo --minify --gc=true --cleanDestinationDir --enableGitInfo=true --destination ./public
|
|
'';
|
|
|
|
CGO_ENABLED = 0;
|
|
doCheck = false;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
" -X main.version=${version}"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "sawce that makes up the dotya.ml landing page.";
|
|
license = licenses.wtfpl;
|
|
homepage = "https://dotya.ml/";
|
|
};
|
|
}
|