From 0128659a82cb2723f6bc29b9794f77a854cc59f7 Mon Sep 17 00:00:00 2001 From: Benjamin Tan Date: Sun, 6 Jun 2021 04:05:41 +0800 Subject: [PATCH] Avoid importing `` if possible --- default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/default.nix b/default.nix index 2dd6d8b..1bdc62e 100644 --- a/default.nix +++ b/default.nix @@ -1,10 +1,11 @@ +{ pkgs ? import {} }: + let - pkgs = import {}; zig-overlay = pkgs.fetchFromGitHub { owner = "arqv"; repo = "zig-overlay"; rev = "5b9504b8bff072553051d6e130727f7f5c0715c3"; - sha256 = "sha256-NDm5qT6/qr789IhI2dsQxrR5/Mr7cXVj17x/+tl3pDE="; + sha256 = "NDm5qT6/qr789IhI2dsQxrR5/Mr7cXVj17x/+tl3pDE="; }; gitignoreSrc = pkgs.fetchFromGitHub { owner = "hercules-ci"; @@ -13,8 +14,8 @@ let sha256 = "1npnx0h6bd0d7ql93ka7azhj40zgjp815fw2r6smg8ch9p7mzdlx"; }; inherit (import gitignoreSrc { inherit (pkgs) lib; }) gitignoreSource; - zig-default = (import zig-overlay { inherit pkgs; }).master.latest; -in { zig ? zig-default, extraConfig ? { } }: + zig = (import zig-overlay {}).master.latest; +in pkgs.stdenvNoCC.mkDerivation { name = "zls"; version = "master";