diff options
| author | figsoda <figsoda@pm.me> | 2023-04-06 14:14:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-06 20:14:01 +0200 |
| commit | 1c324765e92c23826dff4f37d3b01761a3ac6ef4 (patch) | |
| tree | 1c84390a6ff58545374b7cbfa3c74f82af306558 /flake.nix | |
| parent | 75461675c4e57675174d98060124c9e13beaf7e4 (diff) | |
Add shell completions and man pages (#582)
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -10,6 +10,7 @@ ; inherit (nixpkgs.lib) genAttrs + importTOML optionals ; @@ -39,11 +40,23 @@ allowBuiltinFetchGit = true; }; + nativeBuildInputs = [ + pkgs.installShellFiles + ]; + buildInputs = optionals pkgs.stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.CoreServices ]; - TYPST_VERSION = rev "(unknown version)"; + postInstall = '' + installManPage cli/artifacts/*.1 + installShellCompletion \ + cli/artifacts/typst.{bash,fish} \ + --zsh cli/artifacts/_typst + ''; + + GEN_ARTIFACTS = "artifacts"; + TYPST_VERSION = "${(importTOML ./cli/Cargo.toml).package.version} (${rev "unknown hash"})"; }; in { |
