From 96373a40414d5d989b3ec03b01f83e5386a30416 Mon Sep 17 00:00:00 2001 From: Vladimir Kirillov Date: Fri, 9 May 2014 09:52:14 +0300 Subject: [PATCH 1/3] sysdig: update to 0.1.82 --- pkgs/os-specific/linux/sysdig/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index 69bb5e43a546..c6a2d5ae5ba2 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -2,10 +2,10 @@ let s = rec { baseName="sysdig"; - version="0.1.81"; + version="0.1.82"; name="${baseName}-${version}"; url="https://github.com/draios/sysdig/archive/${version}.tar.gz"; - sha256="0p9j1fy7lr027nsvr5bq0416nlsbvk02irzazmigsbr03fg0x1wv"; + sha256="0yjxsdjbkp5dihg5xhkyl3lg64dl40a0b5cvcai8gz74w2955mnk"; }; buildInputs = [ cmake luajit kernel zlib From e5f7e4ec3ca40d100feec03b73a59be8b26280d2 Mon Sep 17 00:00:00 2001 From: Vladimir Kirillov Date: Fri, 9 May 2014 10:06:29 +0300 Subject: [PATCH 2/3] luajit: support Darwin builds --- pkgs/development/interpreters/luajit/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix index 46c0b49c3b89..00c4ddc447f2 100644 --- a/pkgs/development/interpreters/luajit/default.nix +++ b/pkgs/development/interpreters/luajit/default.nix @@ -11,7 +11,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - patchPhase = stdenv.lib.optionalString (stdenv.gcc.libc != null) + patchPhase = '' + substituteInPlace Makefile \ + --replace /usr/local $out + '' + stdenv.lib.optionalString (stdenv.gcc.libc != null) '' substituteInPlace Makefile \ --replace ldconfig ${stdenv.gcc.libc}/sbin/ldconfig @@ -21,11 +24,11 @@ stdenv.mkDerivation rec { buildFlags = [ "amalg" ]; # Build highly optimized version installPhase = "make install PREFIX=$out"; - meta = { + meta = with stdenv.lib; { description = "high-performance JIT compiler for Lua 5.1"; homepage = http://luajit.org; - license = stdenv.lib.licenses.mit; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; + license = licenses.mit; + platforms = platforms.linux ++ platforms.darwin; + maintainers = [ maintainers.thoughtpolice ]; }; } From 96903d5e480cdf45a0783c3d7fb4adbbdf43d577 Mon Sep 17 00:00:00 2001 From: Vladimir Kirillov Date: Fri, 9 May 2014 10:06:56 +0300 Subject: [PATCH 3/3] sysdig: support builds without the kernel module, add pkgs.sysdig attr --- pkgs/os-specific/linux/sysdig/default.nix | 18 ++++++++++-------- pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index c6a2d5ae5ba2..6734563f0ab9 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -1,5 +1,6 @@ {stdenv, fetchurl, cmake, luajit, kernel, zlib}: let + inherit (stdenv.lib) optional optionalString; s = rec { baseName="sysdig"; version="0.1.82"; @@ -8,8 +9,8 @@ let sha256="0yjxsdjbkp5dihg5xhkyl3lg64dl40a0b5cvcai8gz74w2955mnk"; }; buildInputs = [ - cmake luajit kernel zlib - ]; + cmake zlib luajit + ] ++ optional (kernel != null) kernel; in stdenv.mkDerivation { inherit (s) name version; @@ -24,17 +25,18 @@ stdenv.mkDerivation { ]; preConfigure = '' export INSTALL_MOD_PATH="$out" + '' + optionalString (kernel != null) '' export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ''; - postInstall = '' + postInstall = optionalString (kernel != null) '' make install_driver ''; - meta = { + meta = with stdenv.lib; { inherit (s) version; - description = ''A tracepoint-based system tracing tool for Linux''; - license = stdenv.lib.licenses.gpl2 ; - maintainers = [stdenv.lib.maintainers.raskin]; - platforms = stdenv.lib.platforms.linux; + description = ''A tracepoint-based system tracing tool for Linux (with clients for other OSes)''; + license = licenses.gpl2; + maintainers = [maintainers.raskin]; + platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5fa278924b6a..7fd9bd6aa26a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7377,6 +7377,10 @@ let statifier = builderDefsPackage (import ../os-specific/linux/statifier) { }; + sysdig = callPackage ../os-specific/linux/sysdig { + kernel = null; + }; # pkgs.sysdig is a client, for a driver look at linuxPackagesFor + sysfsutils = callPackage ../os-specific/linux/sysfsutils { }; sysprof = callPackage ../development/tools/profiling/sysprof {