From b49c9e63d98d753c30ef3361474eb3a763c88abd Mon Sep 17 00:00:00 2001 From: "Markus S. Wamser" Date: Fri, 26 Apr 2024 22:09:51 +0200 Subject: [PATCH] do not create a fresh instance of nixpkgs Reuse the passed instance of nixpkgs instead of re-evaluating and creating a new instance. See zimbatm's "1000 instances of nixpkgs" for backround info. --- flake.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 49099e91..c9e02e70 100644 --- a/flake.nix +++ b/flake.nix @@ -13,13 +13,13 @@ # provide db-package for all archs, but scaper/test only for most common (utils.lib.eachSystem utils.lib.allSystems (system: let - pkgs = import nixpkgs { inherit system; }; + pkgs = nixpkgs.legacyPackages.${system}; in nixpkgs.lib.recursiveUpdate (nixpkgs.lib.optionalAttrs (builtins.elem system utils.lib.defaultSystems) rec { packages.updater = pkgs.callPackage ./updater.nix {}; apps.updater = { type = "app"; program = "${packages.updater}/bin/updater";}; - devShell = with pkgs; mkShell { + devShells.default = with pkgs; mkShell { buildInputs = [ nim nimble-unwrapped nimlsp ]; }; checks.vmtest = import ./test.nix { inherit pkgs; flake = self; }; # nixpkgs must be set to a revision present in the JSON file @@ -33,4 +33,4 @@ { nixosModules.programs-sqlite = pass@{ pkgs, ... }: (import ./module.nix { programs-sqlite = (getDB pkgs); }) pass; }; -} \ No newline at end of file +}