From d492e6acfe2903a193c383783f589c3ed16fbf3d Mon Sep 17 00:00:00 2001 From: Arbel Arad Date: Sun, 18 Aug 2024 14:02:27 +0300 Subject: [PATCH] added git vendor commands to shell hook --- default.nix | 2 +- flake.nix | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 0a21aaf..c3ffde5 100644 --- a/default.nix +++ b/default.nix @@ -7,7 +7,7 @@ src = self; #zcli; nativeBuildInputs = with pkgs; [ go ]; - vendorHash = "sha256-XRnhK5vakEniRsgeEyBR+8RNwRO92KC9AXXMaYPs7Qc="; + vendorHash = null; installPhase = '' mkdir -p $out/bin diff --git a/flake.nix b/flake.nix index b6281b2..0cdc39a 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,12 @@ perSystem = { config, pkgs, system, ... }: { packages.default = (import ./default.nix { inherit pkgs self; }); devShells.default = pkgs.mkShell { - nativeBuildInputs = with pkgs; [ got ]; + nativeBuildInputs = with pkgs; [ go ]; + shellHook = '' + go mod vendor + git add vendor/. + echo -e '\033[0;33mprepared vendor files\033[0m' + ''; }; }; };