diff --git a/.github/workflows/update-flake-lock.yaml b/.github/workflows/update-flake-lock.yaml new file mode 100644 index 0000000..2d07d82 --- /dev/null +++ b/.github/workflows/update-flake-lock.yaml @@ -0,0 +1,20 @@ +name: update-flake-lock + +on: + workflow_dispatch: # enable manual triggering + schedule: + - cron: "0 0 * * 0" # every Sunday at midnight + +jobs: + lockfile: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/flakehub-cache-action@main + - uses: DeterminateSystems/update-flake-lock@main + with: + pr-title: Update flake.lock + pr-labels: | + dependencies + automated diff --git a/flake.lock b/flake.lock index a168517..cc40b12 100644 --- a/flake.lock +++ b/flake.lock @@ -2,17 +2,16 @@ "nodes": { "crane": { "locked": { - "lastModified": 1742394900, - "narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=", - "owner": "ipetkov", - "repo": "crane", - "rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd", - "type": "github" + "lastModified": 1741479724, + "narHash": "sha256-fnyETBKSVRa5abjOiRG/IAzKZq5yX8U6oRrHstPl4VM=", + "rev": "60202a2e3597a3d91f5e791aab03f45470a738b5", + "revCount": 709, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/ipetkov/crane/0.20.2/0195784b-915b-7d2d-915d-ab02d1112ef9/source.tar.gz" }, "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/ipetkov/crane/%2A" } }, "flake-compat": { @@ -102,7 +101,7 @@ }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nix/2.tar.gz" + "url": "https://flakehub.com/f/NixOS/nix/2" } }, "nixpkgs": { @@ -164,7 +163,7 @@ }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.tar.gz" + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1" } }, "root": { diff --git a/flake.nix b/flake.nix index 1d40235..e1226f2 100644 --- a/flake.nix +++ b/flake.nix @@ -2,16 +2,14 @@ description = "GitHub Actions-powered Nix binary cache"; inputs = { - nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.tar.gz"; + nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; - # Pinned to `master` until a release containing - # is cut. - crane.url = "github:ipetkov/crane"; + crane.url = "https://flakehub.com/f/ipetkov/crane/*"; - nix.url = "https://flakehub.com/f/NixOS/nix/2.tar.gz"; + nix.url = "https://flakehub.com/f/NixOS/nix/2"; }; - outputs = { self, nixpkgs, crane, ... }@inputs: + outputs = inputs: let supportedSystems = [ "aarch64-linux" @@ -20,14 +18,13 @@ "x86_64-darwin" ]; - forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f rec { - pkgs = import nixpkgs { + forEachSupportedSystem = f: inputs.nixpkgs.lib.genAttrs supportedSystems (system: f rec { + pkgs = import inputs.nixpkgs { inherit system; overlays = [ - self.overlays.default + inputs.self.overlays.default ]; }; - inherit (pkgs) lib; inherit system; }); in @@ -35,14 +32,14 @@ overlays.default = final: prev: let - craneLib = crane.mkLib final; + craneLib = inputs.crane.mkLib final; crateName = craneLib.crateNameFromCargoToml { cargoToml = ./magic-nix-cache/Cargo.toml; }; commonArgs = { inherit (crateName) pname version; - src = self; + src = inputs.self; nativeBuildInputs = with final; [ pkg-config @@ -97,7 +94,7 @@ createChain 200 startFile; }); - devShells = forEachSupportedSystem ({ system, pkgs, lib }: { + devShells = forEachSupportedSystem ({ system, pkgs }: { default = pkgs.mkShell { packages = with pkgs; [ rustc