From af53253aa9f3cd5d5da05d2b6f750303f1be9b27 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Sun, 13 Apr 2025 17:41:24 +0100 Subject: [PATCH] codebook: init at 0.2.9 --- pkgs/by-name/co/codebook/package.nix | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 pkgs/by-name/co/codebook/package.nix diff --git a/pkgs/by-name/co/codebook/package.nix b/pkgs/by-name/co/codebook/package.nix new file mode 100644 index 000000000000..7b97353d1d18 --- /dev/null +++ b/pkgs/by-name/co/codebook/package.nix @@ -0,0 +1,50 @@ +{ + lib, + fetchFromGitHub, + nix-update-script, + openssl, + pkg-config, + rustPlatform, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "codebook"; + version = "0.2.9"; + + src = fetchFromGitHub { + owner = "blopker"; + repo = "codebook"; + tag = "v${finalAttrs.version}"; + hash = "sha256-iJ9S9DDoZVZxZ1o9dkor8PGM6Z+FljWZfetWFFMOIIo="; + }; + + buildAndTestSubdir = "crates/codebook-lsp"; + cargoHash = "sha256-PmhfEftgto0FHOIfryN9JME9S+/CarAEZ6hV/vj37Eg="; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + openssl + ]; + + env.OPENSSL_NO_VENDOR = 1; + + # Integration tests require internet access for dictionaries + doCheck = false; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Unholy spellchecker for code"; + homepage = "https://github.com/blopker/codebook"; + changelog = "https://github.com/blopker/codebook/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + jpds + ]; + mainProgram = "codebook-lsp"; + platforms = with lib.platforms; unix ++ windows; + }; +})