|
2 | 2 | description = "GitHub Actions-powered Nix binary cache"; |
3 | 3 |
|
4 | 4 | inputs = { |
5 | | - nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.tar.gz"; |
| 5 | + nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; |
6 | 6 |
|
7 | | - # Pinned to `master` until a release containing |
8 | | - # <https://github.com/ipetkov/crane/pull/792> is cut. |
9 | | - crane.url = "github:ipetkov/crane"; |
| 7 | + crane.url = "https://flakehub.com/f/ipetkov/crane/*"; |
10 | 8 |
|
11 | | - nix.url = "https://flakehub.com/f/NixOS/nix/2.tar.gz"; |
| 9 | + nix.url = "https://flakehub.com/f/NixOS/nix/2"; |
12 | 10 | }; |
13 | 11 |
|
14 | | - outputs = { self, nixpkgs, crane, ... }@inputs: |
| 12 | + outputs = inputs: |
15 | 13 | let |
16 | 14 | supportedSystems = [ |
17 | 15 | "aarch64-linux" |
|
20 | 18 | "x86_64-darwin" |
21 | 19 | ]; |
22 | 20 |
|
23 | | - forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f rec { |
24 | | - pkgs = import nixpkgs { |
| 21 | + forEachSupportedSystem = f: inputs.nixpkgs.lib.genAttrs supportedSystems (system: f rec { |
| 22 | + pkgs = import inputs.nixpkgs { |
25 | 23 | inherit system; |
26 | 24 | overlays = [ |
27 | | - self.overlays.default |
| 25 | + inputs.self.overlays.default |
28 | 26 | ]; |
29 | 27 | }; |
30 | | - inherit (pkgs) lib; |
31 | 28 | inherit system; |
32 | 29 | }); |
33 | 30 | in |
34 | 31 | { |
35 | 32 |
|
36 | 33 | overlays.default = final: prev: |
37 | 34 | let |
38 | | - craneLib = crane.mkLib final; |
| 35 | + craneLib = inputs.crane.mkLib final; |
39 | 36 | crateName = craneLib.crateNameFromCargoToml { |
40 | 37 | cargoToml = ./magic-nix-cache/Cargo.toml; |
41 | 38 | }; |
42 | 39 |
|
43 | 40 | commonArgs = { |
44 | 41 | inherit (crateName) pname version; |
45 | | - src = self; |
| 42 | + src = inputs.self; |
46 | 43 |
|
47 | 44 | nativeBuildInputs = with final; [ |
48 | 45 | pkg-config |
|
97 | 94 | createChain 200 startFile; |
98 | 95 | }); |
99 | 96 |
|
100 | | - devShells = forEachSupportedSystem ({ system, pkgs, lib }: { |
| 97 | + devShells = forEachSupportedSystem ({ system, pkgs }: { |
101 | 98 | default = pkgs.mkShell { |
102 | 99 | packages = with pkgs; [ |
103 | 100 | rustc |
|
0 commit comments