]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Provide non-flake hermetic shell by pinning nixpkgs (#23368)
authorIoannis Eleftheriou <me@yath.xyz>
Sat, 6 Jan 2024 08:07:08 +0000 (08:07 +0000)
committerGitHub <noreply@github.com>
Sat, 6 Jan 2024 08:07:08 +0000 (00:07 -0800)
Provide non-flake solution by pinning in shell.nix

Invoking `nix-shell` makes shell.nix not consume the flake. Importing
`<nixpkgs>` is dependent on the user's current nixpkgs channel. This is not
reproducible.

Fix this by pinning nixpkgs to the same revision of the flake input.

flake.lock
shell.nix

index dccd6e6b01015f2e72dbb0db59b853e6d8a8fcab..ac32b0c7bcffaab29947771cc2e9d92b5863bcf9 100644 (file)
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1702780907,
-        "narHash": "sha256-blbrBBXjjZt6OKTcYX1jpe9SRof2P9ZYWPzq22tzXAA=",
+        "lastModified": 1704172037,
+        "narHash": "sha256-+IkG0mfxwmaqCd3cGM5zZ2g7wZnPG8mwOQHXCsKhc5s=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "1e2e384c5b7c50dbf8e9c441a9e58d85f408b01f",
+        "rev": "3da785eeaad3d604ee3bccc0a3f07bfd11cb355a",
         "type": "github"
       },
       "original": {
index 9c8fe310feafae78a3c495367d0c2cd6c9d71f9f..153a01ee0eb818c272470bd77756b4fbcce8dde9 100644 (file)
--- a/shell.nix
+++ b/shell.nix
@@ -1,4 +1,8 @@
-{ pkgs ? import <nixpkgs> {} }:
+{ pkgs ? import (builtins.fetchTarball {
+  url =
+    "https://github.com/NixOS/nixpkgs/archive/3da785eeaad3d604ee3bccc0a3f07bfd11cb355a.tar.gz";
+  sha256 = "16vkl710mmq176qcj6ygk70kns37fg71ip6x16m6dhpicz90d2gq";
+}) { } }:
 
 let
   dependencies = with pkgs; [