From e0a79abdac78c8d510d1c2e72b2e537115db7caa Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Fri, 5 Jan 2024 10:05:16 +0100 Subject: [PATCH] nix: move vendorHash into builder So we can update it using nix-update Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- flake.nix | 4 ++-- packages/default.nix | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 21fa9e2dc..806de036c 100644 --- a/flake.nix +++ b/flake.nix @@ -23,12 +23,12 @@ pkgs = import nixpkgs { inherit system; }; inherit (pkgs) lib; - goVendorHash = "sha256-7ibre61H0pz+2o3DtisSEXNirlX9DE9XUBe+gUI8+kg="; + version = "0.0.0-devel"; treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix; in { - packages = import ./packages { inherit pkgs goVendorHash; }; + packages = import ./packages { inherit pkgs version; }; devShells.default = pkgs.mkShell { packages = with pkgs; [ just ]; diff --git a/packages/default.nix b/packages/default.nix index 2945dff20..0144b6b9b 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,5 +1,5 @@ { pkgs -, goVendorHash +, version }: with pkgs; @@ -16,6 +16,7 @@ let # Builder function for Go packages of our local module. buildGoSubPackage = subpackage: attrs: callPackage ({ buildGoModule }: buildGoModule ({ + inherit version; name = subpackage; src = lib.fileset.toSource { root = ../.; @@ -25,7 +26,7 @@ let CGO_ENABLED = 0; ldflags = [ "-s" "-w" "-buildid=" ]; proxyVendor = true; - vendorHash = goVendorHash; + vendorHash = "sha256-7ibre61H0pz+2o3DtisSEXNirlX9DE9XUBe+gUI8+kg="; checkPhase = '' runHook preCheck