From b36a38446ee37aa44c8ba387f0ad2a507754b7a0 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Mon, 10 Jun 2024 16:01:27 +0200 Subject: [PATCH] Upgrade nixpkgs to 24.05 (primarily for a more up-to-date golang) --- default.nix | 4 ++-- nix/garage.nix | 7 ++++++- nix/nebula.nix | 2 +- nix/pkgs.nix | 6 +++--- release.nix | 4 ++-- shell.nix | 21 +++++++++++++++++++++ 6 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 shell.nix diff --git a/default.nix b/default.nix index ca03843..391f858 100644 --- a/default.nix +++ b/default.nix @@ -69,7 +69,7 @@ in rec { ''; }; - vendorSha256 = "sha256-P1TXG0fG8/6n37LmM5ApYctqoZzJFlvFAO2Zl85SVvk="; + vendorHash = "sha256-P1TXG0fG8/6n37LmM5ApYctqoZzJFlvFAO2Zl85SVvk="; subPackages = [ "./cmd/entrypoint" @@ -90,7 +90,7 @@ in rec { inherit buildSystem; hostSystem = "${hostPlatform.cpu.name}-unknown-${hostPlatform.kernel.name}-musl"; - pkgsSrc = pkgsNix.src; + #pkgsSrc = pkgsNix.src; }; diff --git a/nix/garage.nix b/nix/garage.nix index 3320829..fb4c538 100644 --- a/nix/garage.nix +++ b/nix/garage.nix @@ -8,8 +8,13 @@ rec { rev = "76230f20282e73a5a5afa33af68152acaf732cf5"; }; + # TODO compiling garage broke using 24.05, so for now use the pkgs pinned in + # the garage repo. Probably will revisit this when garage gets upgraded + # anyway. + pkgsSrc = (import "${src}/nix/common.nix").pkgsSrc; + package = { - pkgsSrc, + #pkgsSrc, buildSystem, hostSystem, }: let diff --git a/nix/nebula.nix b/nix/nebula.nix index 98bde7e..e221fd5 100644 --- a/nix/nebula.nix +++ b/nix/nebula.nix @@ -19,7 +19,7 @@ sha256 = "sha256-IsLSlQsrfw3obkz4jHL23BRQY2fviGbPEvs5j0zkdX0="; }; - vendorSha256 = "sha256-GvMiOEC3Y/pGG++Z+XCgLVADKymUR9shDxjx3xIz8u0="; + vendorHash = "sha256-GvMiOEC3Y/pGG++Z+XCgLVADKymUR9shDxjx3xIz8u0="; subPackages = [ "cmd/nebula" "cmd/nebula-cert" ]; diff --git a/nix/pkgs.nix b/nix/pkgs.nix index 2c55f95..1701289 100644 --- a/nix/pkgs.nix +++ b/nix/pkgs.nix @@ -26,13 +26,13 @@ rec { ]; - version = "22.11"; - rev = "ce20e9ebe1903ea2ba1ab006ec63093020c761cb"; + version = "24.05"; + rev = "5646423bfac84ec68dfc60f2a322e627ef0d6a95"; src = fetchTarball { name = "nixpkgs-${version}"; url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz"; - sha256 = "sha256-eFNm2h6fNbgD7ZpO4MHikCB5pSnCJ7DTmwPisjetmwc="; + sha256 = "sha256:1lr1h35prqkd1mkmzriwlpvxcb34kmhc9dnr48gkm8hh089hifmx"; }; supportedSystems = [ diff --git a/release.nix b/release.nix index bd0a0fa..7dd99e2 100644 --- a/release.nix +++ b/release.nix @@ -1,6 +1,6 @@ { - releaseName, - revision, + revision ? "dev", + releaseName ? "dev", buildSystem ? builtins.currentSystem, pkgsNix ? (import ./nix/pkgs.nix), diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..f4d35e4 --- /dev/null +++ b/shell.nix @@ -0,0 +1,21 @@ +{ + + buildSystem ? builtins.currentSystem, + pkgsNix ? (import ./nix/pkgs.nix), + +}: let + + pkgs = pkgsNix.default { + inherit buildSystem; + hostSystem = buildSystem; + }; + +in pkgs.mkShell { + buildInputs = [ + pkgs.go + pkgs.golangci-lint + ]; + shellHook = '' + true # placeholder + ''; +}