From ff73be5f774c81098ca8dc8f68adbf0f2cbb1ea0 Mon Sep 17 00:00:00 2001 From: Hilmar Falkenberg Date: Mon, 14 Oct 2024 14:11:06 +0200 Subject: [PATCH] update nix flake to use go v1.23 --- flake.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 526b00a40e..fa72d9f3ca 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,10 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; }; + elections = callPackage package.nix { + buildGoModule = buildGoModule.override { go = go_1_23; }; + }; + outputs = { self, nixpkgs, ... }: let pname = "ocm"; @@ -27,13 +31,13 @@ inherit (pkgs) stdenv lib ; in { - ${pname} = pkgs.buildGo122Module rec { + ${pname} = pkgs.buildGoModule rec { inherit pname self; version = lib.fileContents ./VERSION; gitCommit = if (self ? rev) then self.rev else self.dirtyRev; state = if (self ? rev) then "clean" else "dirty"; - # This vendorHash represents a dervative of all go.mod dependancies and needs to be adjusted with every change + # This vendorHash represents a derivative of all go.mod dependencies and needs to be adjusted with every change vendorHash = "sha256-NmUhe8lQsK8+g6GOUw4m2j5+B+VIx6OzXfSY+zGUM9Q="; src = ./.; @@ -85,7 +89,7 @@ { default = pkgs.mkShell { buildInputs = with pkgs; [ - go_1_22 # golang 1.22 + go_1_23 # golang 1.23 gopls # go language server gotools # go imports go-tools # static checks