From 2376acd7f803379b0f92da3159b994eecd339671 Mon Sep 17 00:00:00 2001 From: Tiago Castro Date: Thu, 10 Oct 2024 15:07:23 +0100 Subject: [PATCH 1/2] build: re-run spdk build when the rev is modified Ensure this by adding the first 7chars of rev to the github derivation name. In practice this should be fine. Signed-off-by: Tiago Castro --- nix/pkgs/libspdk/default.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/nix/pkgs/libspdk/default.nix b/nix/pkgs/libspdk/default.nix index 41ecd4c..cf641ff 100644 --- a/nix/pkgs/libspdk/default.nix +++ b/nix/pkgs/libspdk/default.nix @@ -83,23 +83,31 @@ let # # Derivation attributes # - drvAttrs = rec { + spdk = rec { + rev = "e5f7aa4c8250fd517764f073637f956b78c323c2"; + sha256 = "sha256-VqaX5LAuNg0bAPz76xz2EU0XXLoyCwqDlP6+XWE5o14="; pname = "libspdk${nameSuffix}"; - version = "24.05-e5f7aa4"; + version = "24.05-${lib.substring 0 7 rev}"; + name = "${pname}-${version}"; + }; + drvAttrs = rec { + pname = spdk.pname; + version = spdk.version; src = [ (fetchFromGitHub { - name = pname; + # Note that this would only rebuild if the first 7 chars differ, but in practice should be fine + name = spdk.name; owner = "openebs"; repo = "spdk"; - rev = "e5f7aa4c8250fd517764f073637f956b78c323c2"; - sha256 = "sha256-VqaX5LAuNg0bAPz76xz2EU0XXLoyCwqDlP6+XWE5o14="; + rev = spdk.rev; + sha256 = spdk.sha256; fetchSubmodules = true; }) ../../../build_scripts ]; - sourceRoot = pname; + sourceRoot = spdk.name; nativeBuildInputs = [ cmake From b95eb6cd46e8830986c7a8a1e597ea84206cf00b Mon Sep 17 00:00:00 2001 From: Tiago Castro Date: Mon, 14 Oct 2024 13:04:54 +0100 Subject: [PATCH 2/2] fix: update spdk with higher retry delay Pulls in missing cherry-pick from spdk. Signed-off-by: Tiago Castro --- nix/pkgs/libspdk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/pkgs/libspdk/default.nix b/nix/pkgs/libspdk/default.nix index cf641ff..3864b6d 100644 --- a/nix/pkgs/libspdk/default.nix +++ b/nix/pkgs/libspdk/default.nix @@ -84,8 +84,8 @@ let # Derivation attributes # spdk = rec { - rev = "e5f7aa4c8250fd517764f073637f956b78c323c2"; - sha256 = "sha256-VqaX5LAuNg0bAPz76xz2EU0XXLoyCwqDlP6+XWE5o14="; + rev = "50b064f553970b0f352691530e80f19b8432f034"; + sha256 = "sha256-fim71qqNjGtITeXfR7kWIRpBbI2iF47D0suny3mjcCQ="; pname = "libspdk${nameSuffix}"; version = "24.05-${lib.substring 0 7 rev}"; name = "${pname}-${version}";