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
47 lines
948 B
Nix
47 lines
948 B
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "scripthaus";
|
|
version = "0.5.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "scripthaus-dev";
|
|
repo = "scripthaus";
|
|
rev = "v${version}";
|
|
hash = "sha256-ZWOSLkqjauONa+fKkagpUgWB4k+l1mzEEiC0RAMUmo0=";
|
|
};
|
|
|
|
vendorHash = "sha256-GUZNPLBgqN1zBzCcPl7TB9/4/Yk4e7K6I20nVaM6ank=";
|
|
|
|
env.CGO_ENABLED = 1;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/cmd $out/bin/scripthaus
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script {
|
|
extraArgs = [
|
|
"--version-regex"
|
|
"^(v[0-9.]+)$"
|
|
];
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Run bash, Python, and JS snippets from your Markdown files directly from the command-line";
|
|
homepage = "https://github.com/scripthaus-dev/scripthaus";
|
|
license = licenses.mpl20;
|
|
maintainers = with maintainers; [ raspher ];
|
|
mainProgram = "scripthaus";
|
|
};
|
|
}
|