1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 22:33:57 +02:00

Formatting

This commit is contained in:
Eelco Dolstra 2025-03-24 22:02:49 +01:00
parent 117d671923
commit 9d0c3dd6a7
2 changed files with 24 additions and 31 deletions

View file

@ -310,16 +310,19 @@
closures = forAllSystems (system: self.packages.${system}.default.outPath);
closures_json = pkgs.runCommand "versions.json"
closures_json =
pkgs.runCommand "versions.json"
{
buildInputs = [ pkgs.jq ];
passAsFile = [ "json" ];
json = builtins.toJSON closures;
} ''
}
''
cat "$jsonPath" | jq . > $out
'';
closures_nix = pkgs.runCommand "versions.nix"
closures_nix =
pkgs.runCommand "versions.nix"
{
buildInputs = [ pkgs.jq ];
passAsFile = [ "template" ];
@ -327,7 +330,8 @@
template = ''
builtins.fromJSON('''@closures@''')
'';
} ''
}
''
export closures=$(cat "$jsonPath");
substituteAll "$templatePath" "$out"
'';

View file

@ -50,17 +50,6 @@ let
exts: userFn: stdenv.mkDerivation (lib.extends (lib.composeManyExtensions exts) userFn);
setVersionLayer = finalAttrs: prevAttrs: {
/*
preConfigure =
prevAttrs.preConfigure or ""
+
# Update the repo-global .version file.
# Symlink ./.version points there, but by default only workDir is writable.
''
chmod u+w ./.version
echo ${finalAttrs.version} > ./.version
'';
*/
};
localSourceLayer =