Skip to content

Commit

Permalink
update nix flake to use go v1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
hilmarf committed Oct 14, 2024
1 parent 2583066 commit ff73be5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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 = ./.;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ff73be5

Please sign in to comment.