aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs.nix
diff options
context:
space:
mode:
authorjerpo <spleefer6@yandex.ru>2023-08-05 17:26:30 +0500
committerjerpo <spleefer6@yandex.ru>2023-08-05 17:26:30 +0500
commite8ae745437124ee10c4d39ad3ca9a4ba4219add4 (patch)
treed00a8dad7580142a9054c05d22bcc57baa0aed0b /nixpkgs.nix
maybe this will work
Diffstat (limited to 'nixpkgs.nix')
-rw-r--r--nixpkgs.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixpkgs.nix b/nixpkgs.nix
new file mode 100644
index 0000000..041de40
--- /dev/null
+++ b/nixpkgs.nix
@@ -0,0 +1,8 @@
+# A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file
+# This is useful to avoid using channels when using legacy nix commands
+let lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
+in
+import (fetchTarball {
+ url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
+ sha256 = lock.narHash;
+})