Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
gitUpdater,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "xc";
|
|
version = "0.8.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "joerdav";
|
|
repo = "xc";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-Q17ldwHp1Wp/u0BkUZiA1pRJaFpo/5iDW011k9qkIEA=";
|
|
};
|
|
|
|
vendorHash = "sha256-EbIuktQ2rExa2DawyCamTrKRC1yXXMleRB8/pcKFY5c=";
|
|
|
|
subPackages = [ "cmd/xc" ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=main.version=${finalAttrs.version}"
|
|
];
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
|
|
versionCheckProgramArg = "-version";
|
|
|
|
doInstallCheck = true;
|
|
postInstallCheck = ''
|
|
cp ${./example.md} example.md
|
|
$out/bin/xc -file ./example.md example
|
|
if ! [[ -f test ]] then
|
|
echo "example.md didn't do anything" >&2
|
|
return 1
|
|
fi
|
|
'';
|
|
|
|
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
|
|
|
|
meta = {
|
|
description = "Markdown defined task runner";
|
|
mainProgram = "xc";
|
|
homepage = "https://xcfile.dev/";
|
|
changelog = "https://github.com/joerdav/xc/releases/tag/${finalAttrs.src.tag}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
figsoda
|
|
joerdav
|
|
];
|
|
};
|
|
})
|