Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cb4067b41252
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1c52531bbe93
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 10, 2018

  1. linuxPackages.perf: use prefix instead of DESTDIR

    Otherwise the build system computes incorrect references and looks for
    perf-core in /libexec. DESTDIR for normal buildsystems is never the
    right choice for nixpkgs.
    
    (cherry picked from commit 0e2b222)
    Mic92 committed Apr 10, 2018
    Copy the full SHA
    1c52531 View commit details
Showing with 15 additions and 10 deletions.
  1. +15 −10 pkgs/os-specific/linux/kernel/perf.nix
25 changes: 15 additions & 10 deletions pkgs/os-specific/linux/kernel/perf.nix
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ assert versionAtLeast kernel.version "3.12";
stdenv.mkDerivation {
name = "perf-linux-${kernel.version}";

inherit (kernel) src makeFlags;
inherit (kernel) src;

preConfigure = ''
cd tools/perf
@@ -24,17 +24,21 @@ stdenv.mkDerivation {
substituteInPlace $x --replace /usr/lib/debug /run/current-system/sw/lib/debug
done
[ -f bash_completion ] && sed -i 's,^have perf,_have perf,' bash_completion
export makeFlags="DESTDIR=$out WERROR=0 $makeFlags"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -DTIPDIR=\"$out/share/doc/perf-tip\""
if [ -f bash_completion ]; then
sed -i 's,^have perf,_have perf,' bash_completion
fi
'';

makeFlags = ["prefix=$(out)" "WERROR=0"] ++ kernel.makeFlags;

# perf refers both to newt and slang
nativeBuildInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt
flex bison libiberty libaudit makeWrapper pkgconfig python perl ];
buildInputs =
[ elfutils newt slang libunwind libbfd zlib openssl systemtap.stapBuild numactl
] ++ stdenv.lib.optional withGtk gtk2;
nativeBuildInputs = [
asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt
flex bison libiberty libaudit makeWrapper pkgconfig python perl
];
buildInputs = [
elfutils newt slang libunwind libbfd zlib openssl systemtap.stapBuild numactl
] ++ stdenv.lib.optional withGtk gtk2;

# Note: we don't add elfutils to buildInputs, since it provides a
# bad `ld' and other stuff.
@@ -43,14 +47,15 @@ stdenv.mkDerivation {
"-Wno-error=bool-compare"
"-Wno-error=deprecated-declarations"
"-DOBJDUMP_PATH=\"${binutils}/bin/objdump\""
"-DTIPDIR=\"$(out)/share/doc/perf-tip\""
]
# gcc before 6 doesn't know these options
++ stdenv.lib.optionals (hasPrefix "gcc-6" stdenv.cc.cc.name) [
"-Wno-error=unused-const-variable" "-Wno-error=misleading-indentation"
];

separateDebugInfo = true;
installFlags = "install install-man ASCIIDOC8=1";
installFlags = "install install-man ASCIIDOC8=1 prefix=$(out)";

preFixup = ''
wrapProgram $out/bin/perf \