From 8d17c201516de9c76b6458599e8b59a84bd45ec0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 29 Jul 2023 17:33:09 +0000 Subject: [PATCH 1/2] spectre-meltdown-checker: 0.45 -> 0.46 --- pkgs/tools/security/spectre-meltdown-checker/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/spectre-meltdown-checker/default.nix b/pkgs/tools/security/spectre-meltdown-checker/default.nix index cf85ed9310a1..5a601027400e 100644 --- a/pkgs/tools/security/spectre-meltdown-checker/default.nix +++ b/pkgs/tools/security/spectre-meltdown-checker/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "spectre-meltdown-checker"; - version = "0.45"; + version = "0.46"; src = fetchFromGitHub { owner = "speed47"; repo = "spectre-meltdown-checker"; rev = "v${version}"; - sha256 = "sha256-yGrsiPBux4YeiQ3BL2fnne5P55R/sQZ4FwzSkE6BqPc="; + sha256 = "sha256-M4ngdtp2esZ+CSqZAiAeOnKtaK8Ra+TmQfMsr5q5gkg="; }; prePatch = '' From 703b264b07251df3a8194ac93ad384e764846b97 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sat, 29 Jul 2023 22:45:43 +0200 Subject: [PATCH 2/2] spectre-meltdown-checker: use `finalAttrs` pattern --- .../spectre-meltdown-checker/default.nix | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/pkgs/tools/security/spectre-meltdown-checker/default.nix b/pkgs/tools/security/spectre-meltdown-checker/default.nix index 5a601027400e..529da4557915 100644 --- a/pkgs/tools/security/spectre-meltdown-checker/default.nix +++ b/pkgs/tools/security/spectre-meltdown-checker/default.nix @@ -1,14 +1,20 @@ -{ lib, stdenv, fetchFromGitHub, makeWrapper, coreutils, binutils-unwrapped }: +{ lib +, stdenv +, fetchFromGitHub +, makeBinaryWrapper +, coreutils +, binutils-unwrapped +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "spectre-meltdown-checker"; version = "0.46"; src = fetchFromGitHub { owner = "speed47"; repo = "spectre-meltdown-checker"; - rev = "v${version}"; - sha256 = "sha256-M4ngdtp2esZ+CSqZAiAeOnKtaK8Ra+TmQfMsr5q5gkg="; + rev = "v${finalAttrs.version}"; + hash = "sha256-M4ngdtp2esZ+CSqZAiAeOnKtaK8Ra+TmQfMsr5q5gkg="; }; prePatch = '' @@ -16,23 +22,23 @@ stdenv.mkDerivation rec { --replace /bin/echo ${coreutils}/bin/echo ''; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeBinaryWrapper ]; - installPhase = with lib; '' + installPhase = '' runHook preInstall install -Dm755 spectre-meltdown-checker.sh $out/bin/spectre-meltdown-checker wrapProgram $out/bin/spectre-meltdown-checker \ - --prefix PATH : ${makeBinPath [ binutils-unwrapped ]} + --prefix PATH : ${lib.makeBinPath [ binutils-unwrapped ]} runHook postInstall ''; - meta = with lib; { + meta = { description = "Spectre & Meltdown vulnerability/mitigation checker for Linux"; homepage = "https://github.com/speed47/spectre-meltdown-checker"; - license = licenses.gpl3; - maintainers = with maintainers; [ dotlambda ]; - platforms = platforms.linux; + license = lib.licenses.gpl3; + maintainers = [ lib.maintainers.dotlambda ]; + platforms = lib.platforms.linux; }; -} +})