From 6451f188b16827ff44ec1d4688dfc53b9424c85e Mon Sep 17 00:00:00 2001 From: Leona Maroni Date: Wed, 4 Dec 2024 16:42:06 +0100 Subject: [PATCH] move package-, version update scripts to flake apps This is to support the update-nixpkgs workflow without a devenv shell. --- flake.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index f96f05c27..f5ca3a28a 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,19 @@ }; }; + apps.buildVersionsJson = { + type = "app"; + program = "${pkgs.writeShellScript "update-versions-json" '' + jq < $(nix build .#versionsJson --print-out-paths) > release/versions.json + ''}"; + }; + apps.buildPackageVersionsJson = { + type = "app"; + program = "${pkgs.writeShellScript "update-package-versions-json" '' + jq < $(nix build .#packageVersions --print-out-paths) > release/package-versions.json + ''}"; + }; + packages = { # These are packages that work on all systems. # Also see release/flake-part-linux-only-packages.nix @@ -153,11 +166,11 @@ # only build this script on Linux. It just produces an error # message on Non-Linux because packageVersions is missing. build_package_versions_json.exec = '' - jq < $(nix build .#packageVersions --print-out-paths) > release/package-versions.json + nix run .#buildPackageVersionsJson ''; build_versions_json.exec = '' - jq < $(nix build .#versionsJson --print-out-paths) > release/versions.json + nix run .#buildVersionsJson ''; build_channels_dir.exec = ''