mlc: refactoring

This commit is contained in:
Bas van Dijk 2020-11-04 09:24:38 +00:00
parent 64cbf9f0de
commit f8e066b5ed

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, patchelf, lib }: { stdenv, fetchurl, patchelf }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "mlc"; pname = "mlc";
version = "3.9"; version = "3.9";
@ -10,25 +10,21 @@ stdenv.mkDerivation rec {
sourceRoot = "Linux"; sourceRoot = "Linux";
nativeBuildInputs = [ patchelf ];
phases = [ "unpackPhase" "installPhase" "patchPhase" ];
installPhase = '' installPhase = ''
mkdir -p $out/bin install -Dm755 mlc $out/bin/mlc
cp mlc $out/bin/mlc
chmod +x $out/bin/mlc
''; '';
patchPhase = '' nativeBuildInputs = [ patchelf ];
fixupPhase = ''
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/mlc patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/mlc
''; '';
meta = { meta = with stdenv.lib; {
homepage = "https://software.intel.com/content/www/us/en/develop/articles/intelr-memory-latency-checker.html"; homepage = "https://software.intel.com/content/www/us/en/develop/articles/intelr-memory-latency-checker.html";
description = "Intel Memory Latency Checker"; description = "Intel Memory Latency Checker";
license = lib.licenses.unfree; license = licenses.unfree;
maintainers = with lib.maintainers; [ basvandijk ]; maintainers = with maintainers; [ basvandijk ];
platforms = with lib.platforms; linux; platforms = with platforms; linux;
}; };
} }