Revert "typst: Update typst packages in typst update script"
This commit is contained in:
@@ -5,9 +5,7 @@
|
||||
installShellFiles,
|
||||
pkg-config,
|
||||
openssl,
|
||||
writeShellScript,
|
||||
nix-update,
|
||||
gitMinimal,
|
||||
nix-update-script,
|
||||
versionCheckHook,
|
||||
callPackage,
|
||||
}:
|
||||
@@ -62,25 +60,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
versionCheckProgramArg = "--version";
|
||||
|
||||
passthru = {
|
||||
updateScript = {
|
||||
command = [
|
||||
(writeShellScript "update-typst.sh" ''
|
||||
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; typst.version or (lib.getVersion typst)" | tr -d '"')
|
||||
${lib.getExe nix-update} typst > /dev/null
|
||||
latestVersion=$(nix-instantiate --eval -E "with import ./. {}; typst.version or (lib.getVersion typst)" | tr -d '"')
|
||||
changes=()
|
||||
if [[ "$currentVersion" != "$latestVersion" ]]; then
|
||||
changes+=("{\"attrPath\":\"typst\",\"oldVersion\":\"$currentVersion\",\"newVersion\":\"$latestVersion\",\"files\":[\"pkgs/by-name/ty/typst/package.nix\"]}")
|
||||
fi
|
||||
maintainers/scripts/update-typst-packages.py --output pkgs/by-name/ty/typst/typst-packages-from-universe.toml > /dev/null
|
||||
${lib.getExe gitMinimal} diff --quiet HEAD -- pkgs/by-name/ty/typst/typst-packages-from-universe.toml || changes+=("{\"attrPath\":\"typstPackages\",\"oldVersion\":\"0\",\"newVersion\":\"1\",\"files\":[\"pkgs/by-name/ty/typst/typst-packages-from-universe.toml\"]}")
|
||||
echo -n "["
|
||||
IFS=,; echo -n "''${changes[*]}"
|
||||
echo "]"
|
||||
'')
|
||||
];
|
||||
supportedFeatures = [ "commit" ];
|
||||
};
|
||||
updateScript = nix-update-script { };
|
||||
packages = callPackage ./typst-packages.nix { };
|
||||
withPackages = callPackage ./with-packages.nix { };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user