Skip to content

Commit

Permalink
nix: move vendorHash into builder
Browse files Browse the repository at this point in the history
So we can update it using nix-update

Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Jan 5, 2024
1 parent 7120660 commit e0a79ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
5 changes: 3 additions & 2 deletions packages/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ pkgs
, goVendorHash
, version
}:

with pkgs;
Expand All @@ -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 = ../.;
Expand All @@ -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
Expand Down

0 comments on commit e0a79ab

Please sign in to comment.