[Backport release-25.05] nixos/stash: fix empty immutable plugins (#412802)

This commit is contained in:
Peder Bergebakken Sundt 2025-06-02 00:53:53 +02:00 committed by GitHub
commit c209086813
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -167,7 +167,7 @@ let
presets.recentlyAddedImages
]
'';
apply = type: if builtins.isFunction type then (type uiPresets) else type;
apply = type: if lib.isFunction type then (type uiPresets) else type;
};
blobs_path = mkOption {
type = types.path;
@ -324,7 +324,6 @@ let
'';
apply =
srcs:
optionalString (srcs != [ ]) (
pkgs.runCommand "stash-${kind}"
{
inherit srcs;
@ -332,6 +331,8 @@ let
preferLocalBuild = true;
}
''
mkdir -p $out
touch $out/.keep
find $srcs -mindepth 1 -name '*.yml' | while read plugin_file; do
grep -q "^#pkgignore" "$plugin_file" && continue
@ -363,8 +364,7 @@ let
.files = (strenv(plugin_files) | split("\n"))
' > $out_path/manifest
done
''
);
'';
};
in
{