From 475dda08b50f7a719a18eaa4a197f4dd1cb7b6b4 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Sun, 17 Dec 2023 21:16:43 +0100 Subject: [PATCH] flakes: use stable release branches for `nixpkgs` inputs This is the best practice for Flakes or clients of nixpkgs in general. The `release-` branch is actually a dev branch: Hydra continually tests the tip of this branch. When the tests succeed, the `nixos-` release branch is updated to point to the succeeding commit. `release-` is to `nixos-` what `master` is to `nixpkgs-unstable`. See also: https://github.com/NixOS/nixpkgs/blob/e88fb997e32982a5f37b933583e618265a32d85d/CONTRIBUTING.md#flow-of-merged-pull-requests --- flake.lock | 8 ++++---- flake.nix | 2 +- templates/init/flake.nix | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 1873bfa..7ad0037 100644 --- a/flake.lock +++ b/flake.lock @@ -33,16 +33,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1689088367, - "narHash": "sha256-Y2tl2TlKCWEHrOeM9ivjCLlRAKH3qoPUE/emhZECU14=", + "lastModified": 1702350026, + "narHash": "sha256-A+GNZFZdfl4JdDphYKBJ5Ef1HOiFsP18vQe9mqjmUis=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5c9ddb86679c400d6b7360797b8a22167c2053f8", + "rev": "9463103069725474698139ab10f17a9d125da859", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-23.05", + "ref": "nixos-23.05", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 551f725..b646540 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Zig compiler binaries."; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; flake-utils.url = "github:numtide/flake-utils"; # Used for shell.nix diff --git a/templates/init/flake.nix b/templates/init/flake.nix index 3f04424..869a0f1 100644 --- a/templates/init/flake.nix +++ b/templates/init/flake.nix @@ -2,7 +2,7 @@ description = "An empty project that uses Zig."; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; flake-utils.url = "github:numtide/flake-utils"; zig.url = "github:mitchellh/zig-overlay";