diff --git a/pkgs/by-name/ms/mstflint/package.nix b/pkgs/by-name/ms/mstflint/package.nix index 1683fb968e3a..90af450d776c 100644 --- a/pkgs/by-name/ms/mstflint/package.nix +++ b/pkgs/by-name/ms/mstflint/package.nix @@ -1,7 +1,7 @@ { lib, stdenv, - fetchurl, + fetchFromGitHub, rdma-core, openssl, zlib, @@ -24,15 +24,15 @@ enableDPA ? true, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "mstflint"; + version = "4.34.1-2"; - # if you update the version of this package, also update the input hash in mstflint_access! - version = "4.34.0-1"; - - src = fetchurl { - url = "https://github.com/Mellanox/mstflint/releases/download/v${version}/mstflint-${version}.tar.gz"; - hash = "sha256-MOFfbrjwnWXVskFCF2pgjf1Z8nkZV0l+CLfGWzxmmIg="; + src = fetchFromGitHub { + owner = "Mellanox"; + repo = finalAttrs.pname; + tag = "v${finalAttrs.version}"; + hash = "sha256-jYZoP0tJG3HmLojJAWSgMFqlyP9hX8v1R0HL1lwR4Eg="; }; nativeBuildInputs = [ @@ -130,4 +130,4 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ thillux ]; platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/os-specific/linux/mstflint_access/default.nix b/pkgs/os-specific/linux/mstflint_access/default.nix index 01160a4cc26a..a13b4c9d43f7 100644 --- a/pkgs/os-specific/linux/mstflint_access/default.nix +++ b/pkgs/os-specific/linux/mstflint_access/default.nix @@ -10,12 +10,9 @@ stdenv.mkDerivation rec { pname = "mstflint_access"; - inherit (mstflint) version; + inherit (mstflint) version src; - src = fetchurl { - url = "https://github.com/Mellanox/mstflint/releases/download/v${version}/kernel-mstflint-${version}.tar.gz"; - hash = "sha256-VO4nXGlqp955xmNyAD/TdOfLEA2CKouOJmLnRCvjnaw="; - }; + sourceRoot = "source/kernel"; nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies;