Skip to content
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
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 49e8512100ce
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 74a1ea1f89c9
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Jun 12, 2017

  1. nixUnstable: 1.12pre5350_7689181e -> 1.12pre5413_b4b1f452

    (cherry picked from commit 3d4a8e1)
    edolstra committed Jun 12, 2017
    Copy the full SHA
    7071d1e View commit details
  2. nix: 1.11.9 -> 1.11.10

    (cherry picked from commit 0bffe03)
    edolstra committed Jun 12, 2017
    Copy the full SHA
    7a76e25 View commit details
  3. perf: Fix perf annotate

    This command requires objdump, so make sure it can find it.
    
    (cherry picked from commit 63e9d1c)
    edolstra committed Jun 12, 2017
    Copy the full SHA
    74a1ea1 View commit details
6 changes: 3 additions & 3 deletions nixos/modules/installer/tools/nix-fallback-paths.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
x86_64-linux = "/nix/store/71im965h634iy99zsmlncw6qhx5jcclx-nix-1.11.9";
i686-linux = "/nix/store/cgvavixkayc36l6kl92i8mxr6k0p2yhy-nix-1.11.9";
x86_64-darwin = "/nix/store/w1c96v5yxvdmq4nvqlxjvg6kp7xa2lag-nix-1.11.9";
x86_64-linux = "/nix/store/qiiwjyc338xigks5wqyxn0nnqiwy7xav-nix-1.11.10";
i686-linux = "/nix/store/30fi96qqggjs51c5085y3fiws0a3wdcl-nix-1.11.10";
x86_64-darwin = "/nix/store/zs6msqwjgjr9v9kbs5s0sap7vhdw692z-nix-1.11.10";
}
12 changes: 12 additions & 0 deletions pkgs/os-specific/linux/kernel/perf-binutils-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -ru -x '*~' linux-4.9.31-orig/tools/perf/util/annotate.c linux-4.9.31/tools/perf/util/annotate.c
--- linux-4.9.31-orig/tools/perf/util/annotate.c 2017-06-07 12:08:04.000000000 +0200
+++ linux-4.9.31/tools/perf/util/annotate.c 2017-06-12 13:10:08.811079574 +0200
@@ -1350,7 +1350,7 @@
"%s %s%s --start-address=0x%016" PRIx64
" --stop-address=0x%016" PRIx64
" -l -d %s %s -C %s 2>/dev/null|grep -v %s|expand",
- objdump_path ? objdump_path : "objdump",
+ objdump_path ? objdump_path : OBJDUMP_PATH,
disassembler_style ? "-M " : "",
disassembler_style ? disassembler_style : "",
map__rip_2objdump(map, sym->start),
13 changes: 9 additions & 4 deletions pkgs/os-specific/linux/kernel/perf.nix
Original file line number Diff line number Diff line change
@@ -11,7 +11,9 @@ assert versionAtLeast kernel.version "3.12";
stdenv.mkDerivation {
name = "perf-linux-${kernel.version}";

inherit (kernel) src patches;
inherit (kernel) src;

patches = kernel.patches ++ [ ./perf-binutils-path.patch ];

preConfigure = ''
cd tools/perf
@@ -30,9 +32,12 @@ stdenv.mkDerivation {

# Note: we don't add elfutils to buildInputs, since it provides a
# bad `ld' and other stuff.
NIX_CFLAGS_COMPILE = [
"-Wno-error=cpp" "-Wno-error=bool-compare" "-Wno-error=deprecated-declarations"
]
NIX_CFLAGS_COMPILE =
[ "-Wno-error=cpp"
"-Wno-error=bool-compare"
"-Wno-error=deprecated-declarations"
"-DOBJDUMP_PATH=\"${binutils}/bin/objdump\""
]
# 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"
34 changes: 26 additions & 8 deletions pkgs/tools/package-management/nix/default.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
{ lib, stdenv, fetchurl, fetchFromGitHub, perl, curl, bzip2, sqlite, openssl ? null, xz
, pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli, readline
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook5_xsl
, libseccomp, busybox
, storeDir ? "/nix/store"
, stateDir ? "/nix/var"
}:

let

sh = busybox.override {
useMusl = true;
enableStatic = true;
enableMinimal = true;
extraConfig = ''
CONFIG_ASH y
CONFIG_ASH_BUILTIN_ECHO y
CONFIG_ASH_BUILTIN_TEST y
CONFIG_ASH_OPTIMIZE_FOR_SIZE y
'';
};

common = { name, suffix ? "", src, fromGit ? false }: stdenv.mkDerivation rec {
inherit name src;
version = lib.getVersion name;

is112 = lib.versionAtLeast version "1.12pre";

VERSION_SUFFIX = lib.optionalString fromGit suffix;

# 1.11.8 doesn't yet have the patch to work on LLVM 4, so we patch it for now. Take this out once
@@ -25,13 +40,14 @@ let

nativeBuildInputs =
[ pkgconfig ]
++ lib.optionals (!lib.versionAtLeast version "1.12pre") [ perl ]
++ lib.optionals (!is112) [ perl ]
++ lib.optionals fromGit [ autoreconfHook autoconf-archive bison flex libxml2 libxslt docbook5 docbook5_xsl ];

buildInputs = [ curl openssl sqlite xz ]
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
++ lib.optionals fromGit [ brotli readline ] # Since 1.12
++ lib.optional ((stdenv.isLinux || stdenv.isDarwin) && lib.versionAtLeast version "1.12pre")
++ lib.optional stdenv.isLinux libseccomp
++ lib.optional ((stdenv.isLinux || stdenv.isDarwin) && is112)
(aws-sdk-cpp.override {
apis = ["s3"];
customMemoryManagement = false;
@@ -55,10 +71,12 @@ let
"--disable-init-state"
"--enable-gc"
]
++ lib.optionals (!lib.versionAtLeast version "1.12pre") [
++ lib.optionals (!is112) [
"--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
"--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
"--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}"
] ++ lib.optionals (is112 && stdenv.isLinux) [
"--with-sandbox-shell=${sh}/bin/busybox"
];

makeFlags = "profiledir=$(out)/etc/profile.d";
@@ -136,21 +154,21 @@ in rec {
nix = nixStable;

nixStable = (common rec {
name = "nix-1.11.9";
name = "nix-1.11.10";
src = fetchurl {
url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz";
sha256 = "0e943e277f37843f9196b0293cc31d828613ad7a328ee77cd5be01935dc6e7e1";
sha256 = "b29a458c2b803bcc07d8b58cd016ca6ad0788a73ca74edaeaebc588961322467";
};
}) // { perl-bindings = nixStable; };

nixUnstable = (lib.lowPrio (common rec {
name = "nix-1.12${suffix}";
suffix = "pre5350_7689181e";
suffix = "pre5413_b4b1f452";
src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "7689181e4f5921d3356736996079ec0310e834c6";
sha256 = "08daxcpj18dffsbqs3fckahq06gzs8kl6xr4b4jgijwdl5vqwiri";
rev = "b4b1f4525f8dc8f320d666c208bff5cb36777580";
sha256 = "0qb18k2rp6bbg8g50754srl95dq0lr96i297856yhrx1hh1ja37z";
};
fromGit = true;
})) // { perl-bindings = perl-bindings { nix = nixUnstable; }; };