Skip to content

Commit 942b6b0

Browse files
authored
Merge pull request #129 from DeterminateSystems/update-flake-lock
Update flake.lock and add update-flake-lock support
2 parents 582930b + 80600ec commit 942b6b0

File tree

3 files changed

+40
-24
lines changed

3 files changed

+40
-24
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: update-flake-lock
2+
3+
on:
4+
workflow_dispatch: # enable manual triggering
5+
schedule:
6+
- cron: "0 0 * * 0" # every Sunday at midnight
7+
8+
jobs:
9+
lockfile:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: DeterminateSystems/nix-installer-action@main
14+
- uses: DeterminateSystems/flakehub-cache-action@main
15+
- uses: DeterminateSystems/update-flake-lock@main
16+
with:
17+
pr-title: Update flake.lock
18+
pr-labels: |
19+
dependencies
20+
automated

flake.lock

Lines changed: 10 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
description = "GitHub Actions-powered Nix binary cache";
33

44
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";
66

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/*";
108

11-
nix.url = "https://flakehub.com/f/NixOS/nix/2.tar.gz";
9+
nix.url = "https://flakehub.com/f/NixOS/nix/2";
1210
};
1311

14-
outputs = { self, nixpkgs, crane, ... }@inputs:
12+
outputs = inputs:
1513
let
1614
supportedSystems = [
1715
"aarch64-linux"
@@ -20,29 +18,28 @@
2018
"x86_64-darwin"
2119
];
2220

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 {
2523
inherit system;
2624
overlays = [
27-
self.overlays.default
25+
inputs.self.overlays.default
2826
];
2927
};
30-
inherit (pkgs) lib;
3128
inherit system;
3229
});
3330
in
3431
{
3532

3633
overlays.default = final: prev:
3734
let
38-
craneLib = crane.mkLib final;
35+
craneLib = inputs.crane.mkLib final;
3936
crateName = craneLib.crateNameFromCargoToml {
4037
cargoToml = ./magic-nix-cache/Cargo.toml;
4138
};
4239

4340
commonArgs = {
4441
inherit (crateName) pname version;
45-
src = self;
42+
src = inputs.self;
4643

4744
nativeBuildInputs = with final; [
4845
pkg-config
@@ -97,7 +94,7 @@
9794
createChain 200 startFile;
9895
});
9996

100-
devShells = forEachSupportedSystem ({ system, pkgs, lib }: {
97+
devShells = forEachSupportedSystem ({ system, pkgs }: {
10198
default = pkgs.mkShell {
10299
packages = with pkgs; [
103100
rustc

0 commit comments

Comments
 (0)