diff options
| author | Michael Daniels <mdaniels5757@gmail.com> | 2026-01-17 21:39:33 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-17 21:39:33 +0000 |
| commit | 8162e5c1f4d0b09ed132122a57d20335d77a6354 (patch) | |
| tree | 967dab7caf3f379aa001860436e38a3542e023ea | |
| parent | 4f6c377ec69aecaf72b380e763b2252ae7ef5302 (diff) | |
| parent | eefad8f0fe45a5b94745c69a1d67ecefacc90625 (diff) | |
to-html: add runtime dependencies (#479085)
| -rw-r--r-- | pkgs/by-name/to/to-html/package.nix | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/by-name/to/to-html/package.nix b/pkgs/by-name/to/to-html/package.nix index 349a81d25f93..8a2d83ae0106 100644 --- a/pkgs/by-name/to/to-html/package.nix +++ b/pkgs/by-name/to/to-html/package.nix @@ -2,17 +2,20 @@ lib, fetchFromGitHub, installShellFiles, + makeWrapper, rustPlatform, + unixtools, + which, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { version = "0.1.6"; pname = "to-html"; src = fetchFromGitHub { owner = "Aloso"; repo = "to-html"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-eNFt9/yK4oHOspNM8PMTewhx8APaHzmgNdrWqrUuQSU="; }; @@ -21,21 +24,32 @@ rustPlatform.buildRustPackage rec { # Requires external resources doCheck = false; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ + installShellFiles + makeWrapper + ]; postInstall = '' installShellCompletion \ $releaseDir/build/to-html-*/out/to-html.{bash,fish} \ --zsh $releaseDir/build/to-html-*/out/_to-html + + wrapProgram $out/bin/to-html \ + --suffix PATH : ${ + lib.makeBinPath [ + unixtools.script + which + ] + } ''; meta = { description = "Terminal wrapper for rendering a terminal on a website by converting ANSI escape sequences to HTML"; mainProgram = "to-html"; homepage = "https://github.com/Aloso/to-html"; - changelog = "https://github.com/Aloso/to-html/blob/${src.rev}/CHANGELOG.md"; + changelog = "https://github.com/Aloso/to-html/blob/${finalAttrs.src.rev}/CHANGELOG.md"; license = lib.licenses.mit; platforms = lib.platforms.all; maintainers = with lib.maintainers; [ icewind1991 ]; }; -} +}) |
