spectre-meltdown-checker: use finalAttrs
pattern
This commit is contained in:
parent
8d17c20151
commit
703b264b07
|
@ -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";
|
pname = "spectre-meltdown-checker";
|
||||||
version = "0.46";
|
version = "0.46";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "speed47";
|
owner = "speed47";
|
||||||
repo = "spectre-meltdown-checker";
|
repo = "spectre-meltdown-checker";
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
sha256 = "sha256-M4ngdtp2esZ+CSqZAiAeOnKtaK8Ra+TmQfMsr5q5gkg=";
|
hash = "sha256-M4ngdtp2esZ+CSqZAiAeOnKtaK8Ra+TmQfMsr5q5gkg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
|
@ -16,23 +22,23 @@ stdenv.mkDerivation rec {
|
||||||
--replace /bin/echo ${coreutils}/bin/echo
|
--replace /bin/echo ${coreutils}/bin/echo
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||||
|
|
||||||
installPhase = with lib; ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
install -Dm755 spectre-meltdown-checker.sh $out/bin/spectre-meltdown-checker
|
install -Dm755 spectre-meltdown-checker.sh $out/bin/spectre-meltdown-checker
|
||||||
wrapProgram $out/bin/spectre-meltdown-checker \
|
wrapProgram $out/bin/spectre-meltdown-checker \
|
||||||
--prefix PATH : ${makeBinPath [ binutils-unwrapped ]}
|
--prefix PATH : ${lib.makeBinPath [ binutils-unwrapped ]}
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "Spectre & Meltdown vulnerability/mitigation checker for Linux";
|
description = "Spectre & Meltdown vulnerability/mitigation checker for Linux";
|
||||||
homepage = "https://github.com/speed47/spectre-meltdown-checker";
|
homepage = "https://github.com/speed47/spectre-meltdown-checker";
|
||||||
license = licenses.gpl3;
|
license = lib.licenses.gpl3;
|
||||||
maintainers = with maintainers; [ dotlambda ];
|
maintainers = [ lib.maintainers.dotlambda ];
|
||||||
platforms = platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
Loading…
Reference in a new issue