diff options
author | raspher <raspher@posteo.me> | 2024-02-04 02:30:18 +0100 |
---|---|---|
committer | raspher <raspher@posteo.me> | 2024-02-13 00:20:08 +0100 |
commit | a8782abe6b936c66e6ef8d5c74cb101738945c9a (patch) | |
tree | a79bdbd58436aa025a2aa94f7951640f10b021cb /pkgs/by-name/sc | |
parent | 4907e7a50c83b6214239d30a833f59493754eb48 (diff) |
scripthaus: init at 0.5.1
Co-authored-by: éclairevoyant <848000+eclairevoyant@users.noreply.github.com>
Diffstat (limited to 'pkgs/by-name/sc')
-rw-r--r-- | pkgs/by-name/sc/scripthaus/package.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/by-name/sc/scripthaus/package.nix b/pkgs/by-name/sc/scripthaus/package.nix new file mode 100644 index 0000000000000..be6b1e5f9b14d --- /dev/null +++ b/pkgs/by-name/sc/scripthaus/package.nix @@ -0,0 +1,39 @@ +{ 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="; + + 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"; + }; +} |