From 387b49a8b590ed486c74cea9fb26a7174373b21c Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 27 Sep 2023 19:09:29 +0000 Subject: [PATCH] flake.nix: support list-type updateScripts (e.g. `nix-update-script {}`) --- flake.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 9d3ce411..7aecba55 100644 --- a/flake.nix +++ b/flake.nix @@ -271,7 +271,8 @@ program = let pkg = pkgs.lib.getAttrFromPath attrPath sanePkgs; strAttrPath = pkgs.lib.concatStringsSep "." attrPath; - command = pkgs.lib.escapeShellArgs pkg.updateScript.command; + commandArgv = pkg.updateScript.command or pkg.updateScript; + command = pkgs.lib.escapeShellArgs commandArgv; in builtins.toString (pkgs.writeShellScript "update-${strAttrPath}" '' export UPDATE_NIX_NAME=${pkg.name} export UPDATE_NIX_PNAME=${pkg.pname}