mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:39:39 +00:00
npins: restore asFlake patch
This commit is contained in:
parent
627888c13f
commit
d2617493e8
1 changed files with 39 additions and 26 deletions
|
|
@ -112,7 +112,18 @@ let
|
|||
else
|
||||
builtins.throw "Unknown source type ${spec.type}";
|
||||
in
|
||||
spec // { outPath = mayOverride name path; };
|
||||
spec
|
||||
// rec {
|
||||
outPath = mayOverride name path;
|
||||
|
||||
# Waiting for discussion upstream
|
||||
# https://github.com/andir/npins/issues/159
|
||||
asFlake =
|
||||
if sources ? flake-compat then
|
||||
(import sources.flake-compat { src = outPath; }).outputs
|
||||
else
|
||||
throw ".asFlake needs flake-compat as a source";
|
||||
};
|
||||
|
||||
mkGitSource =
|
||||
{
|
||||
|
|
@ -221,8 +232,8 @@ let
|
|||
imageDigest = image_digest;
|
||||
finalImageTag = image_tag;
|
||||
};
|
||||
in
|
||||
mkFunctor (
|
||||
|
||||
sources = mkFunctor (
|
||||
{
|
||||
input ? ./sources.json,
|
||||
}:
|
||||
|
|
@ -246,4 +257,6 @@ mkFunctor (
|
|||
builtins.mapAttrs (name: spec: mkFunctor (mkSource name spec)) data.pins
|
||||
else
|
||||
throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`"
|
||||
)
|
||||
);
|
||||
in
|
||||
sources
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue