From 67083cac08c8ab806dec4471a8f2443b82621903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Gro=C3=9Fmann?= Date: Sat, 29 Jul 2023 19:28:33 +0900 Subject: [PATCH] fix: better fix for nix-plugins mismatched nix version --- nix/devshell.nix | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/nix/devshell.nix b/nix/devshell.nix index 1a02ff7..389762c 100644 --- a/nix/devshell.nix +++ b/nix/devshell.nix @@ -45,18 +45,25 @@ in package = update-nix-fetchgit; help = "Update fetcher inside nix files"; } - { - # nix plugins is currently build against nix version 2.16 - # official nix version is 2.15 but if we try to load plugins - # it throws linking errors - package = nixVersions.nix_2_16; - } ]; env = [ { name = "NIX_CONFIG"; + # Nix plugins braucht nix version 2.16 + # Nixpkgs hat aber aktuell 2.15 also main version + # Daher der folgenda hack um zu verhindern das mein NixOS mit einer anderen nix version gebaut wird + # als der intendeten value = '' - plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins + plugin-files = ${(pkgs.nix-plugins.override {inherit (pkgs) nix;}).overrideAttrs rec { + version = "10.0.0"; + + src = pkgs.fetchFromGitHub { + owner = "shlevy"; + repo = "nix-plugins"; + rev = version; + hash = "sha256-7Lo+YxpiRz0+ZLFDvYMJWWK2j0CyPDRoP1wAc+OaPJY="; + }; + }}/lib/nix/plugins extra-builtins-file = ${../nix}/extra-builtins.nix ''; }