From 952e4912c8c1c9c902dea13ce44f13b4cc4786d7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 22 Jun 2026 19:14:56 +0300 Subject: [PATCH 1/2] corrosion: fix dependent packages --- pkgs/by-name/co/corrosion/package.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/by-name/co/corrosion/package.nix b/pkgs/by-name/co/corrosion/package.nix index ce647cbdf350..9c313f9c1882 100644 --- a/pkgs/by-name/co/corrosion/package.nix +++ b/pkgs/by-name/co/corrosion/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cargo, cmake, rustc, @@ -18,6 +19,14 @@ stdenv.mkDerivation (finalAttrs: { rev = "v${finalAttrs.version}"; hash = "sha256-ppuDNObfKhneD9AlnPAvyCRHKW3BidXKglD1j/LE9CM="; }; + patches = [ + # Fix for this hard to debug issue in dependent packages: + # https://github.com/corrosion-rs/corrosion/issues/588 + (fetchpatch { + url = "https://github.com/corrosion-rs/corrosion/commit/7dab832903ddfb0f644cbd014252d477e692012b.patch"; + hash = "sha256-T9ILTfAd/i63v45YJQsz8F/P3NBwrP1mL2bKNU0NaLw="; + }) + ]; buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; From ebe133d0c583282fd34eaa59ab3883516d1b3006 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 18 Jun 2026 17:20:59 +0300 Subject: [PATCH 2/2] katvan: init at 0.12.1 https://github.com/IgKh/katvan Assisted-by: nix-init --- pkgs/by-name/ka/katvan/package.nix | 99 ++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 pkgs/by-name/ka/katvan/package.nix diff --git a/pkgs/by-name/ka/katvan/package.nix b/pkgs/by-name/ka/katvan/package.nix new file mode 100644 index 000000000000..371d8880ca77 --- /dev/null +++ b/pkgs/by-name/ka/katvan/package.nix @@ -0,0 +1,99 @@ +{ + lib, + stdenv, + fetchFromGitHub, + + # nativeBuildInputs + cmake, + pkg-config, + python3, + rustPlatform, + rustc, + cargo, + + # buildInputs + qt6, + libarchive, + corrosion, + hunspell, + + # checkInputs + gtest, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "katvan"; + version = "0.12.1"; + __structuredAttrs = true; + strictDeps = true; + + src = fetchFromGitHub { + owner = "IgKh"; + repo = "katvan"; + tag = "v${finalAttrs.version}"; + hash = "sha256-WyPiRj/5So/1vjAytnXoldwYMG++tuLl0B0v31BeJxY="; + }; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit (finalAttrs) + pname + version + src + cargoRoot + ; + hash = "sha256-p5cMFCuDy17uMoy99R8l+e6iQcbNXSavFj0sBRRsMwo="; + }; + + # The CMakeLists files used by upstream issue a `cargo install` command to + # install a rust tool (cxxbridge-cmd) that is supposed to be included in the Cargo.toml's and + # `Cargo.lock` files of upstream. Setting CARGO_HOME like that helps `cargo + # install` find the dependencies we prefetched. See also: + # https://github.com/GothenburgBitFactory/taskwarrior/issues/3705 + postUnpack = '' + export CARGO_HOME=$PWD/.cargo + ''; + + cargoRoot = "typstdriver/rust"; + + nativeBuildInputs = [ + cmake + pkg-config + qt6.wrapQtAppsHook + qt6.qttools + rustPlatform.cargoSetupHook + rustc + cargo + (python3.withPackages (ps: [ + ps.mistletoe + ])) + ]; + + buildInputs = [ + qt6.qtbase + libarchive + corrosion + hunspell + ]; + + checkInputs = [ + gtest + ]; + + cmakeFlags = [ + # Don't set this to an absolute path, as it breaks upstream rpath settings + # for the final executable, see: https://github.com/IgKh/katvan/issues/46 + (lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib") + ]; + + doCheck = true; + + meta = { + description = "bare-bones editor for Typst files, with a bias for Right-to-Left editing"; + homepage = "https://github.com/IgKh/katvan"; + changelog = "https://github.com/IgKh/katvan/blob/${finalAttrs.src.tag}/CHANGELOG.md"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ doronbehar ]; + mainProgram = "katvan"; + platforms = lib.platforms.all; + }; +})