diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..92849ed --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,12 @@ +[build] +rustflags = [ + "-Clink-arg=-fuse-ld=lld", + "-Crelocation-model=static", +] + +[target.aarch64-unknown-linux-musl] +rustflags = [ + "-Clink-arg=-fuse-ld=lld", + "-Crelocation-model=static", + "-Clink-arg=-lgcc", +] diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 03dd284..9d869b7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -18,16 +18,13 @@ jobs: systems: - nix-system: x86_64-linux system: X64-Linux - runner: ubuntu-22.04 + runner: UbuntuLatest32Cores128G - nix-system: aarch64-linux system: ARM64-Linux - runner: namespace-profile-default-arm64 - - nix-system: x86_64-darwin - system: X64-macOS - runner: macos-latest-xlarge + runner: UbuntuLatest32Cores128GArm - nix-system: aarch64-darwin system: ARM64-macOS - runner: macos-latest-xlarge + runner: namespace-profile-mac-m2-12c28g steps: - uses: actions/checkout@v4 - name: Install Nix on ${{ matrix.systems.system }} diff --git a/.github/workflows/check-and-test.yaml b/.github/workflows/check-and-test.yaml index f098ed3..a92244b 100644 --- a/.github/workflows/check-and-test.yaml +++ b/.github/workflows/check-and-test.yaml @@ -51,8 +51,6 @@ jobs: runner: ubuntu-22.04 - system: ARM64-Linux runner: namespace-profile-default-arm64 - - system: X64-macOS - runner: macos-latest-xlarge - system: ARM64-macOS runner: macos-latest-xlarge permissions: diff --git a/.github/workflows/release-branches.yml b/.github/workflows/release-branches.yml index 66018a9..9681a5f 100644 --- a/.github/workflows/release-branches.yml +++ b/.github/workflows/release-branches.yml @@ -39,13 +39,6 @@ jobs: - name: Persist the cache binary run: cp ./cache-binary-ARM64-macOS/magic-nix-cache.closure.xz ./artifacts/ARM64-macOS - - uses: actions/download-artifact@v4.1.8 - with: - name: magic-nix-cache-X64-macOS - path: cache-binary-X64-macOS - - name: Persist the cache binary - run: cp ./cache-binary-X64-macOS/magic-nix-cache.closure.xz ./artifacts/X64-macOS - - uses: actions/download-artifact@v4.1.8 with: name: magic-nix-cache-X64-Linux diff --git a/.github/workflows/release-prs.yml b/.github/workflows/release-prs.yml index 71b6cd9..ff71918 100644 --- a/.github/workflows/release-prs.yml +++ b/.github/workflows/release-prs.yml @@ -43,13 +43,6 @@ jobs: - name: Persist the cache binary run: cp ./cache-binary-ARM64-macOS/magic-nix-cache.closure.xz ./artifacts/ARM64-macOS - - uses: actions/download-artifact@v4.1.8 - with: - name: magic-nix-cache-X64-macOS - path: cache-binary-X64-macOS - - name: Persist the cache binary - run: cp ./cache-binary-X64-macOS/magic-nix-cache.closure.xz ./artifacts/X64-macOS - - uses: actions/download-artifact@v4.1.8 with: name: magic-nix-cache-X64-Linux diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml index 4c5d280..59ebe59 100644 --- a/.github/workflows/release-tags.yml +++ b/.github/workflows/release-tags.yml @@ -31,13 +31,6 @@ jobs: - name: Persist the cache binary run: cp ./cache-binary-ARM64-macOS/magic-nix-cache.closure.xz ./artifacts/ARM64-macOS - - uses: actions/download-artifact@v4.1.8 - with: - name: magic-nix-cache-X64-macOS - path: cache-binary-X64-macOS - - name: Persist the cache binary - run: cp ./cache-binary-X64-macOS/magic-nix-cache.closure.xz ./artifacts/X64-macOS - - uses: actions/download-artifact@v4.1.8 with: name: magic-nix-cache-X64-Linux @@ -63,7 +56,6 @@ jobs: - name: Rename binaries for GH release run: | mv ./artifacts/{,magic-nix-cache-closure-}ARM64-macOS - mv ./artifacts/{,magic-nix-cache-closure-}X64-macOS mv ./artifacts/{,magic-nix-cache-closure-}X64-Linux mv ./artifacts/{,magic-nix-cache-closure-}ARM64-Linux diff --git a/Cargo.lock b/Cargo.lock index 093b28c..f0448b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -241,7 +241,7 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "attic" version = "0.1.0" -source = "git+https://github.com/DeterminateSystems/attic?branch=fixups-for-magic-nix-cache#f789ed4a186e136ea938c28551eaaf8081cc4496" +source = "git+https://github.com/DeterminateSystems/attic?branch=fixups-for-magic-nix-cache#83c742229584d4bfc8106b7a1fc4b64ea02c30f1" dependencies = [ "async-stream", "base64 0.22.1", @@ -258,6 +258,7 @@ dependencies = [ "nix-base32", "regex", "serde", + "serde_json", "serde_with", "serde_yaml", "sha2", @@ -272,7 +273,7 @@ dependencies = [ [[package]] name = "attic-client" version = "0.1.0" -source = "git+https://github.com/DeterminateSystems/attic?branch=fixups-for-magic-nix-cache#f789ed4a186e136ea938c28551eaaf8081cc4496" +source = "git+https://github.com/DeterminateSystems/attic?branch=fixups-for-magic-nix-cache#83c742229584d4bfc8106b7a1fc4b64ea02c30f1" dependencies = [ "anyhow", "async-channel", @@ -294,7 +295,7 @@ dependencies = [ "serde", "serde_json", "tokio", - "toml", + "toml 0.8.23", "tracing", "tracing-subscriber", "xdg 2.5.2", @@ -303,7 +304,7 @@ dependencies = [ [[package]] name = "attic-server" version = "0.1.0" -source = "git+https://github.com/DeterminateSystems/attic?branch=fixups-for-magic-nix-cache#f789ed4a186e136ea938c28551eaaf8081cc4496" +source = "git+https://github.com/DeterminateSystems/attic?branch=fixups-for-magic-nix-cache#83c742229584d4bfc8106b7a1fc4b64ea02c30f1" dependencies = [ "anyhow", "async-compression", @@ -343,7 +344,7 @@ dependencies = [ "sha2", "tokio", "tokio-util", - "toml", + "toml 0.8.23", "tower-http 0.5.2", "tracing", "tracing-error", @@ -355,7 +356,7 @@ dependencies = [ [[package]] name = "attic-token" version = "0.1.0" -source = "git+https://github.com/DeterminateSystems/attic?branch=fixups-for-magic-nix-cache#f789ed4a186e136ea938c28551eaaf8081cc4496" +source = "git+https://github.com/DeterminateSystems/attic?branch=fixups-for-magic-nix-cache#83c742229584d4bfc8106b7a1fc4b64ea02c30f1" dependencies = [ "attic", "base64 0.22.1", @@ -4972,6 +4973,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -5518,14 +5528,13 @@ dependencies = [ [[package]] name = "system-deps" -version = "7.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4be53aa0cba896d2dc615bd42bbc130acdcffa239e0a2d965ea5b3b2a86ffdb" +version = "7.0.7" +source = "git+https://github.com/DeterminateSystems/system-deps?branch=support-link_files#ba1c1f4e758eb99e6604df7885ac51ac59d0048c" dependencies = [ "cfg-expr", "heck 0.5.0", "pkg-config", - "toml", + "toml 0.9.5", "version-compare", ] @@ -5778,11 +5787,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", - "serde_spanned", - "toml_datetime", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", "toml_edit", ] +[[package]] +name = "toml" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" +dependencies = [ + "indexmap 2.11.0", + "serde", + "serde_spanned 1.0.0", + "toml_datetime 0.7.0", + "toml_parser", + "toml_writer", + "winnow", +] + [[package]] name = "toml_datetime" version = "0.6.11" @@ -5792,6 +5816,15 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" +dependencies = [ + "serde", +] + [[package]] name = "toml_edit" version = "0.22.27" @@ -5800,18 +5833,33 @@ checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap 2.11.0", "serde", - "serde_spanned", - "toml_datetime", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", "toml_write", "winnow", ] +[[package]] +name = "toml_parser" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +dependencies = [ + "winnow", +] + [[package]] name = "toml_write" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" +[[package]] +name = "toml_writer" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" + [[package]] name = "tonic" version = "0.10.2" diff --git a/flake.lock b/flake.lock index 4396f8d..115a1c1 100644 --- a/flake.lock +++ b/flake.lock @@ -2,12 +2,12 @@ "nodes": { "crane": { "locked": { - "lastModified": 1766774972, - "narHash": "sha256-8qxEFpj4dVmIuPn9j9z6NTbU+hrcGjBOvaxTzre5HmM=", - "rev": "01bc1d404a51a0a07e9d8759cd50a7903e218c82", - "revCount": 794, + "lastModified": 1768319649, + "narHash": "sha256-VFkNyxHxkqGp8gf8kfFMW1j6XeBy609kv6TE9uF/0Js=", + "rev": "4b6527687cfd20da3c2ef8287e01b74c2d6c705b", + "revCount": 798, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/ipetkov/crane/0.22.0/019b5c0a-2426-7f76-9483-6c098deea0f1/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/ipetkov/crane/0.23.0/019bb818-93a1-7efd-a881-7420c5d6d4e6/source.tar.gz" }, "original": { "type": "tarball", @@ -17,11 +17,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -38,53 +38,44 @@ ] }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", - "type": "github" + "lastModified": 1748821116, + "narHash": "sha256-F82+gS044J1APL0n4hH50GYdPRv/5JWm34oCJYmVKdE=", + "rev": "49f0870db23e8c1ca0b5259734a02cd9e1e371a1", + "revCount": 377, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/hercules-ci/flake-parts/0.1.377%2Brev-49f0870db23e8c1ca0b5259734a02cd9e1e371a1/01972f28-554a-73f8-91f4-d488cc502f08/source.tar.gz" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/hercules-ci/flake-parts/0.1" } }, "git-hooks-nix": { "inputs": { - "flake-compat": [ - "nix" - ], + "flake-compat": "flake-compat", "gitignore": [ "nix" ], "nixpkgs": [ "nix", "nixpkgs" - ], - "nixpkgs-stable": [ - "nix", - "nixpkgs" ] }, "locked": { - "lastModified": 1734279981, - "narHash": "sha256-NdaCraHPp8iYMWzdXAt5Nv6sA3MUzlCiGiR586TCwo0=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "aa9f40c906904ebd83da78e7f328cd8aeaeae785", - "type": "github" + "lastModified": 1747372754, + "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", + "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", + "revCount": 1026, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/cachix/git-hooks.nix/0.1.1026%2Brev-80479b6ec16fefd9c1db3ea13aeb038c60530f46/0196d79a-1b35-7b8e-a021-c894fb62163d/source.tar.gz" }, "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/cachix/git-hooks.nix/0.1.941" } }, "nix": { "inputs": { - "flake-compat": "flake-compat", "flake-parts": "flake-parts", "git-hooks-nix": "git-hooks-nix", "nixpkgs": "nixpkgs", @@ -92,32 +83,30 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1742824067, - "narHash": "sha256-rBPulEBpn4IiqkPsetuh7BRzT2iGCzZYnogTAsbrvhU=", - "rev": "9cb662df7442a1e2c4600fb8ecb2ad613ebc5a95", - "revCount": 19496, + "lastModified": 1771010067, + "narHash": "sha256-Itk88UC3CxjGjjAb20KI6KrM9tRoGEpbv996fXwAWGo=", + "rev": "5c670e37e884c43e1da0405075c9b9c83d316a6c", + "revCount": 24629, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nix/2.27.1/0195c8c5-1964-7a31-b025-ebf9bfeef991/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.16.0/019c589d-45e9-7337-9ff0-a8d78fecf63f/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/%3D2.27.%2A" + "url": "https://flakehub.com/f/DeterminateSystems/nix-src/%3D3.16.%2A" } }, "nixpkgs": { "locked": { - "lastModified": 1734359947, - "narHash": "sha256-1Noao/H+N8nFB4Beoy8fgwrcOQLVm9o4zKW1ODaqK9E=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "48d12d5e70ee91fe8481378e540433a7303dbf6a", - "type": "github" + "lastModified": 1761597516, + "narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=", + "rev": "daf6dc47aa4b44791372d6139ab7b25269184d55", + "revCount": 811874, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.811874%2Brev-daf6dc47aa4b44791372d6139ab7b25269184d55/019a3494-3498-707e-9086-1fb81badc7fe/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "release-24.11", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.2505" } }, "nixpkgs-23-11": { @@ -154,12 +143,12 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1767379071, - "narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=", - "rev": "fb7944c166a3b630f177938e478f0378e64ce108", - "revCount": 921484, + "lastModified": 1770562336, + "narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=", + "rev": "d6c71932130818840fc8fe9509cf50be8c64634f", + "revCount": 942779, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.921484%2Brev-fb7944c166a3b630f177938e478f0378e64ce108/019b84e0-82f8-7204-a1a2-bfd69a1af2b2/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.942779%2Brev-d6c71932130818840fc8fe9509cf50be8c64634f/019c3fb4-003d-710c-9b72-1d2bb1b28de3/source.tar.gz" }, "original": { "type": "tarball", diff --git a/flake.nix b/flake.nix index 46c6321..e130ac0 100644 --- a/flake.nix +++ b/flake.nix @@ -6,121 +6,151 @@ crane.url = "https://flakehub.com/f/ipetkov/crane/*"; - nix.url = "https://flakehub.com/f/NixOS/nix/=2.27.*"; + nix.url = "https://flakehub.com/f/DeterminateSystems/nix-src/=3.16.*"; }; - outputs = inputs: + outputs = + inputs: let supportedSystems = [ "aarch64-linux" "x86_64-linux" "aarch64-darwin" - "x86_64-darwin" ]; - forEachSupportedSystem = f: inputs.nixpkgs.lib.genAttrs supportedSystems (system: f rec { - pkgs = import inputs.nixpkgs { - inherit system; - overlays = [ - inputs.self.overlays.default - ]; - }; - inherit system; - }); + forEachSupportedSystem = + f: + inputs.nixpkgs.lib.genAttrs supportedSystems ( + system: + f rec { + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ + ]; + }; + inherit system; + } + ); in { - overlays.default = final: prev: - let - craneLib = inputs.crane.mkLib final; + packages = forEachSupportedSystem ( + { pkgs, system, ... }: + let + pkgs' = pkgs.pkgsStatic; + craneLib = inputs.crane.mkLib pkgs'; crateName = craneLib.crateNameFromCargoToml { cargoToml = ./magic-nix-cache/Cargo.toml; }; + rustTargetSpec = pkgs'.stdenv.hostPlatform.rust.rustcTargetSpec; + rustTargetSpecEnv = pkgs'.lib.toUpper (builtins.replaceStrings [ "-" ] [ "_" ] rustTargetSpec); + commonArgs = { inherit (crateName) pname version; src = inputs.self; - nativeBuildInputs = with final; [ + depsBuildBuild = with pkgs'; [ + buildPackages.stdenv.cc + lld + ]; + + nativeBuildInputs = with pkgs'; [ pkg-config protobuf ]; buildInputs = [ - inputs.nix.packages.${final.stdenv.system}.default - final.boost + inputs.nix.packages.${system}.nix-util-static + inputs.nix.packages.${system}.nix-store-static + inputs.nix.packages.${system}.nix-main-static + inputs.nix.packages.${system}.nix-expr-static + pkgs'.boost ]; + + doIncludeCrossToolchainEnv = false; + + env.CARGO_BUILD_TARGET = rustTargetSpec; + env."CARGO_TARGET_${rustTargetSpecEnv}_LINKER" = "${pkgs'.stdenv.cc.targetPrefix}cc"; }; cargoArtifacts = craneLib.buildDepsOnly commonArgs; - in - { - magic-nix-cache = craneLib.buildPackage (commonArgs // { - inherit cargoArtifacts; - }); - }; - - packages = forEachSupportedSystem ({ pkgs, ... }: rec { - magic-nix-cache = pkgs.magic-nix-cache; - default = magic-nix-cache; - - veryLongChain = - let - ctx = ./README.md; - - # Function to write the current date to a file - startFile = - pkgs.stdenv.mkDerivation { + in + rec { + magic-nix-cache = craneLib.buildPackage ( + commonArgs + // { + inherit cargoArtifacts; + } + ); + + default = magic-nix-cache; + + veryLongChain = + let + ctx = ./README.md; + + # Function to write the current date to a file + startFile = pkgs.stdenv.mkDerivation { name = "start-file"; buildCommand = '' cat ${ctx} > $out ''; }; - # Recursive function to create a chain of derivations - createChain = n: startFile: - pkgs.stdenv.mkDerivation { - name = "chain-${toString n}"; - src = - if n == 0 then - startFile - else createChain (n - 1) startFile; - buildCommand = '' - echo $src > $out - ''; - }; - - in - # Starting point of the chain - createChain 200 startFile; - }); - - devShells = forEachSupportedSystem ({ system, pkgs }: { - default = pkgs.mkShell { - packages = with pkgs; [ - rustc - cargo - clippy - rustfmt - rust-analyzer - - inputs.nix.packages.${stdenv.system}.default # for linking attic - boost # for linking attic - protobuf # for protoc/prost - bashInteractive - pkg-config - - cargo-bloat - cargo-edit - cargo-udeps - cargo-watch - bacon - - age - ]; - - RUST_SRC_PATH = "${pkgs.rustPlatform.rustcSrc}/library"; - }; - }); + # Recursive function to create a chain of derivations + createChain = + n: startFile: + pkgs.stdenv.mkDerivation { + name = "chain-${toString n}"; + src = if n == 0 then startFile else createChain (n - 1) startFile; + buildCommand = '' + echo $src > $out + ''; + }; + + in + # Starting point of the chain + createChain 200 startFile; + } + ); + + devShells = forEachSupportedSystem ( + { system, pkgs }: + let + pkgs' = pkgs.pkgsStatic; + rustTargetSpec = pkgs'.stdenv.hostPlatform.rust.rustcTargetSpec; + rustTargetSpecEnv = pkgs'.lib.toUpper (builtins.replaceStrings [ "-" ] [ "_" ] rustTargetSpec); + in + { + default = pkgs'.mkShell { + env.CARGO_BUILD_TARGET = rustTargetSpec; + env."CARGO_TARGET_${rustTargetSpecEnv}_LINKER" = "${pkgs'.stdenv.cc.targetPrefix}cc"; + env.RUST_SRC_PATH = "${pkgs.rustPlatform.rustcSrc}/library"; + + inputsFrom = [ inputs.self.packages.${system}.default ]; + + packages = with pkgs; [ + bashInteractive + + pkgs'.rustc + cargo + pkgs'.clippy + rustfmt + rust-analyzer + + protobuf # for protoc/prost + + cargo-bloat + cargo-edit + cargo-udeps + cargo-watch + bacon + + age + ]; + }; + } + ); }; } diff --git a/magic-nix-cache/src/gha.rs b/magic-nix-cache/src/gha.rs index dced953..3f783cc 100644 --- a/magic-nix-cache/src/gha.rs +++ b/magic-nix-cache/src/gha.rs @@ -248,5 +248,9 @@ fn path_info_to_nar_info(store: Arc, path_info: &ValidPathInfo, url: S deriver: None, signature: None, ca: path_info.ca.clone(), + provenance: path_info + .provenance + .as_ref() + .and_then(|v| serde_json::to_string(v).ok()), } }