From a5f62e1a28e7cd37807d2bf447dab391e94dbcd2 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Tue, 2 Jun 2026 14:07:54 +0300 Subject: [PATCH] zellij-unwrapped: split out from zellij wrapper Expose the actual rust build as a top-level by-name package and have the wrapper take it as an argument, so overlays can patch or override it without needing to thread the new drv through the wrapper explicitly. --- .../package.nix} | 3 +++ pkgs/by-name/ze/zellij/package.nix | 15 +++------------ 2 files changed, 6 insertions(+), 12 deletions(-) rename pkgs/by-name/ze/{zellij/unwrapped.nix => zellij-unwrapped/package.nix} (96%) diff --git a/pkgs/by-name/ze/zellij/unwrapped.nix b/pkgs/by-name/ze/zellij-unwrapped/package.nix similarity index 96% rename from pkgs/by-name/ze/zellij/unwrapped.nix rename to pkgs/by-name/ze/zellij-unwrapped/package.nix index f691bc5418b2..c0331f24ac59 100644 --- a/pkgs/by-name/ze/zellij/unwrapped.nix +++ b/pkgs/by-name/ze/zellij-unwrapped/package.nix @@ -10,6 +10,7 @@ openssl, writableTmpDirAsHomeHook, versionCheckHook, + nix-update-script, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -76,6 +77,8 @@ rustPlatform.buildRustPackage (finalAttrs: { --zsh <($out/bin/zellij setup --generate-completion zsh) ''; + passthru.updateScript = nix-update-script { }; + meta = { description = "Terminal workspace with batteries included"; homepage = "https://zellij.dev/"; diff --git a/pkgs/by-name/ze/zellij/package.nix b/pkgs/by-name/ze/zellij/package.nix index 32013b52f0ae..38ba70d37b1e 100644 --- a/pkgs/by-name/ze/zellij/package.nix +++ b/pkgs/by-name/ze/zellij/package.nix @@ -1,23 +1,19 @@ { lib, - callPackage, + zellij-unwrapped, makeBinaryWrapper, stdenvNoCC, - nix-update-script, extraPackages ? [ ], }: -let - unwrapped = callPackage ./unwrapped.nix { }; -in stdenvNoCC.mkDerivation { - inherit (unwrapped) version meta; + inherit (zellij-unwrapped) version meta; pname = "zellij"; __structuredAttrs = true; strictDeps = true; - src = unwrapped; + src = zellij-unwrapped; dontUnpack = true; nativeBuildInputs = [ makeBinaryWrapper ]; @@ -27,9 +23,4 @@ stdenvNoCC.mkDerivation { wrapProgram "$out/bin/zellij" \ --prefix PATH : '${lib.makeBinPath extraPackages}' ''; - - passthru = unwrapped.passthru or { } // { - inherit unwrapped; - updateScript = nix-update-script { attrPath = "zellij.unwrapped"; }; - }; }