From d1c2006e24ea9660107c59a9f3952e4bc439be30 Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Tue, 10 Jun 2025 15:54:54 +0800 Subject: [PATCH] pkgs: Improve packaging functions to facilitate input override --- pkgs/pinentry-selector.nix | 9 ++++++--- pkgs/radicle-explorer.nix | 4 ++-- pkgs/spotifyx.nix | 14 +++++++++----- pkgs/wshowkeys-mao.nix | 4 ++-- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/pkgs/pinentry-selector.nix b/pkgs/pinentry-selector.nix index d44c418..e4825ef 100644 --- a/pkgs/pinentry-selector.nix +++ b/pkgs/pinentry-selector.nix @@ -1,7 +1,10 @@ -{pkgs}: -pkgs.writeShellApplication { +{ + writeShellApplication, + pinentry-all, +}: +writeShellApplication { name = "pinentry"; - runtimeInputs = with pkgs; [ + runtimeInputs = [ pinentry-all ]; text = '' diff --git a/pkgs/radicle-explorer.nix b/pkgs/radicle-explorer.nix index 790cd47..56cbdfc 100644 --- a/pkgs/radicle-explorer.nix +++ b/pkgs/radicle-explorer.nix @@ -1,8 +1,8 @@ { - pkgs, + radicle-explorer, rootPath, }: -(pkgs.radicle-explorer.withConfig { +(radicle-explorer.withConfig { preferredSeeds = [ { hostname = "seed.youthlic.fun"; diff --git a/pkgs/spotifyx.nix b/pkgs/spotifyx.nix index 0718727..d15bb46 100644 --- a/pkgs/spotifyx.nix +++ b/pkgs/spotifyx.nix @@ -1,16 +1,20 @@ { - pkgs, + spotify, + unzip, + zip, + perl, + symlinkJoin, srcs, }: let inherit (srcs) spotx; - spotifyx = pkgs.spotify.overrideAttrs (final: prev: { + spotifyx = spotify.overrideAttrs (final: prev: { nativeBuildInputs = prev.nativeBuildInputs - ++ (with pkgs; [ + ++ [ unzip zip perl - ]); + ]; spotx = spotx.src; postUnpack = '' cp $spotx/spotx.sh ./spotx.sh @@ -22,7 +26,7 @@ ''; }); in - pkgs.symlinkJoin { + symlinkJoin { name = "spotifyx"; paths = [spotifyx]; } diff --git a/pkgs/wshowkeys-mao.nix b/pkgs/wshowkeys-mao.nix index aff1b83..f9049f8 100644 --- a/pkgs/wshowkeys-mao.nix +++ b/pkgs/wshowkeys-mao.nix @@ -1,10 +1,10 @@ { - pkgs, srcs, + wshowkeys, }: let inherit (srcs) wshowkeys-mao; in - pkgs.wshowkeys.overrideAttrs (final: prev: { + wshowkeys.overrideAttrs (final: prev: { inherit (wshowkeys-mao) src; pname = "wshowkeys-mao"; version = wshowkeys-mao.date + "-" + wshowkeys-mao.version;