From 4147050550367c9aa64a04e94f9d2b8b4a67f492 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 22 Feb 2015 13:31:35 +0000 Subject: [PATCH 01/53] add a (slightly naive) packaging of osrm-backend and its missing dependencies --- .../libraries/libosmpbf/default.nix | 22 +++++++ .../luabind/0.9.1_boost_1.57_fix.patch | 23 ++++++++ .../luabind/0.9.1_modern_boost_fix.patch | 59 +++++++++++++++++++ .../development/libraries/luabind/default.nix | 28 +++++++++ pkgs/development/libraries/stxxl/default.nix | 24 ++++++++ pkgs/servers/osrm-backend/4.5.0-openmp.patch | 18 ++++++ pkgs/servers/osrm-backend/default.nix | 20 +++++++ pkgs/top-level/all-packages.nix | 8 +++ 8 files changed, 202 insertions(+) create mode 100644 pkgs/development/libraries/libosmpbf/default.nix create mode 100644 pkgs/development/libraries/luabind/0.9.1_boost_1.57_fix.patch create mode 100644 pkgs/development/libraries/luabind/0.9.1_modern_boost_fix.patch create mode 100644 pkgs/development/libraries/luabind/default.nix create mode 100644 pkgs/development/libraries/stxxl/default.nix create mode 100644 pkgs/servers/osrm-backend/4.5.0-openmp.patch create mode 100644 pkgs/servers/osrm-backend/default.nix diff --git a/pkgs/development/libraries/libosmpbf/default.nix b/pkgs/development/libraries/libosmpbf/default.nix new file mode 100644 index 00000000000..6ff5d816776 --- /dev/null +++ b/pkgs/development/libraries/libosmpbf/default.nix @@ -0,0 +1,22 @@ +{stdenv, fetchurl, protobuf}: + +stdenv.mkDerivation rec { + name = "libosmpbf-1.3.3"; + + src = fetchurl { + url = "https://github.com/scrosby/OSM-binary/archive/v1.3.3.tar.gz"; + sha256 = "a109f338ce6a8438a8faae4627cd08599d0403b8977c185499de5c17b92d0798"; + }; + + buildInputs = [ protobuf ]; + + sourceRoot = "OSM-binary-1.3.3/src"; + + installFlags = "PREFIX=$(out)"; + + meta = { + homepage = https://github.com/scrosby/OSM-binary; + description = "C library to read and write OpenStreetMap PBF files."; + license = stdenv.lib.licenses.lgpl3; + }; +} diff --git a/pkgs/development/libraries/luabind/0.9.1_boost_1.57_fix.patch b/pkgs/development/libraries/luabind/0.9.1_boost_1.57_fix.patch new file mode 100644 index 00000000000..7ac495777b5 --- /dev/null +++ b/pkgs/development/libraries/luabind/0.9.1_boost_1.57_fix.patch @@ -0,0 +1,23 @@ +diff --git a/luabind/object.hpp b/luabind/object.hpp +index f7b7ca5..1c18e04 100644 +--- a/luabind/object.hpp ++++ b/luabind/object.hpp +@@ -536,6 +536,8 @@ namespace detail + handle m_key; + }; + ++#if BOOST_VERSION < 105700 ++ + // Needed because of some strange ADL issues. + + #define LUABIND_OPERATOR_ADL_WKND(op) \ +@@ -557,7 +559,8 @@ namespace detail + LUABIND_OPERATOR_ADL_WKND(!=) + + #undef LUABIND_OPERATOR_ADL_WKND +- ++ ++#endif // BOOST_VERSION < 105700 + } // namespace detail + + namespace adl diff --git a/pkgs/development/libraries/luabind/0.9.1_modern_boost_fix.patch b/pkgs/development/libraries/luabind/0.9.1_modern_boost_fix.patch new file mode 100644 index 00000000000..92e32828a03 --- /dev/null +++ b/pkgs/development/libraries/luabind/0.9.1_modern_boost_fix.patch @@ -0,0 +1,59 @@ +diff --git luabind-0.9.1/luabind/detail/call_function.hpp luabind-0.9.1-fixed/luabind/detail/call_function.hpp +index 1b45ec1..8f5afff 100644 +--- luabind-0.9.1/luabind/detail/call_function.hpp ++++ luabind-0.9.1-fixed/luabind/detail/call_function.hpp +@@ -323,7 +323,8 @@ namespace luabind + + #endif // LUABIND_CALL_FUNCTION_HPP_INCLUDED + +-#elif BOOST_PP_ITERATION_FLAGS() == 1 ++#else ++#if BOOST_PP_ITERATION_FLAGS() == 1 + + #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * + #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n +@@ -440,4 +441,5 @@ namespace luabind + + + #endif ++#endif + +diff --git luabind-0.9.1/luabind/detail/call_member.hpp luabind-0.9.1-fixed/luabind/detail/call_member.hpp +index de8d563..e63555b 100644 +--- luabind-0.9.1/luabind/detail/call_member.hpp ++++ luabind-0.9.1-fixed/luabind/detail/call_member.hpp +@@ -316,7 +316,8 @@ namespace luabind + + #endif // LUABIND_CALL_MEMBER_HPP_INCLUDED + +-#elif BOOST_PP_ITERATION_FLAGS() == 1 ++#else ++#if BOOST_PP_ITERATION_FLAGS() == 1 + + #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * + #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n +@@ -360,4 +361,5 @@ namespace luabind + #undef LUABIND_TUPLE_PARAMS + + #endif ++#endif + +diff --git luabind-0.9.1/luabind/wrapper_base.hpp luabind-0.9.1-fixed/luabind/wrapper_base.hpp +index d54c668..0f88cc5 100755 +--- luabind-0.9.1/luabind/wrapper_base.hpp ++++ luabind-0.9.1-fixed/luabind/wrapper_base.hpp +@@ -89,7 +89,8 @@ namespace luabind + + #endif // LUABIND_WRAPPER_BASE_HPP_INCLUDED + +-#elif BOOST_PP_ITERATION_FLAGS() == 1 ++#else ++#if BOOST_PP_ITERATION_FLAGS() == 1 + + #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * + #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n +@@ -188,3 +189,4 @@ namespace luabind + #undef N + + #endif ++#endif diff --git a/pkgs/development/libraries/luabind/default.nix b/pkgs/development/libraries/luabind/default.nix new file mode 100644 index 00000000000..d89229541cd --- /dev/null +++ b/pkgs/development/libraries/luabind/default.nix @@ -0,0 +1,28 @@ +{stdenv, fetchurl, boost-build, lua, boost}: + +stdenv.mkDerivation rec { + name = "luabind-0.9.1"; + + src = fetchurl { + url = "https://github.com/luabind/luabind/archive/v0.9.1.tar.gz"; + sha256 = "0e5ead50a07668d29888f2fa6f53220f900c886e46a2c99c7e8656842f05ff2d"; + }; + + patches = [ ./0.9.1_modern_boost_fix.patch ./0.9.1_boost_1.57_fix.patch ]; + + buildInputs = [ boost-build lua boost ]; + + buildPhase = "LUA_PATH=${lua} bjam release"; + + installPhase = "LUA_PATH=${lua} bjam --prefix=$out release install"; + + passthru = { + inherit lua; + }; + + meta = { + homepage = https://github.com/luabind/luabind; + description = "Luabind is a library that helps you create bindings between C++ and Lua."; + license = stdenv.lib.licenses.mit; + }; +} diff --git a/pkgs/development/libraries/stxxl/default.nix b/pkgs/development/libraries/stxxl/default.nix new file mode 100644 index 00000000000..b387c59efa1 --- /dev/null +++ b/pkgs/development/libraries/stxxl/default.nix @@ -0,0 +1,24 @@ +{stdenv, fetchurl, cmake, parallel ? true }: + +stdenv.mkDerivation rec { + name = "stxxl-1.4.1"; + + src = fetchurl { + url = "https://github.com/stxxl/stxxl/archive/1.4.1.tar.gz"; + sha256 = "54006a5fccd1435abc2f3ec201997a4d7dacddb984d2717f62191798e5372f6c"; + }; + + buildInputs = [ cmake ]; + + cmakeFlags = let parallel_str = if parallel then "ON" else "OFF"; in "-DUSE_GNU_PARALLEL=${parallel_str}"; + + passthru = { + inherit parallel; + }; + + meta = { + homepage = https://github.com/stxxl/stxxl; + description = "STXXL is an implementation of the C++ standard template library STL for external memory (out-of-core) computations."; + license = stdenv.lib.licenses.boost; + }; +} diff --git a/pkgs/servers/osrm-backend/4.5.0-openmp.patch b/pkgs/servers/osrm-backend/4.5.0-openmp.patch new file mode 100644 index 00000000000..f4010131f60 --- /dev/null +++ b/pkgs/servers/osrm-backend/4.5.0-openmp.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b6a40f9..87ca301 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -261,9 +261,10 @@ target_link_libraries(OSRM ${STXXL_LIBRARY}) + target_link_libraries(osrm-extract ${STXXL_LIBRARY}) + target_link_libraries(osrm-prepare ${STXXL_LIBRARY}) + +-if(MINGW) +- # STXXL needs OpenMP library +- target_link_libraries(osrm-extract gomp) ++find_package(OpenMP) ++if (OPENMP_FOUND) ++ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + endif() + + find_package( OSMPBF REQUIRED ) diff --git a/pkgs/servers/osrm-backend/default.nix b/pkgs/servers/osrm-backend/default.nix new file mode 100644 index 00000000000..035ba9658a6 --- /dev/null +++ b/pkgs/servers/osrm-backend/default.nix @@ -0,0 +1,20 @@ +{stdenv, fetchurl, cmake, luabind, libosmpbf, stxxl, tbb, boost, expat, protobuf, bzip2, zlib}: + +stdenv.mkDerivation rec { + name = "osrm-backend-4.5.0"; + + src = fetchurl { + url = "https://github.com/Project-OSRM/osrm-backend/archive/v4.5.0.tar.gz"; + sha256 = "af61e883051f2ecb73520ace6f17cc6da30edc413208ff7cf3d87992eca0756c"; + }; + + patches = [ ./4.5.0-openmp.patch ]; + + buildInputs = [ cmake luabind luabind.lua libosmpbf stxxl tbb boost expat protobuf bzip2 zlib ]; + + meta = { + homepage = https://github.com/Project-OSRM/osrm-backend/wiki; + description = "Open Source Routing Machine computes shortest paths in a graph. It was designed to run well with map data from the Openstreetmap Project."; + license = stdenv.lib.licenses.bsd2; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3dd8284bbc9..ca389139311 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6466,6 +6466,8 @@ let libosip_3 = callPackage ../development/libraries/osip/3.nix {}; + libosmpbf = callPackage ../development/libraries/libosmpbf {}; + libotr = callPackage ../development/libraries/libotr { libgcrypt = libgcrypt_1_6; }; @@ -6727,6 +6729,8 @@ let loudmouth = callPackage ../development/libraries/loudmouth { }; + luabind = callPackage ../development/libraries/luabind { lua = lua5_1; }; + lzo = callPackage ../development/libraries/lzo { }; matio = callPackage ../development/libraries/matio { }; @@ -7312,6 +7316,8 @@ let srtp_linphone = callPackage ../development/libraries/srtp/linphone.nix { }; + stxxl = callPackage ../development/libraries/stxxl { parallel = true; }; + sqlite = lowPrio (callPackage ../development/libraries/sqlite { }); sqlite-interactive = appendToName "interactive" (sqlite.override { interactive = true; }); @@ -8104,6 +8110,8 @@ let opensmtpd = callPackage ../servers/mail/opensmtpd { }; + osrm-backend = callPackage ../servers/osrm-backend { }; + petidomo = callPackage ../servers/mail/petidomo { }; popa3d = callPackage ../servers/mail/popa3d { }; From 7476de722b30e917e40aec3abfa9aa2fa2cea5d7 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 28 Feb 2015 22:37:16 +0000 Subject: [PATCH 02/53] luabind: add patch to allow us to discover a provided luajit --- .../luabind/0.9.1_discover_luajit.patch | 22 +++++++++++++++++++ .../development/libraries/luabind/default.nix | 2 +- pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/luabind/0.9.1_discover_luajit.patch diff --git a/pkgs/development/libraries/luabind/0.9.1_discover_luajit.patch b/pkgs/development/libraries/luabind/0.9.1_discover_luajit.patch new file mode 100644 index 00000000000..6e5fe6aa6f8 --- /dev/null +++ b/pkgs/development/libraries/luabind/0.9.1_discover_luajit.patch @@ -0,0 +1,22 @@ +diff --git a/Jamroot b/Jamroot +index 94494bf..83dfcbb 100755 +--- a/Jamroot ++++ b/Jamroot +@@ -64,7 +64,7 @@ else if [ os.name ] in LINUX MACOSX FREEBSD + $(LUA_PATH) $(HOME)/Library/Frameworks /Library/Frameworks /usr /usr/local /opt/local /opt ; + + local possible-suffixes = +- include/lua5.1 include/lua51 include/lua include ; ++ include/lua5.1 include/lua51 include/lua include include/luajit-2.0 ; + + local includes = [ GLOB $(possible-prefixes)/$(possible-suffixes) : lua.h ] ; + +@@ -83,7 +83,7 @@ else if [ os.name ] in LINUX MACOSX FREEBSD + + local lib = $(prefix)/lib ; + +- local names = liblua5.1 liblua51 liblua ; ++ local names = liblua5.1 liblua51 liblua libluajit-5.1 ; + local extensions = .a .so ; + + library = [ GLOB $(lib)/lua51 $(lib)/lua5.1 $(lib)/lua $(lib) : diff --git a/pkgs/development/libraries/luabind/default.nix b/pkgs/development/libraries/luabind/default.nix index d89229541cd..5afbb71ab65 100644 --- a/pkgs/development/libraries/luabind/default.nix +++ b/pkgs/development/libraries/luabind/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "0e5ead50a07668d29888f2fa6f53220f900c886e46a2c99c7e8656842f05ff2d"; }; - patches = [ ./0.9.1_modern_boost_fix.patch ./0.9.1_boost_1.57_fix.patch ]; + patches = [ ./0.9.1_modern_boost_fix.patch ./0.9.1_boost_1.57_fix.patch ./0.9.1_discover_luajit.patch ]; buildInputs = [ boost-build lua boost ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ca389139311..6faddd8c8a0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6731,6 +6731,8 @@ let luabind = callPackage ../development/libraries/luabind { lua = lua5_1; }; + luabind_luajit = callPackage ../development/libraries/luabind { lua = luajit; }; + lzo = callPackage ../development/libraries/lzo { }; matio = callPackage ../development/libraries/matio { }; From 211f1b826fe9ba9ec8c091c7f0ebfe7ddd48df73 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 7 Mar 2015 11:26:46 +0000 Subject: [PATCH 03/53] osrm-backend: add a luajit variant --- pkgs/top-level/all-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6faddd8c8a0..d73f5e94c85 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8114,6 +8114,8 @@ let osrm-backend = callPackage ../servers/osrm-backend { }; + osrm-backend_luajit = callPackage ../servers/osrm-backend { luabind = luabind_luajit; }; + petidomo = callPackage ../servers/mail/petidomo { }; popa3d = callPackage ../servers/mail/popa3d { }; From c8da20fa5e4e05d1a439af7282a74ee215630112 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 7 Mar 2015 11:31:50 +0000 Subject: [PATCH 04/53] osrm-backend: patch to hardcode path to default lua profiles once installed into $out --- .../4.5.0-default-profile-path.template.patch | 13 +++++++++++++ pkgs/servers/osrm-backend/default.nix | 11 +++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 pkgs/servers/osrm-backend/4.5.0-default-profile-path.template.patch diff --git a/pkgs/servers/osrm-backend/4.5.0-default-profile-path.template.patch b/pkgs/servers/osrm-backend/4.5.0-default-profile-path.template.patch new file mode 100644 index 00000000000..12fcdb4fd02 --- /dev/null +++ b/pkgs/servers/osrm-backend/4.5.0-default-profile-path.template.patch @@ -0,0 +1,13 @@ +diff --git a/extractor/extractor_options.cpp b/extractor/extractor_options.cpp +index d14d8d9..c64d7fd 100644 +--- a/extractor/extractor_options.cpp ++++ b/extractor/extractor_options.cpp +@@ -50,7 +50,7 @@ bool ExtractorOptions::ParseArguments(int argc, char *argv[], ExtractorConfig &e + boost::program_options::options_description config_options("Configuration"); + config_options.add_options()("profile,p", + boost::program_options::value( +- &extractor_config.profile_path)->default_value("profile.lua"), ++ &extractor_config.profile_path)->default_value("@out@/profiles/car.lua"), + "Path to LUA routing profile")( + "threads,t", + boost::program_options::value(&extractor_config.requested_num_threads) diff --git a/pkgs/servers/osrm-backend/default.nix b/pkgs/servers/osrm-backend/default.nix index 035ba9658a6..8e33d6e30b9 100644 --- a/pkgs/servers/osrm-backend/default.nix +++ b/pkgs/servers/osrm-backend/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, cmake, luabind, libosmpbf, stxxl, tbb, boost, expat, protobuf, bzip2, zlib}: +{stdenv, fetchurl, cmake, luabind, libosmpbf, stxxl, tbb, boost, expat, protobuf, bzip2, zlib, substituteAll}: stdenv.mkDerivation rec { name = "osrm-backend-4.5.0"; @@ -8,10 +8,17 @@ stdenv.mkDerivation rec { sha256 = "af61e883051f2ecb73520ace6f17cc6da30edc413208ff7cf3d87992eca0756c"; }; - patches = [ ./4.5.0-openmp.patch ]; + patches = [ + ./4.5.0-openmp.patch + (substituteAll { + src = ./4.5.0-default-profile-path.template.patch; + }) + ]; buildInputs = [ cmake luabind luabind.lua libosmpbf stxxl tbb boost expat protobuf bzip2 zlib ]; + postInstall = "mkdir -p $out/share/osrm-backend && cp -r ../profiles $out/share/osrm-backend/profiles"; + meta = { homepage = https://github.com/Project-OSRM/osrm-backend/wiki; description = "Open Source Routing Machine computes shortest paths in a graph. It was designed to run well with map data from the Openstreetmap Project."; From 5a45003800d0aa9a2546ae0f3658eef1f1ceeccd Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Tue, 17 Mar 2015 22:05:13 +0000 Subject: [PATCH 05/53] luajit: declare lua in propagatedBuildInputs, remove from osrm-backend's buildInputs --- pkgs/development/libraries/luabind/default.nix | 2 ++ pkgs/servers/osrm-backend/default.nix | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/luabind/default.nix b/pkgs/development/libraries/luabind/default.nix index 5afbb71ab65..edb914123e1 100644 --- a/pkgs/development/libraries/luabind/default.nix +++ b/pkgs/development/libraries/luabind/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { buildInputs = [ boost-build lua boost ]; + propagatedBuildInputs = [ lua ]; + buildPhase = "LUA_PATH=${lua} bjam release"; installPhase = "LUA_PATH=${lua} bjam --prefix=$out release install"; diff --git a/pkgs/servers/osrm-backend/default.nix b/pkgs/servers/osrm-backend/default.nix index 8e33d6e30b9..37d3650f683 100644 --- a/pkgs/servers/osrm-backend/default.nix +++ b/pkgs/servers/osrm-backend/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }) ]; - buildInputs = [ cmake luabind luabind.lua libosmpbf stxxl tbb boost expat protobuf bzip2 zlib ]; + buildInputs = [ cmake luabind libosmpbf stxxl tbb boost expat protobuf bzip2 zlib ]; postInstall = "mkdir -p $out/share/osrm-backend && cp -r ../profiles $out/share/osrm-backend/profiles"; From d3a2edb8cec1e24ba221276e7d1380a3df745993 Mon Sep 17 00:00:00 2001 From: Christoph Hrdinka Date: Thu, 19 Mar 2015 12:10:55 +0100 Subject: [PATCH 06/53] nsd: Fix automatic config options --- nixos/modules/services/networking/nsd.nix | 28 +++++++++++++++-------- pkgs/servers/dns/nsd/default.nix | 2 ++ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix index 707bb38ec02..36d9f5d2f16 100644 --- a/nixos/modules/services/networking/nsd.nix +++ b/nixos/modules/services/networking/nsd.nix @@ -9,6 +9,14 @@ let stateDir = "/var/lib/nsd"; pidFile = stateDir + "/var/nsd.pid"; + nsdPkg = pkgs.nsd.override { + bind8Stats = cfg.bind8Stats; + ipv6 = cfg.ipv6; + ratelimit = cfg.ratelimit.enable; + rootServer = cfg.rootServer; + zoneStats = length (collect (x: (x.zoneStats or null) != null) cfg.zones) > 0; + }; + zoneFiles = pkgs.stdenv.mkDerivation { preferLocalBuild = true; name = "nsd-env"; @@ -277,7 +285,7 @@ let default = null; example = "%s"; description = '' - When config.nsd.zoneStats is set to true NSD is able of collecting + When set to something distinct to null NSD is able to collect statistics per zone. All statistics of this zone(s) will be added to the group specified by this given name. Use "%s" to use the zones name as the group. The groups are output from nsd-control stats @@ -300,6 +308,15 @@ in ''; }; + bind8Stats = mkOption { + type = types.bool; + default = false; + example = true; + description = '' + Wheter to enable BIND8 like statisics. + ''; + }; + rootServer = mkOption { type = types.bool; default = false; @@ -673,13 +690,6 @@ in config = mkIf cfg.enable { - # this is not working :( - nixpkgs.config.nsd = { - ipv6 = cfg.ipv6; - ratelimit = cfg.ratelimit.enable; - rootServer = cfg.rootServer; - }; - users.extraGroups = singleton { name = username; gid = config.ids.gids.nsd; @@ -702,7 +712,7 @@ in serviceConfig = { PIDFile = pidFile; Restart = "always"; - ExecStart = "${pkgs.nsd}/sbin/nsd -d -c ${configFile}"; + ExecStart = "${nsdPkg}/sbin/nsd -d -c ${configFile}"; }; preStart = '' diff --git a/pkgs/servers/dns/nsd/default.nix b/pkgs/servers/dns/nsd/default.nix index 85f0883b5de..a6bb4171934 100644 --- a/pkgs/servers/dns/nsd/default.nix +++ b/pkgs/servers/dns/nsd/default.nix @@ -8,6 +8,7 @@ , ratelimit ? false , recvmmsg ? false , rootServer ? false +, rrtypes ? false , zoneStats ? false }: @@ -32,6 +33,7 @@ stdenv.mkDerivation rec { ++ edf ratelimit "ratelimit" ++ edf recvmmsg "recvmmsg" ++ edf rootServer "root-server" + ++ edf rrtypes "draft-rrtypes" ++ edf zoneStats "zone-stats" ++ [ "--with-ssl=${openssl}" "--with-libevent=${libevent}" ]; From b841e8a201a6e6b0440060d3ca207a69aa51ac6b Mon Sep 17 00:00:00 2001 From: Jos van den Oever Date: Thu, 19 Mar 2015 19:48:47 +0100 Subject: [PATCH 07/53] Update davmail to 2.6.1. Bugfix release to fix recent regression with Office 365, also includes a few Linux and IMAP enhancements. http://sourceforge.net/projects/davmail/files/davmail/4.6.1/releasenotes.txt/download --- pkgs/applications/networking/davmail/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/davmail/default.nix b/pkgs/applications/networking/davmail/default.nix index f4f1e94438d..37d4870d181 100644 --- a/pkgs/applications/networking/davmail/default.nix +++ b/pkgs/applications/networking/davmail/default.nix @@ -1,10 +1,10 @@ { fetchurl, stdenv, jre, glib, libXtst, gtk, makeWrapper }: stdenv.mkDerivation rec { - name = "davmail-4.5.1"; + name = "davmail-4.6.1"; src = fetchurl { - url = "mirror://sourceforge/davmail/davmail-linux-x86_64-4.5.1-2303.tgz"; - sha256 = "0y9dwxlfrfm6yf010fad1p5vsyz2ddci6vhz4sa1js2fq4rvyx7a"; + url = "mirror://sourceforge/davmail/davmail-linux-x86_64-4.6.1-2343.tgz"; + sha256 = "15kpbrmw9pcifxj4k4m3q0azbl95kfgwvgb8bc9aj00q0yi3wgiq"; }; buildInputs = [ makeWrapper ]; From 4947bacd52c75fa5c1e5c067b31224e830678cde Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Sat, 21 Mar 2015 12:49:52 +0100 Subject: [PATCH 08/53] rippled: expose more options, make compatible with new rippled version --- nixos/modules/services/misc/rippled.nix | 521 ++++++++++++++---------- 1 file changed, 308 insertions(+), 213 deletions(-) diff --git a/nixos/modules/services/misc/rippled.nix b/nixos/modules/services/misc/rippled.nix index 2c1fec9f6d7..85a1ed8ae9e 100644 --- a/nixos/modules/services/misc/rippled.nix +++ b/nixos/modules/services/misc/rippled.nix @@ -1,5 +1,3 @@ -# configuration building is commented out until better tested. - { config, lib, pkgs, ... }: with lib; @@ -7,29 +5,189 @@ with lib; let cfg = config.services.rippled; - rippledStateCfgFile = "/var/lib/rippled/rippled.cfg"; + b2i = val: if val then "1" else "0"; + + dbCfg = db: '' + type=${db.type} + path=${db.path} + ${optionalString (db.compression != null) ("compression=${b2i db.compression}") } + ${optionalString (db.onlineDelete != null) ("online_delete=${toString db.onlineDelete}")} + ${optionalString (db.advisoryDelete != null) ("advisory_delete=${toString db.advisoryDelete}")} + ${db.extraOpts} + ''; rippledCfg = '' + [server] + ${concatMapStringsSep "\n" (n: "port_${n}") (attrNames cfg.ports)} + + ${concatMapStrings (p: '' + [port_${p.name}] + ip=${p.ip} + port=${toString p.port} + protocol=${concatStringsSep "," p.protocol} + ${optionalString (p.user != "") "user=${p.user}"} + ${optionalString (p.password != "") "user=${p.password}"} + admin=${if p.admin then "allow" else "no"} + ${optionalString (p.ssl.key != null) "ssl_key=${p.ssl.key}"} + ${optionalString (p.ssl.cert != null) "ssl_cert=${p.ssl.cert}"} + ${optionalString (p.ssl.chain != null) "ssl_chain=${p.ssl.chain}"} + '') (attrValues cfg.ports)} + + [database_path] + ${cfg.databasePath} + [node_db] - type=HyperLevelDB - path=/var/lib/rippled/db/hyperldb + ${dbCfg cfg.nodeDb} - [debug_logfile] - /var/log/rippled/debug.log + ${optionalString (cfg.tempDb != null) '' + [temp_db] + ${dbCfg cfg.tempDb}''} - '' - + optionalString (cfg.peerIp != null) '' - [peer_ip] - ${cfg.peerIp} + ${optionalString (cfg.importDb != null) '' + [import_db] + ${dbCfg cfg.importDb}''} - [peer_port] - ${toString cfg.peerPort} + [ips] + ${concatStringsSep "\n" cfg.ips} - '' - + cfg.extraConfig; + [ips_fixed] + ${concatStringsSep "\n" cfg.ipsFixed} + + [validators] + ${concatStringsSep "\n" cfg.validators} + + [node_size] + ${cfg.nodeSize} + + [ledger_history] + ${toString cfg.ledgerHistory} + + [fetch_depth] + ${toString cfg.fetchDepth} + + [validation_quorum] + ${toString cfg.validationQuorum} + + [sntp_servers] + ${concatStringsSep "\n" cfg.sntpServers} + + [rpc_startup] + { "command": "log_level", "severity": "${cfg.logLevel}" } + '' + cfg.extraConfig; + + portOptions = { name, ...}: { + options = { + name = mkOption { + internal = true; + default = name; + }; + + ip = mkOption { + default = "127.0.0.1"; + description = "Ip where rippled listens."; + type = types.str; + }; + + port = mkOption { + description = "Port where rippled listens."; + type = types.int; + }; + + protocol = mkOption { + description = "Protocols expose by rippled."; + type = types.listOf (types.enum ["http" "https" "ws" "wss" "peer"]); + }; + + user = mkOption { + description = "When set, these credentials will be required on HTTP/S requests."; + type = types.str; + default = ""; + }; + + password = mkOption { + description = "When set, these credentials will be required on HTTP/S requests."; + type = types.str; + default = ""; + }; + + admin = mkOption { + description = "Controls whether or not administrative commands are allowed."; + type = types.bool; + default = false; + }; + + ssl = { + key = mkOption { + description = '' + Specifies the filename holding the SSL key in PEM format. + ''; + default = null; + type = types.nullOr types.path; + }; + + cert = mkOption { + description = '' + Specifies the path to the SSL certificate file in PEM format. + This is not needed if the chain includes it. + ''; + default = null; + type = types.nullOr types.path; + }; + + chain = mkOption { + description = '' + If you need a certificate chain, specify the path to the + certificate chain here. The chain may include the end certificate. + ''; + default = null; + type = types.nullOr types.path; + }; + + }; + }; + }; + + dbOptions = { + type = mkOption { + description = "Rippled database type."; + type = types.enum ["rocksdb" "nudb" "sqlite"]; + default = "rocksdb"; + }; + + path = mkOption { + description = "Location to store the database."; + type = types.path; + default = cfg.databasePath; + }; + + compression = mkOption { + description = "Whether to enable snappy compression."; + type = types.nullOr types.bool; + default = null; + }; + + onlineDelete = mkOption { + description = "Enable automatic purging of older ledger information."; + type = types.addCheck (types.nullOr types.int) (v: v > 256); + default = cfg.ledgerHistory; + }; + + advisoryDelete = mkOption { + description = '' + If set, then require administrative RPC call "can_delete" + to enable online deletion of ledger records. + ''; + type = types.nullOr types.bool; + default = null; + }; + + extraOpts = mkOption { + description = "Extra database options."; + type = types.lines; + default = ""; + }; + }; - rippledCfgFile = pkgs.writeText "rippled.cfg" rippledCfg; - in { @@ -37,236 +195,176 @@ in ###### interface options = { - services.rippled = { + enable = mkEnableOption "Whether to enable rippled"; - enable = mkOption { - default = false; - description = "Whether to enable rippled"; + package = mkOption { + description = "Which rippled package to use."; + type = types.package; + default = pkgs.rippled; }; - # - # Rippled has a simple configuration file layout that is easy to - # build with nix. Many of the options are defined here but are - # commented out until the code to append them to the config above - # is written and they are tested. - # - # If you find a yourself implementing more options, please submit a - # pull request. - # + ports = mkOption { + description = "Ports exposed by rippled"; + type = types.attrsOf types.optionSet; + options = [portOptions]; + default = { + rpc = { + port = 5005; + admin = true; + protocol = ["http"]; + }; + + peer = { + port = 51235; + ip = "0.0.0.0"; + protocol = ["peer"]; + }; + + ws_public = { + port = 5006; + ip = "0.0.0.0"; + protocol = ["ws" "wss"]; + }; + }; + }; + + nodeDb = mkOption { + description = "Rippled main database options."; + type = types.nullOr types.optionSet; + options = [dbOptions]; + default = { + type = "rocksdb"; + extraOpts = '' + open_files=2000 + filter_bits=12 + cache_mb=256 + file_size_pb=8 + file_size_mult=2; + ''; + }; + }; + + tempDb = mkOption { + description = "Rippled temporary database options."; + type = types.nullOr types.optionSet; + options = [dbOptions]; + default = null; + }; + + importDb = mkOption { + description = "Settings for performing a one-time import."; + type = types.nullOr types.optionSet; + options = [dbOptions]; + default = null; + }; + + nodeSize = mkOption { + description = '' + Rippled size of the node you are running. + "tiny", "small", "medium", "large", and "huge" + ''; + type = types.enum ["tiny" "small" "medium" "large" "huge"]; + default = "small"; + }; - /* ips = mkOption { - default = [ "r.ripple.com 51235" ]; - example = [ "192.168.0.1" "192.168.0.1 3939" "r.ripple.com 51235" ]; description = '' List of hostnames or ips where the Ripple protocol is served. - For a starter list, you can either copy entries from: + For a starter list, you can either copy entries from: https://ripple.com/ripple.txt or if you prefer you can let it default to r.ripple.com 51235 - A port may optionally be specified after adding a space to the - address. By convention, if known, IPs are listed in from most + A port may optionally be specified after adding a space to the + address. By convention, if known, IPs are listed in from most to least trusted. ''; + type = types.listOf types.str; + default = ["r.ripple.com 51235"]; }; ipsFixed = mkOption { - default = null; - example = [ "192.168.0.1" "192.168.0.1 3939" "r.ripple.com 51235" ]; description = '' - List of IP addresses or hostnames to which rippled should always - attempt to maintain peer connections with. This is useful for - manually forming private networks, for example to configure a - validation server that connects to the Ripple network through a + List of IP addresses or hostnames to which rippled should always + attempt to maintain peer connections with. This is useful for + manually forming private networks, for example to configure a + validation server that connects to the Ripple network through a public-facing server, or for building a set of cluster peers. A port may optionally be specified after adding a space to the address ''; - }; - */ - - peerIp = mkOption { - default = null; - example = "0.0.0.0"; - description = '' - IP address or domain to bind to allow external connections from peers. - Defaults to not binding, which disallows external connections from peers. - ''; + type = types.listOf types.str; + default = []; }; - peerPort = mkOption { - default = 51235; + validators = mkOption { description = '' - If peerIp is supplied, corresponding port to bind to for peer connections. + List of nodes to always accept as validators. Nodes are specified by domain + or public key. ''; + type = types.listOf types.str; + default = [ + "n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7 RL1" + "n9MD5h24qrQqiyBC8aeqqCWvpiBiYQ3jxSr91uiDvmrkyHRdYLUj RL2" + "n9L81uNCaPgtUJfaHh89gmdvXKAmSt5Gdsw2g1iPWaPkAHW5Nm4C RL3" + "n9KiYM9CgngLvtRCQHZwgC2gjpdaZcCcbt3VboxiNFcKuwFVujzS RL4" + "n9LdgEtkmGB9E2h3K4Vp7iGUaKuq23Zr32ehxiU8FWY7xoxbWTSA RL5" + ]; }; - /* - peerPortProxy = mkOption { - type = types.int; - example = 51236; + databasePath = mkOption { description = '' - An optional, additional listening port number for peers. Incoming - connections on this port will be required to provide a PROXY Protocol - handshake, described in this document (external link): - - http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt - - The PROXY Protocol is a popular method used by elastic load balancing - service providers such as Amazon, to identify the true IP address and - port number of external incoming connections. - - In addition to enabling this setting, it will also be required to - use your provider-specific control panel or administrative web page - to configure your server instance to receive PROXY Protocol handshakes, - and also to restrict access to your instance to the Elastic Load Balancer. + Path to the ripple database. ''; + type = types.path; + default = "/var/lib/rippled/db"; }; - peerPrivate = mkOption { - default = null; - example = 0; + validationQuorum = mkOption { description = '' - 0: Request peers to broadcast your address. Normal outbound peer connections [default] - 1: Request peers not broadcast your address. Only connect to configured peers. - ''; - }; - - peerSslCipherList = mkOption { - default = null; - example = "ALL:!LOW:!EXP:!MD5:@STRENGTH"; - description = '' - A colon delimited string with the allowed SSL cipher modes for peer. The - choices for for ciphers are defined by the OpenSSL API function - SSL_CTX_set_cipher_list, documented here (external link): - - http://pic.dhe.ibm.com/infocenter/tpfhelp/current/index.jsp?topic=%2Fcom.ibm.ztpf-ztpfdf.doc_put.cur%2Fgtpc2%2Fcpp_ssl_ctx_set_cipher_list.html - - The default setting of "ALL:!LOW:!EXP:!MD5:@STRENGTH", which allows - non-authenticated peer connections (they are, however, secure). - ''; - }; - - nodeSeed = mkOption { - default = null; - example = "RASH BUSH MILK LOOK BAD BRIM AVID GAFF BAIT ROT POD LOVE"; - description = '' - This is used for clustering. To force a particular node seed or key, the - key can be set here. The format is the same as the validation_seed field. - To obtain a validation seed, use the rippled validation_create command. - ''; - }; - - clusterNodes = mkOption { - default = null; - example = [ "n9KorY8QtTdRx7TVDpwnG9NvyxsDwHUKUEeDLY3AkiGncVaSXZi5" ]; - description = '' - To extend full trust to other nodes, place their node public keys here. - Generally, you should only do this for nodes under common administration. - Node public keys start with an 'n'. To give a node a name for identification - place a space after the public key and then the name. - ''; - }; - - sntpServers = mkOption { - default = null; - example = [ "time.nist.gov" "pool.ntp.org" ]; - description = '' - IP address or domain of NTP servers to use for time synchronization. - ''; - }; - - # TODO: websocket options - - rpcAllowRemote = mkOption { - default = false; - description = '' - false: Allow RPC connections only from 127.0.0.1. [default] - true: Allow RPC connections from any IP. - ''; - }; - - rpcAdminAllow = mkOption { - example = [ "10.0.0.4" ]; - description = '' - List of IP addresses allowed to have admin access. - ''; - }; - - rpcAdminUser = mkOption { - type = types.str; - description = '' - As a server, require this as the admin user to be specified. Also, require - rpc_admin_user and rpc_admin_password to be checked for RPC admin functions. - The request must specify these as the admin_user and admin_password in the - request object. - ''; - }; - - rpcAdminPassword = mkOption { - type = types.str; - description = '' - As a server, require this as the admin pasword to be specified. Also, - require rpc_admin_user and rpc_admin_password to be checked for RPC admin - functions. The request must specify these as the admin_user and - admin_password in the request object. - ''; - }; - - rpcIp = mkOption { - type = types.str; - description = '' - IP address or domain to bind to allow insecure RPC connections. - Defaults to not binding, which disallows RPC connections. + The minimum number of trusted validations a ledger must have before + the server considers it fully validated. ''; + type = types.int; + default = 3; }; - rpcPort = mkOption { - type = types.int; - description = '' - If rpcIp is supplied, corresponding port to bind to for peer connections. - ''; - }; - - rpcUser = mkOption { - type = types.str; + ledgerHistory = mkOption { description = '' - Require a this user to specified and require rpcPassword to - be checked for RPC access via the rpcIp and rpcPort. The user and password - must be specified via HTTP's basic authentication method. - As a client, supply this to the server via HTTP's basic authentication - method. + The number of past ledgers to acquire on server startup and the minimum + to maintain while running. ''; + type = types.either types.int (types.enum ["full"]); + default = 1296000; # 1 month }; - rpcPassword = mkOption { - type = types.str; + fetchDepth = mkOption { description = '' - Require a this password to specified and require rpc_user to - be checked for RPC access via the rpcIp and rpcPort. The user and password - must be specified via HTTP's basic authentication method. - As a client, supply this to the server via HTTP's basic authentication - method. + The number of past ledgers to serve to other peers that request historical + ledger data (or "full" for no limit). ''; + type = types.either types.int (types.enum ["full"]); + default = "full"; }; - rpcStartup = mkOption { - example = [ ''"command" : "log_level"'' ''"partition" : "ripplecalc"'' ''"severity" : "trace"'' ]; - description = "List of RPC commands to run at startup."; - }; - - rpcSecure = mkOption { - default = false; + sntpServers = mkOption { description = '' - false: Server certificates are not provided for RPC clients using SSL [default] - true: Client RPC connections wil be provided with SSL certificates. - - Note that if rpc_secure is enabled, it will also be necessasry to configure the - certificate file settings located in rpcSslCert, rpcSslChain, and rpcSslKey + IP address or domain of NTP servers to use for time synchronization.; ''; + type = types.listOf types.str; + default = [ + "time.windows.com" + "time.apple.com" + "time.nist.gov" + "pool.ntp.org" + ]; + }; + + logLevel = mkOption { + description = "Logging verbosity."; + type = types.enum ["debug" "error" "info"]; + default = "error"; }; - */ extraConfig = mkOption { default = ""; @@ -275,8 +373,11 @@ in ''; }; + config = mkOption { + internal = true; + default = pkgs.writeText "rippled.conf" rippledCfg; + }; }; - }; @@ -288,27 +389,21 @@ in { name = "rippled"; description = "Ripple server user"; uid = config.ids.uids.rippled; - home = "/var/lib/rippled"; + home = cfg.databasePath; + createHome = true; }; systemd.services.rippled = { - path = [ pkgs.rippled ]; - after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = "${pkgs.rippled}/bin/rippled --fg -q --conf ${rippledStateCfgFile}"; - WorkingDirectory = "/var/lib/rippled"; + ExecStart = "${cfg.package}/bin/rippled --fg --conf ${cfg.config}"; + User = "rippled"; }; }; - networking.firewall.allowedTCPPorts = mkIf (cfg.peerIp != null) [ cfg.peerPort ]; + environment.systemPackages = [ cfg.package ]; - system.activationScripts.rippled = '' - mkdir -p /var/{lib,log}/rippled - chown -R rippled /var/{lib,log}/rippled - ln -sf ${rippledCfgFile} ${rippledStateCfgFile} - ''; }; } From f0a6d09bf06948a5dc703584e4591a339c1eaada Mon Sep 17 00:00:00 2001 From: William Roe Date: Sun, 22 Mar 2015 01:13:15 +0000 Subject: [PATCH 09/53] Haskell llvm-general 3.4.4.0 requires LLVM==3.4.* --- pkgs/top-level/haskell-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index cc936d77608..e6c49c1aad8 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -1638,7 +1638,7 @@ self : let callPackage = x : y : modifyPrio (newScope self x y); in ListZipper = callPackage ../development/libraries/haskell/ListZipper {}; - llvmGeneral = callPackage ../development/libraries/haskell/llvm-general { llvmConfig = pkgs.llvm; }; + llvmGeneral = callPackage ../development/libraries/haskell/llvm-general { llvmConfig = pkgs.llvmPackages_34.llvm; }; llvmGeneralPure = callPackage ../development/libraries/haskell/llvm-general-pure {}; From de9e7bc5f1cd881a94c6c3372b75b16f1008a15c Mon Sep 17 00:00:00 2001 From: j-keck Date: Sun, 22 Mar 2015 19:58:01 +0100 Subject: [PATCH 10/53] sbt: bump to 0.13.8 --- pkgs/development/tools/build-managers/sbt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/sbt/default.nix b/pkgs/development/tools/build-managers/sbt/default.nix index 72beb092bb0..01a3b740e6e 100644 --- a/pkgs/development/tools/build-managers/sbt/default.nix +++ b/pkgs/development/tools/build-managers/sbt/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "sbt-${version}"; - version = "0.13.7"; + version = "0.13.8"; src = fetchurl { url = "http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${version}/sbt-launch.jar"; - sha256 = "9673ca4611e6367955ae068d5888f7ae665ab013c3e8435ffe2ca94318c6d607"; + sha256 = "0n4ivla8s8ygfnf95dj624nhcyganigf7fy0gamgyf31vw1vnw35"; }; phases = [ "installPhase" ]; From a5fb20d65a0a2644bb3283f65b8a12e23b6c2320 Mon Sep 17 00:00:00 2001 From: Henry Till Date: Sun, 22 Mar 2015 16:31:25 -0400 Subject: [PATCH 11/53] opam: update to 1.2.1 --- .../ocaml/opam/1.2.0-src_ext-Makefile.patch | 11 ------- .../ocaml/opam/{1.2.0.nix => default.nix} | 31 ++++++++++--------- pkgs/top-level/all-packages.nix | 3 +- 3 files changed, 17 insertions(+), 28 deletions(-) delete mode 100644 pkgs/development/tools/ocaml/opam/1.2.0-src_ext-Makefile.patch rename pkgs/development/tools/ocaml/opam/{1.2.0.nix => default.nix} (75%) diff --git a/pkgs/development/tools/ocaml/opam/1.2.0-src_ext-Makefile.patch b/pkgs/development/tools/ocaml/opam/1.2.0-src_ext-Makefile.patch deleted file mode 100644 index 523d0f6524e..00000000000 --- a/pkgs/development/tools/ocaml/opam/1.2.0-src_ext-Makefile.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- opam-1.2.0/src_ext/Makefile 2014-10-15 21:32:13.000000000 -0400 -+++ opam-1.2.0/src_ext/Makefile.new 2014-10-29 17:37:00.785365601 -0400 -@@ -51,7 +51,7 @@ archives: $(SRC_EXTS:=.download) - [ -e $(notdir $(URL_$*)) ] || $(FETCH) $(URL_$*) - $(MD5CHECK) $(notdir $(URL_$*)) $(MD5_$*) - --%.stamp: %.download -+%.stamp: - mkdir -p tmp - cd tmp && tar xf$(if $(patsubst %.tar.gz,,$(URL_$*)),j,z) ../$(notdir $(URL_$*)) - rm -rf $* diff --git a/pkgs/development/tools/ocaml/opam/1.2.0.nix b/pkgs/development/tools/ocaml/opam/default.nix similarity index 75% rename from pkgs/development/tools/ocaml/opam/1.2.0.nix rename to pkgs/development/tools/ocaml/opam/default.nix index 9081bcbcb09..b6dce132868 100644 --- a/pkgs/development/tools/ocaml/opam/1.2.0.nix +++ b/pkgs/development/tools/ocaml/opam/default.nix @@ -1,6 +1,5 @@ { stdenv, fetchgit, fetchurl, ocaml, unzip, ncurses, curl }: -# Opam 1.2.0 only works with ocaml >= 3.12.1 according to ./configure assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12.1"; let @@ -22,12 +21,12 @@ let sha256 = "d167466435a155c779d5ec25b2db83ad851feb42ebc37dca8ffa345ddaefb82f"; }; dose3 = fetchurl { - url = "https://gforge.inria.fr/frs/download.php/file/33677/dose3-3.2.2.tar.gz"; - sha256 = "a30a189f9f298ed1de96d7098440c951f3df2c8da626f7f37f38cbfddefc909c"; + url = "https://gforge.inria.fr/frs/download.php/file/34277/dose3-3.3.tar.gz"; + sha256 = "8dc4dae9b1a81bb3a42abb283df785ba3eb00ade29b13875821c69f03e00680e"; }; cmdliner = fetchurl { - url = "http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.4.tbz"; - sha256 = "ecb65e2cfd984ec07e97a78f334a80cda41fb8f8bb5e37c41fd33e6a0e2e69ef"; + url = "http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.7.tbz"; + sha256 = "9c19893cffb5d3c3469ee0cce85e3eeeba17d309b33b9ace31aba06f68f0bf7a"; }; uutf = fetchurl { url = "http://erratique.ch/software/uutf/releases/uutf-0.9.3.tbz"; @@ -38,13 +37,13 @@ let sha256 = "3fd4dca045d82332da847e65e981d8b504883571d299a3f7e71447d46bc65f73"; }; opam = fetchurl { - url = "https://github.com/ocaml/opam/archive/1.2.0.zip"; - sha256 = "b78bb9570fbd1dae50583792525a3dd612f8f90db367771fabd7bf4571ba25f7"; + url = "https://github.com/ocaml/opam/archive/1.2.1.zip"; + sha256 = "1mvsy89l5g9nvwmmls5jf46anh6gk8dk8a1dn42rmnihnb0zjcs4"; }; }; -in -stdenv.mkDerivation rec { - name = "opam-1.2.0"; +in stdenv.mkDerivation rec { + name = "opam-${version}"; + version = "1.2.1"; buildInputs = [ unzip curl ncurses ocaml ]; @@ -61,7 +60,9 @@ stdenv.mkDerivation rec { ln -sv ${srcs.jsonm} $sourceRoot/src_ext/${srcs.jsonm.name} ''; - patches = [ ./1.2.0-src_ext-Makefile.patch ]; + preConfigure = '' + substituteInPlace ./src_ext/Makefile --replace "%.stamp: %.download" "%.stamp:" + ''; postConfigure = "make lib-ext"; @@ -70,10 +71,10 @@ stdenv.mkDerivation rec { doCheck = false; - meta = { - maintainers = [ stdenv.lib.maintainers.henrytill ]; + meta = with stdenv.lib; { description = "A package manager for OCaml"; - homepage = "http://opam.ocamlpro.com/"; - platforms = stdenv.lib.platforms.all; + homepage = http://opam.ocamlpro.com/; + maintainers = [ maintainers.henrytill ]; + platforms = platforms.all; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bf0f408b73f..3a91dfe5fa2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4252,8 +4252,7 @@ let opam_1_1 = callPackage ../development/tools/ocaml/opam/1.1.nix { inherit (ocamlPackages_4_01_0) ocaml; }; - opam_1_2_0 = callPackage ../development/tools/ocaml/opam/1.2.0.nix { }; - opam = opam_1_2_0; + opam = callPackage ../development/tools/ocaml/opam { }; ocamlnat = let callPackage = newScope pkgs.ocamlPackages_3_12_1; in callPackage ../development/ocaml-modules/ocamlnat { }; From 3c7a9194317aa68e64baaab78dd6fb3ff4309495 Mon Sep 17 00:00:00 2001 From: Aistis Raulinaitis Date: Sat, 21 Mar 2015 22:01:54 -0700 Subject: [PATCH 12/53] ansi-wl-pprint hash correction --- pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix index 34204d6462f..df44501aadd 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix @@ -129,6 +129,6 @@ self: super: { # https://github.com/batterseapower/ansi-wl-pprint/issues/13 ansi-wl-pprint = appendPatch super.ansi-wl-pprint (pkgs.fetchpatch { url = "https://github.com/hvr/ansi-wl-pprint/commit/7e489ea6b546899074b1cdccf37d2e49ab313098.patch"; - sha256 = "111aasm6pb55prldzwzgfffd5zz1npl7akdzcwh2hsri865i1806"; + sha256 = "0j20cwbph1wg82gfad5a6gfc5gy42cf4vz514jrpfg8d9qvyfhlj"; }); } From 9255f6c0afeb2d9538eb96700e7f7ecb55b52b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edward=20Tj=C3=B6rnhammar?= Date: Sun, 22 Mar 2015 23:02:42 +0100 Subject: [PATCH 13/53] keychain: 2.7.1 -> 2.8.0 --- pkgs/tools/misc/keychain/default.nix | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/misc/keychain/default.nix b/pkgs/tools/misc/keychain/default.nix index 2eb63f09216..1ed6be071a5 100644 --- a/pkgs/tools/misc/keychain/default.nix +++ b/pkgs/tools/misc/keychain/default.nix @@ -1,21 +1,26 @@ -{ stdenv, fetchurl, makeWrapper, coreutils, openssh, gnupg +{ stdenv, fetchFromGitHub, makeWrapper, coreutils, openssh, gnupg , procps, gnugrep, gawk, findutils, gnused }: -stdenv.mkDerivation { - name = "keychain-2.7.1"; +stdenv.mkDerivation rec { + name = "keychain-${version}"; + version = "2.8.0"; - src = fetchurl { - url = mirror://gentoo/distfiles/keychain-2.7.1.tar.bz2; - sha256 = "14ai6wjwnj09xnl81ar2dlr5kwb8y1k5ck6nc549shpng0zzw1qi"; + src = fetchFromGitHub { + owner = "funtoo"; + repo = "keychain"; + rev = "1c8eaba53a7788d12d086b66ac3929810510f73a"; + sha256 = "0ajas58cv8mp5wb6hn1zhsqiwfxvx69p4f91a5j2as299rxgrxlp"; }; - phases = [ "unpackPhase" "buildPhase" ]; + phases = [ "unpackPhase" "patchPhase" "buildPhase" ]; buildInputs = [ makeWrapper ]; + patchPhase = "sed -i -e 's,version=.*,version=\"${version}\",g' keychain.sh"; + buildPhase = '' mkdir -p $out/bin - cp keychain $out/bin + cp keychain.sh $out/bin/keychain wrapProgram $out/bin/keychain \ --prefix PATH ":" "${coreutils}/bin" \ --prefix PATH ":" "${openssh}/bin" \ @@ -27,9 +32,9 @@ stdenv.mkDerivation { --prefix PATH ":" "${procps}/bin" ''; - meta = { + meta = { description = "Keychain management tool"; - homepage = "http://www.gentoo.org/proj/en/keychain/"; + homepage = "http://www.funtoo.org/Keychain"; license = stdenv.lib.licenses.gpl2; }; } From 624fcfce6426d54b40b37443ce5c78fc6d5cb7ff Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Sun, 22 Mar 2015 18:29:57 -0500 Subject: [PATCH 14/53] nixpkgs: afl 1.56b -> 1.57b Signed-off-by: Austin Seipp --- pkgs/tools/security/afl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/afl/default.nix b/pkgs/tools/security/afl/default.nix index dd2bcd7b61e..b1c37331042 100644 --- a/pkgs/tools/security/afl/default.nix +++ b/pkgs/tools/security/afl/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "afl-${version}"; - version = "1.56b"; + version = "1.57b"; src = fetchurl { url = "http://lcamtuf.coredump.cx/afl/releases/${name}.tgz"; - sha256 = "1nagd9ycj0i1h7kx2pz07fpwy4b528inmc9hj7226qiid0bynsh4"; + sha256 = "05dwh2kgz31702y339bvbs0b3ffadxgxk8cqqhs2i0ggx5bnl5p4"; }; buildPhase = "make PREFIX=$out"; From a11078a78c246aa26ddeb8918e4975eb886b1047 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Sun, 22 Mar 2015 21:57:55 -0500 Subject: [PATCH 15/53] nixpkgs: afl - add QEMU support This adds support for `afl-fuzz -Q`, which can be used to instrument arbitrary black-box binary code for fuzz testing using American Fuzzy Lop through QEMU emulation. This requires a custom QEMU 2.2.0 build of the Linux userspace emulators (system emulators aren't required) with some custom patches. Furthermore we have to patch the patches a little to make the build more sane (there are some notes in the README about this). Overall, the addition of this feature by default doesn't significantly impact build times (since building QEMU for only one target builds only a fraction of the source code, and many features are disabled), so it's enabled by default. Signed-off-by: Austin Seipp --- pkgs/tools/security/afl/README.md | 19 + pkgs/tools/security/afl/default.nix | 26 +- .../security/afl/qemu-patches/afl-config.h | 329 ++++++++++++++++++ .../afl/qemu-patches/afl-qemu-cpu-inl.h | 287 +++++++++++++++ .../security/afl/qemu-patches/afl-types.h | 79 +++++ .../security/afl/qemu-patches/cpu-exec.patch | 33 ++ .../security/afl/qemu-patches/elfload.patch | 32 ++ .../afl/qemu-patches/no-etc-install.patch | 14 + .../afl/qemu-patches/translate-all.patch | 18 + pkgs/tools/security/afl/qemu.nix | 72 ++++ 10 files changed, 907 insertions(+), 2 deletions(-) create mode 100644 pkgs/tools/security/afl/README.md create mode 100644 pkgs/tools/security/afl/qemu-patches/afl-config.h create mode 100644 pkgs/tools/security/afl/qemu-patches/afl-qemu-cpu-inl.h create mode 100644 pkgs/tools/security/afl/qemu-patches/afl-types.h create mode 100644 pkgs/tools/security/afl/qemu-patches/cpu-exec.patch create mode 100644 pkgs/tools/security/afl/qemu-patches/elfload.patch create mode 100644 pkgs/tools/security/afl/qemu-patches/no-etc-install.patch create mode 100644 pkgs/tools/security/afl/qemu-patches/translate-all.patch create mode 100644 pkgs/tools/security/afl/qemu.nix diff --git a/pkgs/tools/security/afl/README.md b/pkgs/tools/security/afl/README.md new file mode 100644 index 00000000000..7d954461773 --- /dev/null +++ b/pkgs/tools/security/afl/README.md @@ -0,0 +1,19 @@ +Updating the QEMU patches +========================= + +When updating to the latest American Fuzzy Lop, make sure to check for +any new patches to qemu for binary fuzzing support: + +https://github.com/mirrorer/afl/tree/master/qemu_mode + +Be sure to check the build script and make sure it's also using the +right QEMU version and options in `qemu.nix`: + +https://github.com/mirrorer/afl/blob/master/qemu_mode/build_qemu_support.sh + +`afl-config.h` and `afl-qemu-cpu-inl.h` are part of the afl source +code, and copied from `config.h` and `afl-qemu-cpu-inl.h` +appropriately. The QEMU patches need to be slightly adjusted to +`#include` these files (the patches try to otherwise include files +like `../../config.h` which causes the build to fail). See `qemu.nix` +for details. diff --git a/pkgs/tools/security/afl/default.nix b/pkgs/tools/security/afl/default.nix index b1c37331042..ed9b6d56edb 100644 --- a/pkgs/tools/security/afl/default.nix +++ b/pkgs/tools/security/afl/default.nix @@ -1,5 +1,11 @@ -{ stdenv, fetchurl, bash }: +{ stdenv, fetchurl, bash, callPackage, makeWrapper }: +let + afl-qemu = callPackage ./qemu.nix {}; + qemu-exe-name = if stdenv.system == "x86_64-linux" then "qemu-x86_64" + else if stdenv.system == "i686-linux" then "qemu-i386" + else throw "afl: no support for ${stdenv.system}!"; +in stdenv.mkDerivation rec { name = "afl-${version}"; version = "1.57b"; @@ -9,8 +15,24 @@ stdenv.mkDerivation rec { sha256 = "05dwh2kgz31702y339bvbs0b3ffadxgxk8cqqhs2i0ggx5bnl5p4"; }; + buildInputs = [ makeWrapper ]; + buildPhase = "make PREFIX=$out"; - installPhase = "make install PREFIX=$out"; + installPhase = '' + # Do the normal installation + make install PREFIX=$out + + # Install the custom QEMU emulator for binary blob fuzzing. + cp ${afl-qemu}/bin/${qemu-exe-name} $out/bin/afl-qemu-trace + + # Wrap every program with a custom $AFL_PATH; I believe there is a + # bug in afl which causes it to fail to find `afl-qemu-trace` + # relative to `afl-fuzz` or `afl-showmap`, so we instead set + # $AFL_PATH as a workaround, which allows it to be found. + for x in `ls $out/bin/afl-*`; do + wrapProgram $x --prefix AFL_PATH : "$out/bin" + done + ''; meta = { description = "Powerful fuzzer via genetic algorithms and instrumentation"; diff --git a/pkgs/tools/security/afl/qemu-patches/afl-config.h b/pkgs/tools/security/afl/qemu-patches/afl-config.h new file mode 100644 index 00000000000..051b38ffbca --- /dev/null +++ b/pkgs/tools/security/afl/qemu-patches/afl-config.h @@ -0,0 +1,329 @@ +/* + american fuzzy lop - vaguely configurable bits + ---------------------------------------------- + + Written and maintained by Michal Zalewski + + Copyright 2013, 2014, 2015 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + */ + +#ifndef _HAVE_CONFIG_H +#define _HAVE_CONFIG_H + +#include "afl-types.h" + +/****************************************************** + * * + * Settings that may be of interest to power users: * + * * + ******************************************************/ + +/* Comment out to disable terminal colors: */ + +#define USE_COLOR + +/* Comment out to disable fancy ANSI boxes and use poor man's 7-bit UI: */ + +#define FANCY_BOXES + +/* Default timeout for fuzzed code (milliseconds): */ + +#define EXEC_TIMEOUT 1000 + +/* Timeout rounding factor when auto-scaling (milliseconds): */ + +#define EXEC_TM_ROUND 20 + +/* Default memory limit for child process (MB): */ + +#ifndef __x86_64__ +# define MEM_LIMIT 25 +#else +# define MEM_LIMIT 50 +#endif /* ^!__x86_64__ */ + +/* Default memory limit when running in QEMU mode (MB): */ + +#define MEM_LIMIT_QEMU 200 + +/* Number of calibration cycles per every new test case (and for test + cases that show variable behavior): */ + +#define CAL_CYCLES 10 +#define CAL_CYCLES_LONG 40 + +/* The same, but when AFL_NO_VAR_CHECK is set in the environment: */ + +#define CAL_CYCLES_NO_VAR 4 + +/* Number of subsequent hangs before abandoning an input file: */ + +#define HANG_LIMIT 250 + +/* Maximum number of unique hangs or crashes to record: */ + +#define KEEP_UNIQUE_HANG 500 +#define KEEP_UNIQUE_CRASH 5000 + +/* Baseline number of random tweaks during a single 'havoc' stage: */ + +#define HAVOC_CYCLES 5000 + +/* Maximum multiplier for the above (should be a power of two, beware + of 32-bit int overflows): */ + +#define HAVOC_MAX_MULT 16 + +/* Absolute minimum number of havoc cycles (after all adjustments): */ + +#define HAVOC_MIN 10 + +/* Maximum stacking for havoc-stage tweaks. The actual value is calculated + like this: + + n = random between 0 and HAVOC_STACK_POW2 + stacking = 2^n + + In other words, the default (n = 7) produces 1, 2, 4, 8, 16, 32, 64, or + 128 stacked tweaks: */ + +#define HAVOC_STACK_POW2 7 + +/* Caps on block sizes for cloning and deletion operations. Each of these + ranges has a 33% probability of getting picked, except for the first + two cycles where smaller blocks are favored: */ + +#define HAVOC_BLK_SMALL 32 +#define HAVOC_BLK_MEDIUM 128 +#define HAVOC_BLK_LARGE 1500 + +/* Probabilities of skipping non-favored entries in the queue, expressed as + percentages: */ + +#define SKIP_TO_NEW_PROB 99 /* ...when there are new, pending favorites */ +#define SKIP_NFAV_OLD_PROB 95 /* ...no new favs, cur entry already fuzzed */ +#define SKIP_NFAV_NEW_PROB 75 /* ...no new favs, cur entry not fuzzed yet */ + +/* Splicing cycle count: */ + +#define SPLICE_CYCLES 20 + +/* Nominal per-splice havoc cycle length: */ + +#define SPLICE_HAVOC 500 + +/* Maximum offset for integer addition / subtraction stages: */ + +#define ARITH_MAX 35 + +/* Limits for the test case trimmer. The absolute minimum chunk size; and + the starting and ending divisors for chopping up the input file: */ + +#define TRIM_MIN_BYTES 4 +#define TRIM_START_STEPS 16 +#define TRIM_END_STEPS 1024 + +/* Maximum size of input file, in bytes (keep under 100MB): */ + +#define MAX_FILE (1 * 1024 * 1024) + +/* The same, for the test case minimizer: */ + +#define TMIN_MAX_FILE (10 * 1024 * 1024) + +/* Maximum dictionary token size (-x), in bytes: */ + +#define MAX_DICT_FILE 128 + +/* Length limits for auto-detected dictionary tokens: */ + +#define MIN_AUTO_EXTRA 3 +#define MAX_AUTO_EXTRA 32 + +/* Maximum number of user-specified dictionary tokens to use in deterministic + steps; past this point, the "extras/user" step will be still carried out, + but with proportionally lower odds: */ + +#define MAX_DET_EXTRAS 200 + +/* Maximum number of auto-extracted dictionary tokens to actually use in fuzzing + (first value), and to keep in memory as candidates. The latter should be much + higher than the former. */ + +#define USE_AUTO_EXTRAS 50 +#define MAX_AUTO_EXTRAS (USE_AUTO_EXTRAS * 10) + +/* Scaling factor for the effector map used to skip some of the more + expensive deterministic steps. The actual divisor is set to + 2^EFF_MAP_SCALE2 bytes: */ + +#define EFF_MAP_SCALE2 3 + +/* Minimum input file length at which the effector logic kicks in: */ + +#define EFF_MIN_LEN 128 + +/* Maximum effector density past which everything is just fuzzed + unconditionally (%): */ + +#define EFF_MAX_PERC 90 + +/* UI refresh frequency (Hz): */ + +#define UI_TARGET_HZ 5 + +/* Fuzzer stats file and plot update intervals (sec): */ + +#define STATS_UPDATE_SEC 60 +#define PLOT_UPDATE_SEC 5 + +/* Smoothing divisor for CPU load and exec speed stats (1 - no smoothing). */ + +#define AVG_SMOOTHING 16 + +/* Sync interval (every n havoc cycles): */ + +#define SYNC_INTERVAL 5 + +/* Output directory reuse grace period (minutes): */ + +#define OUTPUT_GRACE 25 + +/* Uncomment to use simple file names (id_NNNNNN): */ + +// #define SIMPLE_FILES + +/* List of interesting values to use in fuzzing. */ + +#define INTERESTING_8 \ + -128, /* Overflow signed 8-bit when decremented */ \ + -1, /* */ \ + 0, /* */ \ + 1, /* */ \ + 16, /* One-off with common buffer size */ \ + 32, /* One-off with common buffer size */ \ + 64, /* One-off with common buffer size */ \ + 100, /* One-off with common buffer size */ \ + 127 /* Overflow signed 8-bit when incremented */ + +#define INTERESTING_16 \ + -32768, /* Overflow signed 16-bit when decremented */ \ + -129, /* Overflow signed 8-bit */ \ + 128, /* Overflow signed 8-bit */ \ + 255, /* Overflow unsig 8-bit when incremented */ \ + 256, /* Overflow unsig 8-bit */ \ + 512, /* One-off with common buffer size */ \ + 1000, /* One-off with common buffer size */ \ + 1024, /* One-off with common buffer size */ \ + 4096, /* One-off with common buffer size */ \ + 32767 /* Overflow signed 16-bit when incremented */ + +#define INTERESTING_32 \ + -2147483648LL, /* Overflow signed 32-bit when decremented */ \ + -100663046, /* Large negative number (endian-agnostic) */ \ + -32769, /* Overflow signed 16-bit */ \ + 32768, /* Overflow signed 16-bit */ \ + 65535, /* Overflow unsig 16-bit when incremented */ \ + 65536, /* Overflow unsig 16 bit */ \ + 100663045, /* Large positive number (endian-agnostic) */ \ + 2147483647 /* Overflow signed 32-bit when incremented */ + +/*********************************************************** + * * + * Really exotic stuff you probably don't want to touch: * + * * + ***********************************************************/ + +/* Call count interval between reseeding the libc PRNG from /dev/urandom: */ + +#define RESEED_RNG 10000 + +/* Maximum line length passed from GCC to 'as': */ + +#define MAX_AS_LINE 8192 + +/* Environment variable used to pass SHM ID to the called program. */ + +#define SHM_ENV_VAR "__AFL_SHM_ID" + +/* Other less interesting, internal-only variables. */ + +#define CLANG_ENV_VAR "__AFL_CLANG_MODE" +#define AS_LOOP_ENV_VAR "__AFL_AS_LOOPCHECK" + +/* Distinctive bitmap signature used to indicate failed execution: */ + +#define EXEC_FAIL_SIG 0xfee1dead + +/* Distinctive exit code used to indicate MSAN trip condition: */ + +#define MSAN_ERROR 86 + +/* Designated file descriptors for forkserver commands (the application will + use FORKSRV_FD and FORKSRV_FD + 1): */ + +#define FORKSRV_FD 198 + +/* Fork server init timeout multiplier: we'll wait the user-selected + timeout plus this much for the fork server to spin up. */ + +#define FORK_WAIT_MULT 10 + +/* Calibration timeout adjustments, to be a bit more generous when resuming + fuzzing sessions or trying to calibrate already-added internal finds. + The first value is a percentage, the other is in milliseconds: */ + +#define CAL_TMOUT_PERC 125 +#define CAL_TMOUT_ADD 50 + +/* Number of chances to calibrate a case before giving up: */ + +#define CAL_CHANCES 3 + +/* Map size for the traced binary (2^MAP_SIZE_POW2). Must be greater than + 2; you probably want to keep it under 18 or so for performance reasons + (adjusting AFL_INST_RATIO when compiling is probably a better way to solve + problems with complex programs). You need to recompile the target binary + after changing this - otherwise, SEGVs may ensue. */ + +#define MAP_SIZE_POW2 16 +#define MAP_SIZE (1 << MAP_SIZE_POW2) + +/* Maximum allocator request size (keep well under INT_MAX): */ + +#define MAX_ALLOC 0x40000000 + +/* A made-up hashing seed: */ + +#define HASH_CONST 0xa5b35705 + +/* Constants for afl-gotcpu to control busy loop timing: */ + +#define CTEST_TARGET_MS 5000 +#define CTEST_BUSY_CYCLES (10 * 1000 * 1000) + +/* Uncomment this to use inferior block-coverage-based instrumentation. Note + that you need to recompile the target binary for this to have any effect: */ + +// #define COVERAGE_ONLY + +/* Uncomment this to ignore hit counts and output just one bit per tuple. + As with the previous setting, you will need to recompile the target + binary: */ + +// #define SKIP_COUNTS + +/* Uncomment this to use instrumentation data to record newly discovered paths, + but do not use them as seeds for fuzzing. This is useful for conveniently + measuring coverage that could be attained by a "dumb" fuzzing algorithm: */ + +// #define IGNORE_FINDS + +#endif /* ! _HAVE_CONFIG_H */ diff --git a/pkgs/tools/security/afl/qemu-patches/afl-qemu-cpu-inl.h b/pkgs/tools/security/afl/qemu-patches/afl-qemu-cpu-inl.h new file mode 100644 index 00000000000..7d5a47669e4 --- /dev/null +++ b/pkgs/tools/security/afl/qemu-patches/afl-qemu-cpu-inl.h @@ -0,0 +1,287 @@ +/* + american fuzzy lop - high-performance binary-only instrumentation + ----------------------------------------------------------------- + + Written by Andrew Griffiths and + Michal Zalewski + + Idea & design very much by Andrew Griffiths. + + Copyright 2015 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + This code is a shim patched into the separately-distributed source + code of QEMU 2.2.0. It leverages the built-in QEMU tracing functionality + to implement AFL-style instrumentation and to take care of the remaining + parts of the AFL fork server logic. + + The resulting QEMU binary is essentially a standalone instrumentation + tool; for an example of how to leverage it for other purposes, you can + have a look at afl-showmap.c. + + */ + +#include +#include "afl-config.h" + +/*************************** + * VARIOUS AUXILIARY STUFF * + ***************************/ + +/* A snippet patched into tb_find_slow to inform the parent process that + we have hit a new block that hasn't been translated yet, and to tell + it to translate within its own context, too (this avoids translation + overhead in the next forked-off copy). */ + +#define AFL_QEMU_CPU_SNIPPET1 do { \ + afl_request_tsl(pc, cs_base, flags); \ + } while (0) + +/* This snippet kicks in when the instruction pointer is positioned at + _start and does the usual forkserver stuff, not very different from + regular instrumentation injected via afl-as.h. */ + +#define AFL_QEMU_CPU_SNIPPET2 do { \ + if(tb->pc == afl_entry_point) { \ + afl_setup(); \ + afl_forkserver(env); \ + } \ + afl_maybe_log(tb->pc); \ + } while (0) + +/* We use one additional file descriptor to relay "needs translation" + messages between the child and the fork server. */ + +#define TSL_FD (FORKSRV_FD - 1) + +/* This is equivalent to afl-as.h: */ + +static unsigned char *afl_area_ptr; + +/* Exported variables populated by the code patched into elfload.c: */ + +abi_ulong afl_entry_point, /* ELF entry point (_start) */ + afl_start_code, /* .text start pointer */ + afl_end_code; /* .text end pointer */ + +/* Set on the child in forkserver mode: */ + +static unsigned char afl_fork_child; + +/* Instrumentation ratio: */ + +static unsigned int afl_inst_rms = MAP_SIZE; + +/* Function declarations. */ + +static void afl_setup(void); +static void afl_forkserver(CPUArchState*); +static inline void afl_maybe_log(abi_ulong); + +static void afl_wait_tsl(CPUArchState*, int); +static void afl_request_tsl(target_ulong, target_ulong, uint64_t); + +static TranslationBlock *tb_find_slow(CPUArchState*, target_ulong, + target_ulong, uint64_t); + + +/* Data structure passed around by the translate handlers: */ + +struct afl_tsl { + target_ulong pc; + target_ulong cs_base; + uint64_t flags; +}; + + +/************************* + * ACTUAL IMPLEMENTATION * + *************************/ + + +/* Set up SHM region and initialize other stuff. */ + +static void afl_setup(void) { + + char *id_str = getenv(SHM_ENV_VAR), + *inst_r = getenv("AFL_INST_RATIO"); + + int shm_id; + + if (inst_r) { + + unsigned int r; + + r = atoi(inst_r); + + if (r > 100) r = 100; + if (!r) r = 1; + + afl_inst_rms = MAP_SIZE * r / 100; + + } + + if (id_str) { + + shm_id = atoi(id_str); + afl_area_ptr = shmat(shm_id, NULL, 0); + + if (afl_area_ptr == (void*)-1) exit(1); + + } + + if (getenv("AFL_INST_LIBS")) { + + afl_start_code = 0; + afl_end_code = (abi_ulong)-1; + + } + +} + + +/* Fork server logic, invoked once we hit _start. */ + +static void afl_forkserver(CPUArchState *env) { + + static unsigned char tmp[4]; + + if (!afl_area_ptr) return; + + /* Tell the parent that we're alive. If the parent doesn't want + to talk, assume that we're not running in forkserver mode. */ + + if (write(FORKSRV_FD + 1, tmp, 4) != 4) return; + + /* All right, let's await orders... */ + + while (1) { + + pid_t child_pid; + int status, t_fd[2]; + + /* Whoops, parent dead? */ + + if (read(FORKSRV_FD, tmp, 4) != 4) exit(2); + + /* Establish a channel with child to grab translation commands. We'll + read from t_fd[0], child will write to TSL_FD. */ + + if (pipe(t_fd) || dup2(t_fd[1], TSL_FD) < 0) exit(3); + close(t_fd[1]); + + child_pid = fork(); + if (child_pid < 0) exit(4); + + if (!child_pid) { + + /* Child process. Close descriptors and run free. */ + + afl_fork_child = 1; + close(FORKSRV_FD); + close(FORKSRV_FD + 1); + close(t_fd[0]); + return; + + } + + /* Parent. */ + + close(TSL_FD); + + if (write(FORKSRV_FD + 1, &child_pid, 4) != 4) exit(5); + + /* Collect translation requests until child dies and closes the pipe. */ + + afl_wait_tsl(env, t_fd[0]); + + /* Get and relay exit status to parent. */ + + if (waitpid(child_pid, &status, WUNTRACED) < 0) exit(6); + if (write(FORKSRV_FD + 1, &status, 4) != 4) exit(7); + + } + +} + + +/* The equivalent of the tuple logging routine from afl-as.h. */ + +static inline void afl_maybe_log(abi_ulong cur_loc) { + + static abi_ulong prev_loc; + + /* Optimize for cur_loc > afl_end_code, which is the most likely case on + Linux systems. */ + + if (cur_loc > afl_end_code || cur_loc < afl_start_code || !afl_area_ptr) + return; + + /* Looks like QEMU always maps to fixed locations, so we can skip this: + cur_loc -= afl_start_code; */ + + /* Instruction addresses may be aligned. Let's mangle the value to get + something quasi-uniform. */ + + cur_loc = (cur_loc >> 4) ^ (cur_loc << 8); + cur_loc &= MAP_SIZE - 1; + + /* Implement probabilistic instrumentation by looking at scrambled block + address. This keeps the instrumented locations stable across runs. */ + + if (cur_loc >= afl_inst_rms) return; + + afl_area_ptr[cur_loc ^ prev_loc]++; + prev_loc = cur_loc >> 1; + +} + + +/* This code is invoked whenever QEMU decides that it doesn't have a + translation of a particular block and needs to compute it. When this happens, + we tell the parent to mirror the operation, so that the next fork() has a + cached copy. */ + +static void afl_request_tsl(target_ulong pc, target_ulong cb, uint64_t flags) { + + struct afl_tsl t; + + if (!afl_fork_child) return; + + t.pc = pc; + t.cs_base = cb; + t.flags = flags; + + if (write(TSL_FD, &t, sizeof(struct afl_tsl)) != sizeof(struct afl_tsl)) + return; + +} + + +/* This is the other side of the same channel. Since timeouts are handled by + afl-fuzz simply killing the child, we can just wait until the pipe breaks. */ + +static void afl_wait_tsl(CPUArchState *env, int fd) { + + struct afl_tsl t; + + while (1) { + + /* Broken pipe means it's time to return to the fork server routine. */ + + if (read(fd, &t, sizeof(struct afl_tsl)) != sizeof(struct afl_tsl)) + break; + + tb_find_slow(env, t.pc, t.cs_base, t.flags); + + } + + close(fd); + +} + diff --git a/pkgs/tools/security/afl/qemu-patches/afl-types.h b/pkgs/tools/security/afl/qemu-patches/afl-types.h new file mode 100644 index 00000000000..58d6be51e2d --- /dev/null +++ b/pkgs/tools/security/afl/qemu-patches/afl-types.h @@ -0,0 +1,79 @@ +/* + american fuzzy lop - type definitions and minor macros + ------------------------------------------------------ + + Written and maintained by Michal Zalewski + + Copyright 2013, 2014, 2015 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + */ + +#ifndef _HAVE_TYPES_H +#define _HAVE_TYPES_H + +#include +#include + +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; + +/* + + Ugh. There is an unintended compiler / glibc #include glitch caused by + combining the u64 type an %llu in format strings, necessitating a workaround. + + In essence, the compiler is always looking for 'unsigned long long' for %llu. + On 32-bit systems, the u64 type (aliased to uint64_t) is expanded to + 'unsigned long long' in , so everything checks out. + + But on 64-bit systems, it is #ifdef'ed in the same file as 'unsigned long'. + Now, it only happens in circumstances where the type happens to have the + expected bit width, *but* the compiler does not know that... and complains + about 'unsigned long' being unsafe to pass to %llu. + + */ + +#ifdef __x86_64__ +typedef unsigned long long u64; +#else +typedef uint64_t u64; +#endif /* ^sizeof(...) */ + +typedef int8_t s8; +typedef int16_t s16; +typedef int32_t s32; +typedef int64_t s64; + +#ifndef MIN +# define MIN(_a,_b) ((_a) > (_b) ? (_b) : (_a)) +# define MAX(_a,_b) ((_a) > (_b) ? (_a) : (_b)) +#endif /* !MIN */ + +#define SWAP16(_x) ({ \ + u16 _ret = (_x); \ + (u16)((_ret << 8) | (_ret >> 8)); \ + }) + +#define SWAP32(_x) ({ \ + u32 _ret = (_x); \ + (u32)((_ret << 24) | (_ret >> 24) | \ + ((_ret << 8) & 0x00FF0000) | \ + ((_ret >> 8) & 0x0000FF00)); \ + }) + +#define R(x) (random() % (x)) + +#define STRINGIFY_INTERNAL(x) #x +#define STRINGIFY(x) STRINGIFY_INTERNAL(x) + +#define MEM_BARRIER() \ + asm volatile("" ::: "memory") + +#endif /* ! _HAVE_TYPES_H */ diff --git a/pkgs/tools/security/afl/qemu-patches/cpu-exec.patch b/pkgs/tools/security/afl/qemu-patches/cpu-exec.patch new file mode 100644 index 00000000000..29b65e71b9a --- /dev/null +++ b/pkgs/tools/security/afl/qemu-patches/cpu-exec.patch @@ -0,0 +1,33 @@ +--- qemu-2.2.0/cpu-exec.c.orig 2014-12-09 14:45:40.000000000 +0000 ++++ qemu-2.2.0/cpu-exec.c 2015-02-20 22:07:02.966000000 +0000 +@@ -25,6 +25,8 @@ + #include "sysemu/qtest.h" + #include "qemu/timer.h" + ++#include "afl-qemu-cpu-inl.h" ++ + /* -icount align implementation. */ + + typedef struct SyncClocks { +@@ -262,8 +264,11 @@ + } + not_found: + /* if no translated code available, then translate it now */ ++ + tb = tb_gen_code(cpu, pc, cs_base, flags, 0); + ++ AFL_QEMU_CPU_SNIPPET1; ++ + found: + /* Move the last found TB to the head of the list */ + if (likely(*ptb1)) { +@@ -455,6 +460,9 @@ + next_tb = 0; + tcg_ctx.tb_ctx.tb_invalidated_flag = 0; + } ++ ++ AFL_QEMU_CPU_SNIPPET2; ++ + if (qemu_loglevel_mask(CPU_LOG_EXEC)) { + qemu_log("Trace %p [" TARGET_FMT_lx "] %s\n", + tb->tc_ptr, tb->pc, lookup_symbol(tb->pc)); diff --git a/pkgs/tools/security/afl/qemu-patches/elfload.patch b/pkgs/tools/security/afl/qemu-patches/elfload.patch new file mode 100644 index 00000000000..65f1572e9a7 --- /dev/null +++ b/pkgs/tools/security/afl/qemu-patches/elfload.patch @@ -0,0 +1,32 @@ +--- qemu-2.2.0/linux-user/elfload.c.orig 2014-12-09 14:45:42.000000000 +0000 ++++ qemu-2.2.0/linux-user/elfload.c 2015-01-28 02:51:23.719000000 +0000 +@@ -28,6 +28,8 @@ + + #define ELF_OSABI ELFOSABI_SYSV + ++extern abi_ulong afl_entry_point, afl_start_code, afl_end_code; ++ + /* from personality.h */ + + /* +@@ -1886,6 +1888,8 @@ + info->brk = 0; + info->elf_flags = ehdr->e_flags; + ++ if (!afl_entry_point) afl_entry_point = info->entry; ++ + for (i = 0; i < ehdr->e_phnum; i++) { + struct elf_phdr *eppnt = phdr + i; + if (eppnt->p_type == PT_LOAD) { +@@ -1919,9 +1923,11 @@ + if (elf_prot & PROT_EXEC) { + if (vaddr < info->start_code) { + info->start_code = vaddr; ++ if (!afl_start_code) afl_start_code = vaddr; + } + if (vaddr_ef > info->end_code) { + info->end_code = vaddr_ef; ++ if (!afl_end_code) afl_end_code = vaddr_ef; + } + } + if (elf_prot & PROT_WRITE) { diff --git a/pkgs/tools/security/afl/qemu-patches/no-etc-install.patch b/pkgs/tools/security/afl/qemu-patches/no-etc-install.patch new file mode 100644 index 00000000000..81d29feea3d --- /dev/null +++ b/pkgs/tools/security/afl/qemu-patches/no-etc-install.patch @@ -0,0 +1,14 @@ +diff --git a/Makefile b/Makefile +index d6b9dc1..ce7c493 100644 +--- a/Makefile ++++ b/Makefile +@@ -384,8 +384,7 @@ install-confdir: + install-sysconfig: install-datadir install-confdir + $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" + +-install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \ +-install-datadir install-localstatedir ++install: all $(if $(BUILD_DOCS),install-doc) install-datadir + ifneq ($(TOOLS),) + $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir)) + endif diff --git a/pkgs/tools/security/afl/qemu-patches/translate-all.patch b/pkgs/tools/security/afl/qemu-patches/translate-all.patch new file mode 100644 index 00000000000..89163b607fd --- /dev/null +++ b/pkgs/tools/security/afl/qemu-patches/translate-all.patch @@ -0,0 +1,18 @@ +--- qemu-2.2.0/translate-all.c.orig 2014-12-09 14:45:46.000000000 +0000 ++++ qemu-2.2.0/translate-all.c 2015-01-28 22:37:42.383000000 +0000 +@@ -387,8 +387,13 @@ + /* We can't use g_malloc because it may recurse into a locked mutex. */ + # define ALLOC(P, SIZE) \ + do { \ +- P = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, \ +- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \ ++ void* _tmp = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, \ ++ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \ ++ if (_tmp == (void*)-1) { \ ++ qemu_log(">>> Out of memory for stack, bailing out. <<<\n"); \ ++ exit(1); \ ++ } \ ++ (P) = _tmp; \ + } while (0) + #else + # define ALLOC(P, SIZE) \ diff --git a/pkgs/tools/security/afl/qemu.nix b/pkgs/tools/security/afl/qemu.nix new file mode 100644 index 00000000000..929f9fba9a6 --- /dev/null +++ b/pkgs/tools/security/afl/qemu.nix @@ -0,0 +1,72 @@ +{ stdenv, fetchurl, python, zlib, pkgconfig, glib, ncurses, perl +, attr, libcap, vde2, alsaLib, texinfo, libuuid, flex, bison, lzo, snappy +, libaio, libcap_ng, gnutls, pixman, autoconf +, writeText +}: + +with stdenv.lib; + +let + n = "qemu-2.2.0"; + + aflHeaderFile = writeText "afl-qemu-cpu-inl.h" + (builtins.readFile ./qemu-patches/afl-qemu-cpu-inl.h); + aflConfigFile = writeText "afl-config.h" + (builtins.readFile ./qemu-patches/afl-config.h); + aflTypesFile = writeText "afl-types.h" + (builtins.readFile ./qemu-patches/afl-types.h); + + cpuTarget = if stdenv.system == "x86_64-linux" then "x86_64-linux-user" + else if stdenv.system == "i686-linux" then "i386-linux-user" + else throw "afl: no support for ${stdenv.system}!"; +in +stdenv.mkDerivation rec { + name = "afl-${n}"; + + src = fetchurl { + url = "http://wiki.qemu.org/download/${n}.tar.bz2"; + sha256 = "1703c3scl5n07gmpilg7g2xzyxnr7jczxgx6nn4m8kv9gin9p35n"; + }; + + buildInputs = + [ python zlib pkgconfig glib pixman ncurses perl attr libcap + vde2 texinfo libuuid flex bison lzo snappy autoconf + libcap_ng gnutls + ] + ++ optionals (hasSuffix "linux" stdenv.system) [ libaio ]; + + enableParallelBuilding = true; + + patches = + [ ./qemu-patches/elfload.patch + ./qemu-patches/cpu-exec.patch + ./qemu-patches/no-etc-install.patch + ./qemu-patches/translate-all.patch + ]; + + preConfigure = '' + cp ${aflTypesFile} afl-types.h + cp ${aflConfigFile} afl-config.h + cp ${aflHeaderFile} afl-qemu-cpu-inl.h + ''; + + configureFlags = + [ "--disable-system" + "--enable-linux-user" + "--enable-guest-base" + "--disable-gtk" + "--disable-sdl" + "--disable-vnc" + "--target-list=${cpuTarget}" + "--sysconfdir=/etc" + "--localstatedir=/var" + ]; + + meta = with stdenv.lib; { + homepage = http://www.qemu.org/; + description = "Fork of QEMU with American Fuzzy Lop instrumentation support"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ thoughtpolice ]; + platforms = platforms.linux; + }; +} From e412105bbb6a7a43e4da7b7f1e8b74322d870777 Mon Sep 17 00:00:00 2001 From: Kevin Marsh Date: Sun, 22 Mar 2015 23:06:38 +0000 Subject: [PATCH 16/53] Update python package requests2 2.5.1 -> 2.6.0 --- pkgs/top-level/python-packages.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a0490a6f580..bcce660ad3c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9359,11 +9359,12 @@ let requests2 = buildPythonPackage rec { - name = "requests-2.5.1"; + name = "requests-${version}"; + version = "2.6.0"; src = pkgs.fetchurl { url = "http://pypi.python.org/packages/source/r/requests/${name}.tar.gz"; - sha256 = "0rnyg6164jp7x7slgwnhigqza18d705hdvzwr4yk5qmisgpkaxvv"; + sha256 = "0xadnw27m257scrhjcc66zm4z3ikg8n9h6g9akpkavr31qgyvnqw"; }; meta = { From 2aa9da5a063ff25dd4f0e82d4761d24234b16628 Mon Sep 17 00:00:00 2001 From: Bence Fabian Date: Tue, 17 Mar 2015 20:55:19 +0100 Subject: [PATCH 17/53] mplayer: Remove --enable-jack If provided then configure won't use the pkgconfig of jack. --- pkgs/applications/video/mplayer/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix index 86e5d9cb9eb..ac106431240 100644 --- a/pkgs/applications/video/mplayer/default.nix +++ b/pkgs/applications/video/mplayer/default.nix @@ -154,7 +154,7 @@ stdenv.mkDerivation rec { ${if speexSupport then "--enable-speex" else "--disable-speex"} ${if theoraSupport then "--enable-theora" else "--disable-theora"} ${if x264Support then "--enable-x264 --disable-x264-lavc" else "--disable-x264 --enable-x264-lavc"} - ${if jackaudioSupport then "--enable-jack" else "--disable-jack"} + ${if jackaudioSupport then "" else "--disable-jack"} ${if pulseSupport then "--enable-pulse" else "--disable-pulse"} ${optionalString (useUnfreeCodecs && codecs != null) "--codecsdir=${codecs}"} ${optionalString (stdenv.isi686 || stdenv.isx86_64) "--enable-runtime-cpudetection"} From 4a1c3760e05e5f62691374f5beb10d2c9048fc01 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 23 Mar 2015 11:24:17 +0100 Subject: [PATCH 18/53] pitivi: cleanup and fix icons on non-nixos --- pkgs/applications/video/pitivi/default.nix | 24 ++++++++-------------- pkgs/top-level/all-packages.nix | 1 - 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/video/pitivi/default.nix b/pkgs/applications/video/pitivi/default.nix index 7f53aa07db6..5b77ec916b0 100644 --- a/pkgs/applications/video/pitivi/default.nix +++ b/pkgs/applications/video/pitivi/default.nix @@ -1,7 +1,6 @@ { stdenv, fetchurl, pkgconfig, intltool, itstool, makeWrapper -, pythonPackages, gst, clutter-gst, clutter-gtk -, gobjectIntrospection, clutter, gtk3, librsvg -, gnome_icon_theme, gnome_icon_theme_symbolic, gnome3 +, pythonPackages, gst, clutter-gst, clutter-gtk, hicolor_icon_theme +, gobjectIntrospection, clutter, gtk3, librsvg, gnome3, libnotify }: let @@ -30,27 +29,22 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig intltool itstool makeWrapper ]; buildInputs = [ - gobjectIntrospection clutter-gst clutter-gtk librsvg + gobjectIntrospection clutter-gst clutter-gtk librsvg gnome3.gnome_desktop + hicolor_icon_theme gnome3.gnome_icon_theme gnome3.gnome_icon_theme_symbolic + gnome3.gsettings_desktop_schemas libnotify ] ++ (with gst; [ - gst-python gst-editing-services + gstreamer gst-python gst-editing-services gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav ]) ++ (with pythonPackages; [ python pygobject3 pyxdg numpy pycairo sqlite3 ]); - preFixup = with stdenv.lib; with gst; let - libraryPath = makeLibraryPath [ - gstreamer gst-editing-services - clutter-gst clutter-gtk clutter gtk3 - gnome3.gnome_desktop - ]; - in '' + preFixup = '' wrapProgram "$out/bin/pitivi" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix LD_LIBRARY_PATH : "${libraryPath}" \ + --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" \ - --prefix XDG_DATA_DIRS : "\$XDG_ICON_DIRS:$out/share:$GSETTINGS_SCHEMAS_PATH" - rm $out/share/icons/hicolor/icon-theme.cache + --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$out/share:$GSETTINGS_SCHEMAS_PATH" ''; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 979bc9e0e4c..146ad6f71c3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2293,7 +2293,6 @@ let pitivi = callPackage ../applications/video/pitivi { gst = gst_all_1; clutter-gtk = clutter_gtk; - inherit (gnome3) gnome_icon_theme gnome_icon_theme_symbolic; }; p0f = callPackage ../tools/security/p0f { }; From 8d685306c5a0fa49e1752118bee71e368452670f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 23 Mar 2015 11:51:59 +0100 Subject: [PATCH 19/53] jwhois: Add missing meta.platforms --- pkgs/tools/networking/jwhois/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/networking/jwhois/default.nix b/pkgs/tools/networking/jwhois/default.nix index 54d8acd3213..67b93a1fa90 100644 --- a/pkgs/tools/networking/jwhois/default.nix +++ b/pkgs/tools/networking/jwhois/default.nix @@ -16,5 +16,6 @@ stdenv.mkDerivation { description = "A client for the WHOIS protocol allowing you to query the owner of a domain name"; homepage = http://www.gnu.org/software/jwhois/; license = "GPL"; + platforms = stdenv.lib.platforms.linux; }; } From 8470b03db2f7e59f05312974b3aba21c20c63dbe Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 23 Mar 2015 11:59:51 +0100 Subject: [PATCH 20/53] Remove unused file --- pkgs/stdenv/darwin/prehook.nix | 9 --------- pkgs/stdenv/native/default.nix | 8 -------- 2 files changed, 17 deletions(-) delete mode 100644 pkgs/stdenv/darwin/prehook.nix diff --git a/pkgs/stdenv/darwin/prehook.nix b/pkgs/stdenv/darwin/prehook.nix deleted file mode 100644 index f38cd517f00..00000000000 --- a/pkgs/stdenv/darwin/prehook.nix +++ /dev/null @@ -1,9 +0,0 @@ -'' - dontFixLibtool=1 - stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" - xargsFlags=" " - export MACOSX_DEPLOYMENT_TARGET=10.9 - export SDKROOT=$(/usr/bin/xcrun --sdk macosx10.9 --show-sdk-path 2> /dev/null || true) - export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty -idirafter $SDKROOT/usr/include -F$SDKROOT/System/Library/Frameworks -Wno-multichar -Wno-deprecated-declarations" - export NIX_LDFLAGS_AFTER+=" -L$SDKROOT/usr/lib" -'' diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix index 925b90c964f..935af7d4c36 100644 --- a/pkgs/stdenv/native/default.nix +++ b/pkgs/stdenv/native/default.nix @@ -18,13 +18,6 @@ rec { export NIX_ENFORCE_PURITY= ''; - prehookDarwin = '' - ${prehookBase} - export NIX_DONT_SET_RPATH=1 - export NIX_NO_SELF_RPATH=1 - ${import ../darwin/prehook.nix} - ''; - prehookFreeBSD = '' ${prehookBase} @@ -77,7 +70,6 @@ rec { import ../generic { preHook = - if system == "x86_64-darwin" then prehookDarwin else if system == "i686-freebsd" then prehookFreeBSD else if system == "x86_64-freebsd" then prehookFreeBSD else if system == "i686-openbsd" then prehookOpenBSD else From 433d30b87728313556d8f4d61728e0b9a51063d4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 23 Mar 2015 13:25:20 +0100 Subject: [PATCH 21/53] libguestfs: Don't build on Hydra It produces a package over 4 GB large, and takes several hours to build (probably because of the overhead of copying that 4 GB image). --- pkgs/development/libraries/libguestfs/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix index 27e1c6adc00..313934c6657 100644 --- a/pkgs/development/libraries/libguestfs/default.nix +++ b/pkgs/development/libraries/libguestfs/default.nix @@ -51,5 +51,6 @@ stdenv.mkDerivation rec { homepage = http://libguestfs.org/; maintainers = with maintainers; [offline]; platforms = with platforms; linux; + hydraPlatforms = []; }; } From afcb9be79e15c501a9dfb3257b268cdbf30ba2e6 Mon Sep 17 00:00:00 2001 From: Pascal Wittmann Date: Mon, 23 Mar 2015 15:18:28 +0100 Subject: [PATCH 22/53] calibre: update from 2.21.0 to 2.22.0 --- pkgs/applications/misc/calibre/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix index 9f5c9e3c107..b96dfaf5397 100644 --- a/pkgs/applications/misc/calibre/default.nix +++ b/pkgs/applications/misc/calibre/default.nix @@ -5,11 +5,11 @@ }: stdenv.mkDerivation rec { - name = "calibre-2.21.0"; + name = "calibre-2.22.0"; src = fetchurl { url = "mirror://sourceforge/calibre/${name}.tar.xz"; - sha256 = "1adig2jxwbmsxcs36jaybhc8zdb8mnkc23kabw0c72izrsg4c5gb"; + sha256 = "19hpm5xzhjr0nfjm6xyqxjx2iwm3iw7y6bbs11337arfrxn16ly0"; }; inherit python; From 5e3a99e7d69da14cbe6dfcc848108a16a094e2f1 Mon Sep 17 00:00:00 2001 From: Pascal Wittmann Date: Mon, 23 Mar 2015 15:28:58 +0100 Subject: [PATCH 23/53] groovy: update from 2.4.1 to 2.4.2 --- pkgs/development/interpreters/groovy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/groovy/default.nix b/pkgs/development/interpreters/groovy/default.nix index 0c93625026a..354a4d970ba 100644 --- a/pkgs/development/interpreters/groovy/default.nix +++ b/pkgs/development/interpreters/groovy/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { name = "groovy-${version}"; - version = "2.4.1"; + version = "2.4.2"; src = fetchurl { url = "http://dl.bintray.com/groovy/maven/groovy-binary-${version}.zip"; - sha256 = "1bhsv804iik497gflgp0wfhj6j4ylrladp1xndcszlfg576r1zch"; + sha256 = "02vbg9ywn76rslkinjk1dw3wrj76p5bahbhvz71drlp30cs1r28w"; }; installPhase = '' From 7811c40974b81619fbf26d0c982cab13f8addd30 Mon Sep 17 00:00:00 2001 From: Pascal Wittmann Date: Mon, 23 Mar 2015 15:55:30 +0100 Subject: [PATCH 24/53] abduco: update from 0.3 to 0.4 --- pkgs/tools/misc/abduco/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/abduco/default.nix b/pkgs/tools/misc/abduco/default.nix index dc5d469dc87..c4515fde5fc 100644 --- a/pkgs/tools/misc/abduco/default.nix +++ b/pkgs/tools/misc/abduco/default.nix @@ -3,7 +3,7 @@ with stdenv.lib; stdenv.mkDerivation rec { - name = "abduco-0.3"; + name = "abduco-0.4"; meta = { homepage = http://brain-dump.org/projects/abduco; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "http://www.brain-dump.org/projects/abduco/${name}.tar.gz"; - sha256 = "1m4hafwvpnzz53n15757zrsx3xqv51gpnf3mnxqkzyr5mswz0jwk"; + sha256 = "1fxwg2s5w183p0rwzsxizy9jdnilv5qqs647l3wl3khny6fp58xx"; }; configFile = optionalString (conf!=null) (writeText "config.def.h" conf); From e8df73e5080c63319c158cba09c72a75ff393e07 Mon Sep 17 00:00:00 2001 From: Alexander Flatter Date: Mon, 23 Mar 2015 18:41:55 +0100 Subject: [PATCH 25/53] Compile postgresql with openssl --- pkgs/servers/sql/postgresql/8.4.x.nix | 6 ++++-- pkgs/servers/sql/postgresql/9.0.x.nix | 6 ++++-- pkgs/servers/sql/postgresql/9.1.x.nix | 6 ++++-- pkgs/servers/sql/postgresql/9.2.x.nix | 6 ++++-- pkgs/servers/sql/postgresql/9.3.x.nix | 11 +++++------ pkgs/servers/sql/postgresql/9.4.x.nix | 11 +++++------ 6 files changed, 26 insertions(+), 20 deletions(-) diff --git a/pkgs/servers/sql/postgresql/8.4.x.nix b/pkgs/servers/sql/postgresql/8.4.x.nix index b4611a4bb10..d77a539cb5d 100644 --- a/pkgs/servers/sql/postgresql/8.4.x.nix +++ b/pkgs/servers/sql/postgresql/8.4.x.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, ncurses, readline }: +{ stdenv, fetchurl, zlib, ncurses, readline, openssl }: let version = "8.4.22"; in @@ -10,10 +10,12 @@ stdenv.mkDerivation rec { sha256 = "09iqr9sldiq7jz1rdnywp2wv36lxy5m8kch3vpchd1s4fz75c7aw"; }; - buildInputs = [ zlib ncurses readline ]; + buildInputs = [ zlib ncurses readline openssl ]; LC_ALL = "C"; + configureFlags = [ "--with-openssl" ]; + patches = [ ./less-is-more.patch ]; passthru = { inherit readline; }; diff --git a/pkgs/servers/sql/postgresql/9.0.x.nix b/pkgs/servers/sql/postgresql/9.0.x.nix index 72d7f7a816f..340307c01f9 100644 --- a/pkgs/servers/sql/postgresql/9.0.x.nix +++ b/pkgs/servers/sql/postgresql/9.0.x.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, readline }: +{ stdenv, fetchurl, zlib, readline, openssl }: let version = "9.0.19"; in @@ -10,10 +10,12 @@ stdenv.mkDerivation rec { sha256 = "1h45jdbzdcvprdsi9gija81s3ny46h3faf9f007gza4vm6y15bak"; }; - buildInputs = [ zlib readline ]; + buildInputs = [ zlib readline openssl ]; LC_ALL = "C"; + configureFlags = [ "--with-openssl" ]; + patches = [ ./less-is-more.patch ]; passthru = { diff --git a/pkgs/servers/sql/postgresql/9.1.x.nix b/pkgs/servers/sql/postgresql/9.1.x.nix index fd1c9395d5a..5b0774d6229 100644 --- a/pkgs/servers/sql/postgresql/9.1.x.nix +++ b/pkgs/servers/sql/postgresql/9.1.x.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, readline }: +{ stdenv, fetchurl, zlib, readline, openssl }: let version = "9.1.15"; in @@ -10,12 +10,14 @@ stdenv.mkDerivation rec { sha256 = "0pyyw0cy91z9wkqf8qzkwsy8cyjps0s94c9czz6mzhyd2npxxmk7"; }; - buildInputs = [ zlib readline ]; + buildInputs = [ zlib readline openssl ]; enableParallelBuilding = true; LC_ALL = "C"; + configureFlags = [ "--with-openssl" ]; + patches = [ ./less-is-more.patch ]; postInstall = diff --git a/pkgs/servers/sql/postgresql/9.2.x.nix b/pkgs/servers/sql/postgresql/9.2.x.nix index 8528871d302..d09cde5b995 100644 --- a/pkgs/servers/sql/postgresql/9.2.x.nix +++ b/pkgs/servers/sql/postgresql/9.2.x.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, readline }: +{ stdenv, fetchurl, zlib, readline, openssl }: let version = "9.2.10"; in @@ -10,12 +10,14 @@ stdenv.mkDerivation rec { sha256 = "1bbkinqzb3c8i0vfzcy2g7djrq0kxz63jgvzda9p0vylxazmnm1m"; }; - buildInputs = [ zlib readline ]; + buildInputs = [ zlib readline openssl ]; enableParallelBuilding = true; makeFlags = [ "world" ]; + configureFlags = [ "--with-openssl" ]; + patches = [ ./disable-resolve_symlinks.patch ./less-is-more.patch ]; installTargets = [ "install-world" ]; diff --git a/pkgs/servers/sql/postgresql/9.3.x.nix b/pkgs/servers/sql/postgresql/9.3.x.nix index d9644506eea..6467ce80af1 100644 --- a/pkgs/servers/sql/postgresql/9.3.x.nix +++ b/pkgs/servers/sql/postgresql/9.3.x.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, readline, libossp_uuid }: +{ stdenv, fetchurl, zlib, readline, libossp_uuid, openssl}: with stdenv.lib; @@ -12,16 +12,15 @@ stdenv.mkDerivation rec { sha256 = "056ass7nnfyv7blv02anv795kgpz77gipdpxggd835cdwrhwns13"; }; - buildInputs = [ zlib readline ] ++ optionals (!stdenv.isDarwin) [ libossp_uuid ]; + buildInputs = [ zlib readline openssl ] + ++ optionals (!stdenv.isDarwin) [ libossp_uuid ]; enableParallelBuilding = true; makeFlags = [ "world" ]; - configureFlags = optional (!stdenv.isDarwin) - '' - --with-ossp-uuid - ''; + configureFlags = [ "--with-openssl" ] + ++ optional (!stdenv.isDarwin) "--with-ossp-uuid"; patches = [ ./disable-resolve_symlinks.patch ./less-is-more.patch ]; diff --git a/pkgs/servers/sql/postgresql/9.4.x.nix b/pkgs/servers/sql/postgresql/9.4.x.nix index 6cf59b21356..6649975d790 100644 --- a/pkgs/servers/sql/postgresql/9.4.x.nix +++ b/pkgs/servers/sql/postgresql/9.4.x.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, readline, libossp_uuid }: +{ stdenv, fetchurl, zlib, readline, libossp_uuid, openssl }: with stdenv.lib; @@ -12,16 +12,15 @@ stdenv.mkDerivation rec { sha256 = "19n3i14bhmw8dacd2kl3n1wzj362qv3fjmal5vsvi580h9ybgp99"; }; - buildInputs = [ zlib readline ] ++ optionals (!stdenv.isDarwin) [ libossp_uuid ]; + buildInputs = [ zlib readline openssl ] + ++ optionals (!stdenv.isDarwin) [ libossp_uuid ]; enableParallelBuilding = true; makeFlags = [ "world" ]; - configureFlags = optional (!stdenv.isDarwin) - '' - --with-ossp-uuid - ''; + configureFlags = [ "--with-openssl" ] + ++ optional (!stdenv.isDarwin) "--with-ossp-uuid"; patches = [ ./disable-resolve_symlinks-94.patch ./less-is-more.patch ]; From 460ea0a8a52e28fd39952af8fb5b10b3d9fc79e7 Mon Sep 17 00:00:00 2001 From: Arseniy Seroka Date: Mon, 23 Mar 2015 21:52:30 +0300 Subject: [PATCH 26/53] slurm: update pkg --- pkgs/servers/computing/slurm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/computing/slurm/default.nix b/pkgs/servers/computing/slurm/default.nix index 74701dc6dbe..25f3fbb5a64 100644 --- a/pkgs/servers/computing/slurm/default.nix +++ b/pkgs/servers/computing/slurm/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { name = "slurm-llnl-${version}"; - version = "14.11.4"; + version = "14.11.5"; src = fetchurl { url = "http://www.schedmd.com/download/latest/slurm-${version}.tar.bz2"; - sha256 = "1w454j92j2fnh7xmg63275qcszq8ywiq51sm2rpyf175jrxv6ina"; + sha256 = "0xx1q9ximsyyipl0xbj8r7ajsz4xrxik8xmhcb1z9nv0aza1rff2"; }; buildInputs = [ python munge perl pam openssl mysql ]; From 55bbb4fb0b8e0a803588be418fc749a97780a7f7 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Sun, 22 Mar 2015 16:23:48 -0700 Subject: [PATCH 27/53] goPackages.protobuf: transition to new github import path --- pkgs/top-level/go-packages.nix | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index 94ef8a4ae07..890239f35a6 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -45,13 +45,14 @@ let self = _self // overrides; _self = with self; { }; protobuf = buildGoPackage rec { - rev = "36be16571e14"; - name = "goprotobuf-${rev}"; - goPackagePath = "code.google.com/p/goprotobuf"; - src = fetchhg { + rev = "5677a0e3d5e89854c9974e1256839ee23f8233ca"; + name = "goprotobuf-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/golang/protobuf"; + src = fetchFromGitHub { inherit rev; - url = "https://code.google.com/p/goprotobuf"; - sha256 = "14yay2sgfbbs0bx3q03bdqn1kivyvxfdm34rmp2612gvinlll215"; + owner = "golang"; + repo = "protobuf"; + sha256 = "18dzxmy0gfjnwa9x8k3hv9calvmydv0dnz1iibykkzd20gw4l85v"; }; subPackages = [ "proto" "protoc-gen-go" ]; }; @@ -254,6 +255,18 @@ let self = _self // overrides; _self = with self; { doCheck = false; # please check again }; + govers = buildGoPackage rec { + rev = "3b5f175f65d601d06f48d78fcbdb0add633565b9"; + name = "govers-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/rogpeppe/govers"; + src = fetchFromGitHub { + inherit rev; + owner = "rogpeppe"; + repo = "govers"; + sha256 = "0din5a7nff6hpc4wg0yad2nwbgy4q1qaazxl8ni49lkkr4hyp8pc"; + }; + }; + gox = buildGoPackage rec { rev = "e8e6fd4fe12510cc46893dff18c5188a6a6dc549"; name = "gox-${stdenv.lib.strings.substring 0 7 rev}"; @@ -513,17 +526,22 @@ let self = _self // overrides; _self = with self; { }; preBuild = '' cd "go/src/$goPackagePath" + + govers -d -m code.google.com/p/goprotobuf github.com/golang/protobuf + # Work around `go install` assuming containing directory is the executable name we want for i in */bin; do mv "$i" "$(dirname "$i")/$(dirname "$i")" done # Generate protobuf definitions and static assets + sed -i '1s|^|SHELL = ${stdenv.shell}\n|' Makefile make protocol/hologram.pb.go make transport/remote/bindata.go ''; - buildInputs = [ pkgs.protobuf crypto protobuf goamz rgbterm go-bindata go-homedir ldap g2s gox ]; + buildInputs = [ pkgs.protobuf crypto protobuf goamz rgbterm go-bindata + go-homedir ldap g2s gox govers ]; }; influxdb-go = buildGoPackage rec { From 9c1f0b33a3dd4e7d374c9cfcdf0b6c67efd0a09d Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Tue, 17 Feb 2015 14:28:56 -0800 Subject: [PATCH 28/53] New package: Prometheus monitoring system --- .../servers/monitoring/prometheus/default.nix | 56 +++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/go-packages.nix | 118 ++++++++++++++++++ 3 files changed, 176 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/default.nix diff --git a/pkgs/servers/monitoring/prometheus/default.nix b/pkgs/servers/monitoring/prometheus/default.nix new file mode 100644 index 00000000000..4c05a859f01 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/default.nix @@ -0,0 +1,56 @@ +{ stdenv, lib, goPackages, fetchFromGitHub, protobuf, vim }: + +with goPackages; + +buildGoPackage rec { + name = "prometheus-${version}"; + version = "0.10.0"; + goPackagePath = "github.com/prometheus/prometheus"; + rev = "f5a0f7fa185dae2c772a5847a7aac9ba33b545f9"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "prometheus"; + sha256 = "1wagmr4bca8fbvi48n9p4hdnx1m4chyaa1bzman6dhqfmkiikf5q"; + }; + + buildInputs = [ + dns glog goleveldb prometheus.client_golang + goPackages.protobuf + protobuf # the non-golang package, for protoc + vim # for xxd, used in embed-static.sh + ]; + + # Metadata that gets embedded into the binary + buildFlagsArray = '' + -ldflags= + -X main.buildVersion ${version} + -X main.buildRevision ${builtins.substring 0 6 rev} + -X main.buildBranch master + -X main.buildUser nix@nixpkgs + -X main.buildDate 20150101-00:00:00 + -X main.goVersion ${lib.getVersion go} + ''; + + preBuild = '' + ( + cd "go/src/$goPackagePath" + protoc --proto_path=./config \ + --go_out=./config/generated/ \ + ./config/config.proto + + cd web + ${stdenv.shell} ../utility/embed-static.sh static templates \ + | gofmt > blob/files.go + ) + ''; + + meta = with lib; { + description = "Service monitoring system and time series database"; + homepage = http://prometheus.github.io; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bf0f408b73f..19d4131a773 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8382,6 +8382,8 @@ let postgresql_jdbc = callPackage ../servers/sql/postgresql/jdbc { }; + prometheus = callPackage ../servers/monitoring/prometheus { }; + psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc { }; pyIRCt = builderDefsPackage (import ../servers/xmpp/pyIRCt) { diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index 890239f35a6..e07cebdae1e 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -21,6 +21,18 @@ let self = _self // overrides; _self = with self; { }; }; + glog = buildGoPackage rec { + rev = "44145f04b68cf362d9c4df2182967c2275eaefed"; + name = "glog-${rev}"; + goPackagePath = "github.com/golang/glog"; + src = fetchFromGitHub { + inherit rev; + owner = "golang"; + repo = "glog"; + sha256 = "1k7sf6qmpgm0iw81gx2dwggf9di6lgw0n54mni7862hihwfrb5rq"; + }; + }; + image = buildGoPackage rec { rev = "490b1ad139b3"; name = "go.image-${rev}"; @@ -215,6 +227,19 @@ let self = _self // overrides; _self = with self; { }; }; + ginkgo = buildGoPackage rec { + rev = "5ed93e443a4b7dfe9f5e95ca87e6082e503021d2"; + name = "ginkgo-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/onsi/ginkgo"; + src = fetchFromGitHub { + inherit rev; + owner = "onsi"; + repo = "ginkgo"; + sha256 = "0ghrx5qmgvgb8cbvsj53v1ir4j9agilg4wyhpk5ikqdv6mmqly4h"; + }; + subPackages = [ "./" ]; # don't try to build test fixtures + }; + goamz = buildGoPackage rec { rev = "2a8fed5e89ab9e16210fc337d1aac780e8c7bbb7"; name = "goamz-${rev}"; @@ -267,6 +292,56 @@ let self = _self // overrides; _self = with self; { }; }; + golang_protobuf_extensions = buildGoPackage rec { + rev = "ba7d65ac66e9da93a714ca18f6d1bc7a0c09100c"; + name = "golang-protobuf-extensions-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + src = fetchFromGitHub { + inherit rev; + owner = "matttproud"; + repo = "golang_protobuf_extensions"; + sha256 = "1vz6zj94v90x8mv9h6qfp1211kmzn60ri5qh7p9fzpjkhga5k936"; + }; + buildInputs = [ protobuf ]; + }; + + goleveldb = buildGoPackage rec { + rev = "e9e2c8f6d3b9c313fb4acaac5ab06285bcf30b04"; + name = "goleveldb-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/syndtr/goleveldb"; + src = fetchFromGitHub { + inherit rev; + owner = "syndtr"; + repo = "goleveldb"; + sha256 = "0vg3pcrbdhbmanwkc5njxagi64f4k2ikfm173allcghxcjamrkwv"; + }; + propagatedBuildInputs = [ ginkgo gomega gosnappy ]; + }; + + gomega = buildGoPackage rec { + rev = "8adf9e1730c55cdc590de7d49766cb2acc88d8f2"; + name = "gomega-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/onsi/gomega"; + src = fetchFromGitHub { + inherit rev; + owner = "onsi"; + repo = "gomega"; + sha256 = "1rf6cxn50d1pji3pv4q372s395r5nxwcgp405z2r2mfdkri4v3w4"; + }; + }; + + gosnappy = buildGoPackage rec { + rev = "ce8acff4829e0c2458a67ead32390ac0a381c862"; + name = "gosnappy-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/syndtr/gosnappy"; + src = fetchFromGitHub { + inherit rev; + owner = "syndtr"; + repo = "gosnappy"; + sha256 = "0ywa52kcii8g2a9lbqcx8ghdf6y56lqq96sl5nl9p6h74rdvmjr7"; + }; + }; + gox = buildGoPackage rec { rev = "e8e6fd4fe12510cc46893dff18c5188a6a6dc549"; name = "gox-${stdenv.lib.strings.substring 0 7 rev}"; @@ -783,6 +858,49 @@ let self = _self // overrides; _self = with self; { propagatedBuildInputs = [ kr.text ]; }; + prometheus.client_golang = buildGoPackage rec { + rev = "4627d59e8a09c330c5ccfe7414baca28d8df847d"; + name = "prometheus-client-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/prometheus/client_golang"; + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "client_golang"; + sha256 = "1mmj1r8xfi1gwb5f0l6sxjj804dhavp3pjmrqpbaa1g82bmz1hr1"; + }; + propagatedBuildInputs = [ + protobuf + golang_protobuf_extensions + prometheus.client_model + prometheus.procfs + ]; + }; + + prometheus.client_model = buildGoPackage rec { + rev = "fa8ad6fec33561be4280a8f0514318c79d7f6cb6"; + name = "prometheus-client-model-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/prometheus/client_model"; + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "client_model"; + sha256 = "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"; + }; + buildInputs = [ protobuf ]; + }; + + prometheus.procfs = buildGoPackage rec { + rev = "92faa308558161acab0ada1db048e9996ecec160"; + name = "prometheus-procfs-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/prometheus/procfs"; + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "procfs"; + sha256 = "0kaw81z2yi45f6ll6n2clr2zz60bdgdxzqnxvd74flynz4sr0p1v"; + }; + }; + pty = buildGoPackage rec { rev = "67e2db24c831afa6c64fc17b4a143390674365ef"; name = "pty-${stdenv.lib.strings.substring 0 7 rev}"; From 92b08cd406964c0503c6ee757624230131207329 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Thu, 19 Feb 2015 15:20:22 -0800 Subject: [PATCH 29/53] New package: prometheus-alertmanager --- .../prometheus/alertmanager/default.nix | 56 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/go-packages.nix | 36 ++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/alertmanager/default.nix diff --git a/pkgs/servers/monitoring/prometheus/alertmanager/default.nix b/pkgs/servers/monitoring/prometheus/alertmanager/default.nix new file mode 100644 index 00000000000..4ef870bfcf9 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/alertmanager/default.nix @@ -0,0 +1,56 @@ +{ stdenv, lib, goPackages, fetchFromGitHub, protobuf, vim }: + +with goPackages; + +buildGoPackage rec { + name = "prometheus-alertmanager-${version}"; + version = "0.1.0"; + goPackagePath = "github.com/prometheus/alertmanager"; + + src = fetchFromGitHub { + owner = "prometheus"; + repo = "alertmanager"; + rev = "942cd35dea6dc406b106d7a57ffe7adbb3b978a5"; + sha256 = "1c14vgn9s0dn322ss8fs5b47blw1g8cxy9w4yjn0f7x2sdwplx1i"; + }; + + buildInputs = [ + goPackages.glog + goPackages.protobuf + goPackages.fsnotify + goPackages.httprouter + goPackages.prometheus.client_golang + goPackages.pushover + protobuf + vim + ]; + + buildFlagsArray = '' + -ldflags= + -X main.buildVersion ${version} + -X main.buildBranch master + -X main.buildUser nix@nixpkgs + -X main.buildDate 20150101-00:00:00 + -X main.goVersion ${lib.getVersion go} + ''; + + preBuild = '' + ( + cd "go/src/$goPackagePath" + protoc --proto_path=./config \ + --go_out=./config/generated/ \ + ./config/config.proto + cd web + ${stdenv.shell} blob/embed-static.sh static templates \ + | gofmt > blob/files.go + ) + ''; + + meta = with lib; { + description = "Alerting dispather for the Prometheus monitoring system"; + homepage = "https://github.com/prometheus/alertmanager"; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 19d4131a773..fce9cca6b5b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8383,6 +8383,8 @@ let postgresql_jdbc = callPackage ../servers/sql/postgresql/jdbc { }; prometheus = callPackage ../servers/monitoring/prometheus { }; + prometheus-alertmanager = + callPackage ../servers/monitoring/prometheus/alertmanager { }; psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc { }; diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index e07cebdae1e..a9705d972bd 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -215,6 +215,18 @@ let self = _self // overrides; _self = with self; { }; }; + fsnotify = buildGoPackage rec { + rev = "4894fe7efedeeef21891033e1cce3b23b9af7ad2"; + name = "fsnotify-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/howeyc/fsnotify"; + src = fetchFromGitHub { + inherit rev; + owner = "howeyc"; + repo = "fsnotify"; + sha256 = "09r3h200nbw8a4d3rn9wxxmgma2a8i6ssaplf3zbdc2ykizsq7mn"; + }; + }; + g2s = buildGoPackage rec { rev = "ec76db4c1ac16400ac0e17ca9c4840e1d23da5dc"; name = "g2s-${stdenv.lib.strings.substring 0 7 rev}"; @@ -619,6 +631,18 @@ let self = _self // overrides; _self = with self; { go-homedir ldap g2s gox govers ]; }; + httprouter = buildGoPackage rec { + rev = "bde5c16eb82ff15a1734a3818d9b9547065f65b1"; + name = "httprouter-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/julienschmidt/httprouter"; + src = fetchFromGitHub { + inherit rev; + owner = "julienschmidt"; + repo = "httprouter"; + sha256 = "1l74pvqqhhval4vfnhca9d6i1ij69qs3ljf41w3m1l2id42rq7r9"; + }; + }; + influxdb-go = buildGoPackage rec { rev = "63c9a5f67dcb633d05164bf8442160c9e2e402f7"; name = "influxdb-go-${stdenv.lib.strings.substring 0 7 rev}"; @@ -913,6 +937,18 @@ let self = _self // overrides; _self = with self; { }; }; + pushover = buildGoPackage rec { + rev = "a8420a1935479cc266bda685cee558e86dad4b9f"; + name = "pushover-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/thorduri/pushover"; + src = fetchFromGitHub { + inherit rev; + owner = "thorduri"; + repo = "pushover"; + sha256 = "0j4k43ppka20hmixlwhhz5mhv92p6wxbkvdabs4cf7k8jpk5argq"; + }; + }; + raw = buildGoPackage rec { rev = "724aedf6e1a5d8971aafec384b6bde3d5608fba4"; name = "raw-${stdenv.lib.strings.substring 0 7 rev}"; From b2d17977beef86cc92c4b6ea626397b865c8f1ad Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Thu, 19 Feb 2015 16:38:40 -0800 Subject: [PATCH 30/53] New package: prometheus-haproxy-exporter --- .../prometheus/haproxy_exporter/default.nix | 23 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/haproxy_exporter/default.nix diff --git a/pkgs/servers/monitoring/prometheus/haproxy_exporter/default.nix b/pkgs/servers/monitoring/prometheus/haproxy_exporter/default.nix new file mode 100644 index 00000000000..63c421cd8a2 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/haproxy_exporter/default.nix @@ -0,0 +1,23 @@ +{ stdenv, lib, goPackages, fetchFromGitHub, }: + +goPackages.buildGoPackage rec { + name = "prometheus-haproxy-exporter-0.4.0"; + goPackagePath = "github.com/prometheus/haproxy_exporter"; + + src = fetchFromGitHub { + owner = "prometheus"; + repo = "haproxy_exporter"; + rev = "6ee6d1df3e68ed73df37c9794332b2594e4da45d"; + sha256 = "0lbwv6jsdfjd9ihiky3lq7d5rkxqjh7xfaziw8i3w34a38japlpr"; + }; + + buildInputs = [ goPackages.prometheus.client_golang ]; + + meta = with lib; { + description = "HAProxy Exporter for the Prometheus monitoring system"; + homepage = https://github.com/prometheus/haproxy_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fce9cca6b5b..74930f357e8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8385,6 +8385,8 @@ let prometheus = callPackage ../servers/monitoring/prometheus { }; prometheus-alertmanager = callPackage ../servers/monitoring/prometheus/alertmanager { }; + prometheus-haproxy-exporter = + callPackage ../servers/monitoring/prometheus/haproxy_exporter { }; psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc { }; From 6564dd81992f948c64dea1c02d0f7f488365f703 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Thu, 19 Feb 2015 17:28:13 -0800 Subject: [PATCH 31/53] New package: prometheus-pushgateway --- .../prometheus/pushgateway/default.nix | 51 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/pushgateway/default.nix diff --git a/pkgs/servers/monitoring/prometheus/pushgateway/default.nix b/pkgs/servers/monitoring/prometheus/pushgateway/default.nix new file mode 100644 index 00000000000..db66e963208 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/pushgateway/default.nix @@ -0,0 +1,51 @@ +{ stdenv, lib, goPackages, fetchFromGitHub }: + +with goPackages; + +buildGoPackage rec { + name = "prometheus-pushgateway-${version}"; + version = "0.1.0"; + goPackagePath = "github.com/prometheus/pushgateway"; + rev = "3f1d42dade342ddb88381607358bae61a0a6b6c7"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "pushgateway"; + sha256 = "1wqxbl9rlnxszp9ylvdbx6f5lyj2z0if3x099fnjahbqmz8yhnf4"; + }; + + buildInputs = [ + go-bindata + protobuf + httprouter + golang_protobuf_extensions + prometheus.client_golang + ]; + + buildFlagsArray = '' + -ldflags= + -X main.buildVersion ${version} + -X main.buildRev ${rev} + -X main.buildBranch master + -X main.buildUser nix@nixpkgs + -X main.buildDate 20150101-00:00:00 + -X main.goVersion ${lib.getVersion go} + ''; + + preBuild = '' + ( + cd "go/src/$goPackagePath" + go-bindata ./resources/ + ) + ''; + + meta = with lib; { + description = + "Allows ephemeral and batch jobs to expose metrics to Prometheus"; + homepage = https://github.com/prometheus/pushgateway; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 74930f357e8..c56340229fe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8387,6 +8387,8 @@ let callPackage ../servers/monitoring/prometheus/alertmanager { }; prometheus-haproxy-exporter = callPackage ../servers/monitoring/prometheus/haproxy_exporter { }; + prometheus-pushgateway = + callPackage ../servers/monitoring/prometheus/pushgateway { }; psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc { }; From d11bb482348a2343c32d3ddab04a3687a8406179 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Thu, 19 Feb 2015 19:02:13 -0800 Subject: [PATCH 32/53] New package: prometheus-cli --- .../monitoring/prometheus/cli/default.nix | 25 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/cli/default.nix diff --git a/pkgs/servers/monitoring/prometheus/cli/default.nix b/pkgs/servers/monitoring/prometheus/cli/default.nix new file mode 100644 index 00000000000..f1f5ef9975c --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/cli/default.nix @@ -0,0 +1,25 @@ +{ stdenv, lib, goPackages, fetchFromGitHub }: + +goPackages.buildGoPackage rec { + name = "prometheus-cli-0.2.0"; + goPackagePath = "github.com/prometheus/prometheus_cli"; + src = fetchFromGitHub { + owner = "prometheus"; + repo = "prometheus_cli"; + rev = "b36c21d2301cf686bff81953573a29a6d5a0a883"; + sha256 = "190dlc6fyrfgxab4xj3gaz4jwx33jhzg57d8h36xjx56gbvp7iyk"; + }; + + buildInputs = [ + goPackages.prometheus.client_model + goPackages.prometheus.client_golang + ]; + + meta = with lib; { + description = "Command line tool for querying the Prometheus HTTP API"; + homepage = https://github.com/prometheus/prometheus_cli; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c56340229fe..bff75e5131c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8385,6 +8385,8 @@ let prometheus = callPackage ../servers/monitoring/prometheus { }; prometheus-alertmanager = callPackage ../servers/monitoring/prometheus/alertmanager { }; + prometheus-cli = + callPackage ../servers/monitoring/prometheus/cli { }; prometheus-haproxy-exporter = callPackage ../servers/monitoring/prometheus/haproxy_exporter { }; prometheus-pushgateway = From 5b3254a8d155c555f758a04aa6546219f22ffa80 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Thu, 19 Feb 2015 19:36:25 -0800 Subject: [PATCH 33/53] New package: prometheus-node-exporter --- .../prometheus/node_exporter/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/go-packages.nix | 24 ++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/node_exporter/default.nix diff --git a/pkgs/servers/monitoring/prometheus/node_exporter/default.nix b/pkgs/servers/monitoring/prometheus/node_exporter/default.nix new file mode 100644 index 00000000000..136a1e05851 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/node_exporter/default.nix @@ -0,0 +1,32 @@ +{ stdenv, lib, goPackages, fetchFromGitHub }: + +with goPackages; + +buildGoPackage rec { + name = "prometheus-node-exporter-0.7.1"; + goPackagePath = "github.com/prometheus/node_exporter"; + + src = fetchFromGitHub { + owner = "prometheus"; + repo = "node_exporter"; + rev = "0c8bfba04df87b90e69a79b2d25a5f627ebde1bb"; + sha256 = "12aj65hl9wql24rlpadd6mibf7sp8593xr1vljgyd5xdf7wjkxn9"; + }; + + buildInputs = [ + glog + go-runit + ntp + prometheus.client_golang + prometheus.client_model + protobuf + ]; + + meta = with lib; { + description = "Prometheus exporter for machine metrics"; + homepage = https://github.com/prometheus/node_exporter; + license = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bff75e5131c..d23623d1a6d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8389,6 +8389,8 @@ let callPackage ../servers/monitoring/prometheus/cli { }; prometheus-haproxy-exporter = callPackage ../servers/monitoring/prometheus/haproxy_exporter { }; + prometheus-node-exporter = + callPackage ../servers/monitoring/prometheus/node_exporter { }; prometheus-pushgateway = callPackage ../servers/monitoring/prometheus/pushgateway { }; diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index a9705d972bd..53c9d2d7068 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -537,6 +537,18 @@ let self = _self // overrides; _self = with self; { }; }; + go-runit = buildGoPackage rec { + rev = "a9148323a615e2e1c93b7a9893914a360b4945c8"; + name = "go-runit-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/soundcloud/go-runit"; + src = fetchFromGitHub { + inherit rev; + owner = "soundcloud"; + repo = "go-runit"; + sha256 = "00f2rfhsaqj2wjanh5qp73phx7x12a5pwd7lc0rjfv68l6sgpg2v"; + }; + }; + go-simplejson = buildGoPackage rec { rev = "1cfceb0e12f47ec02665ef480212d7b531d6f4c5"; name = "go-simplejson-${stdenv.lib.strings.substring 0 7 rev}"; @@ -793,6 +805,18 @@ let self = _self // overrides; _self = with self; { }; }; + ntp = buildGoPackage rec { + rev = "0a5264e2563429030eb922f258229ae3fee5b5dc"; + name = "ntp-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/beevik/ntp"; + src = fetchFromGitHub { + inherit rev; + owner = "beevik"; + repo = "ntp"; + sha256 = "03fvgbjf2aprjj1s6wdc35wwa7k1w5phkixzvp5n1j21sf6w4h24"; + }; + }; + oglematchers = buildGoPackage rec { rev = "4fc24f97b5b74022c2a3f4ca7eed57ca29083d3e"; name = "oglematchers-${stdenv.lib.strings.substring 0 7 rev}"; From 95be71cf91fbde933781a1c731dc2564c323644d Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Sat, 21 Mar 2015 16:31:18 -0700 Subject: [PATCH 34/53] Prometheus: update to 0.12.0 --- .../servers/monitoring/prometheus/default.nix | 6 ++-- pkgs/top-level/go-packages.nix | 34 ++++++++++++++++--- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/default.nix b/pkgs/servers/monitoring/prometheus/default.nix index 4c05a859f01..6e181c6ec9e 100644 --- a/pkgs/servers/monitoring/prometheus/default.nix +++ b/pkgs/servers/monitoring/prometheus/default.nix @@ -4,15 +4,15 @@ with goPackages; buildGoPackage rec { name = "prometheus-${version}"; - version = "0.10.0"; + version = "0.12.0"; goPackagePath = "github.com/prometheus/prometheus"; - rev = "f5a0f7fa185dae2c772a5847a7aac9ba33b545f9"; + rev = "55dcb55498b43bafe94915a4de7907d6d66b4427"; src = fetchFromGitHub { inherit rev; owner = "prometheus"; repo = "prometheus"; - sha256 = "1wagmr4bca8fbvi48n9p4hdnx1m4chyaa1bzman6dhqfmkiikf5q"; + sha256 = "17bbdk9axr91m2947ddbnzqwaap2vrzsbknbrlpdsmlsjhc8h7cb"; }; buildInputs = [ diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index 53c9d2d7068..42917a99c06 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -268,6 +268,18 @@ let self = _self // overrides; _self = with self; { buildInputs = [ sets go-simplejson check-v1 ]; }; + goautoneg = buildGoPackage rec { + rev = "75cd24fc2f2c2a2088577d12123ddee5f54e0675"; + name = "goautoneg-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "bitbucket.org/ww/goautoneg"; + + src = fetchhg { + inherit rev; + url = "https://${goPackagePath}"; + sha256 = "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"; + }; + }; + gocheck = buildGoPackage rec { rev = "87"; name = "gocheck-${rev}"; @@ -880,6 +892,18 @@ let self = _self // overrides; _self = with self; { }; }; + beorn7.perks = buildGoPackage rec { + rev = "b965b613227fddccbfffe13eae360ed3fa822f8d"; + name = "beorn7.perks-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/beorn7/perks"; + src = fetchFromGitHub { + inherit rev; + owner = "beorn7"; + repo = "perks"; + sha256 = "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"; + }; + }; + pflag = buildGoPackage rec { date = "20131112"; rev = "94e98a55fb412fcbcfc302555cb990f5e1590627"; @@ -907,20 +931,22 @@ let self = _self // overrides; _self = with self; { }; prometheus.client_golang = buildGoPackage rec { - rev = "4627d59e8a09c330c5ccfe7414baca28d8df847d"; - name = "prometheus-client-${stdenv.lib.strings.substring 0 7 rev}"; + name = "prometheus-client-${version}"; + version = "0.3.2"; goPackagePath = "github.com/prometheus/client_golang"; src = fetchFromGitHub { - inherit rev; owner = "prometheus"; repo = "client_golang"; - sha256 = "1mmj1r8xfi1gwb5f0l6sxjj804dhavp3pjmrqpbaa1g82bmz1hr1"; + rev = "${version}"; + sha256 = "1fn56zp420hxpm0prr76yyhh62zq3sqj3ppl2r4qxjc78f8ckbj4"; }; propagatedBuildInputs = [ protobuf golang_protobuf_extensions prometheus.client_model prometheus.procfs + beorn7.perks + goautoneg ]; }; From d8c2cebf01953eebd77ea8084ebcff2cadd3cd7b Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Sat, 21 Mar 2015 16:34:53 -0700 Subject: [PATCH 35/53] prometheus-node-exporter: update to 0.8.0 --- .../servers/monitoring/prometheus/node_exporter/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/node_exporter/default.nix b/pkgs/servers/monitoring/prometheus/node_exporter/default.nix index 136a1e05851..97169a0e298 100644 --- a/pkgs/servers/monitoring/prometheus/node_exporter/default.nix +++ b/pkgs/servers/monitoring/prometheus/node_exporter/default.nix @@ -3,14 +3,14 @@ with goPackages; buildGoPackage rec { - name = "prometheus-node-exporter-0.7.1"; + name = "prometheus-node-exporter-0.8.0"; goPackagePath = "github.com/prometheus/node_exporter"; src = fetchFromGitHub { owner = "prometheus"; repo = "node_exporter"; - rev = "0c8bfba04df87b90e69a79b2d25a5f627ebde1bb"; - sha256 = "12aj65hl9wql24rlpadd6mibf7sp8593xr1vljgyd5xdf7wjkxn9"; + rev = "aaf01e52e25883671fd67234b415df7abd0e4eac"; + sha256 = "0j1qvgsc2hcv50l9lyfivkzsyjkjp3w1yyqvd1gzfybk7hi59dya"; }; buildInputs = [ From 781dbfb9b8bde12798b29c10db1af20c426bc0c2 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Sat, 21 Mar 2015 16:53:04 -0700 Subject: [PATCH 36/53] New package: prometheus-mesos-exporter --- .../prometheus/mesos_exporter/default.nix | 24 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/go-packages.nix | 14 +++++++++++ 3 files changed, 40 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/mesos_exporter/default.nix diff --git a/pkgs/servers/monitoring/prometheus/mesos_exporter/default.nix b/pkgs/servers/monitoring/prometheus/mesos_exporter/default.nix new file mode 100644 index 00000000000..c8793e17abb --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/mesos_exporter/default.nix @@ -0,0 +1,24 @@ +{ stdenv, lib, goPackages, fetchFromGitHub }: + +goPackages.buildGoPackage rec { + name = "prometheus-mesos-exporter-${stdenv.lib.strings.substring 0 7 rev}"; + rev = "a4a6638d6db6b5137e130cd4903b30dd82b78e9a"; + goPackagePath = "github.com/prometheus/mesos_exporter"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "mesos_exporter"; + sha256 = "1h4yxfcr8l9i2m1s5ygk3slhxdrs4mvmpn3sq8m5s205abvp891q"; + }; + + buildInputs = [ goPackages.mesos-stats ]; + + meta = with lib; { + description = "Export Mesos metrics to Prometheus"; + homepage = https://github.com/prometheus/mesos_exporter; + licenses = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d23623d1a6d..921288ab8cc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8389,6 +8389,8 @@ let callPackage ../servers/monitoring/prometheus/cli { }; prometheus-haproxy-exporter = callPackage ../servers/monitoring/prometheus/haproxy_exporter { }; + prometheus-mesos-exporter = + callPackage ../servers/monitoring/prometheus/mesos_exporter { }; prometheus-node-exporter = callPackage ../servers/monitoring/prometheus/node_exporter { }; prometheus-pushgateway = diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index 42917a99c06..4f9f6947c98 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -782,6 +782,20 @@ let self = _self // overrides; _self = with self; { propagatedBuildInputs = [ go-codec armon.go-metrics ]; }; + mesos-stats = buildGoPackage rec { + rev = "0c6ea494c19bedc67ebb85ce3d187ec21050e920"; + name = "mesos-stats-${stdenv.lib.strings.substring 0 7 rev}"; + goPackagePath = "github.com/antonlindstrom/mesos_stats"; + src = fetchFromGitHub { + inherit rev; + owner = "antonlindstrom"; + repo = "mesos_stats"; + sha256 = "18ggyjf4nyn77gkn16wg9krp4dsphgzdgcr3mdflv6mvbr482ar4"; + }; + + propagatedBuildInputs = [ prometheus.client_golang glog ]; + }; + mgo = buildGoPackage rec { rev = "2"; name = "mgo-${rev}"; From bcc8293cba6757a3d58719502a404bfb7a95d29b Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Sat, 21 Mar 2015 17:08:48 -0700 Subject: [PATCH 37/53] New package: prometheus-statsd-bridge --- .../prometheus/statsd_bridge/default.nix | 27 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/statsd_bridge/default.nix diff --git a/pkgs/servers/monitoring/prometheus/statsd_bridge/default.nix b/pkgs/servers/monitoring/prometheus/statsd_bridge/default.nix new file mode 100644 index 00000000000..231aa31802c --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/statsd_bridge/default.nix @@ -0,0 +1,27 @@ +{ stdenv, lib, goPackages, fetchFromGitHub }: + +goPackages.buildGoPackage rec { + name = "prometheus-statsd-bridge-${stdenv.lib.strings.substring 0 7 rev}"; + rev = "9715b183150c7bed8a10affb23d33fb55c597180"; + goPackagePath = "github.com/prometheus/statsd_bridge"; + + src = fetchFromGitHub { + inherit rev; + owner = "prometheus"; + repo = "statsd_bridge"; + sha256 = "119024xb08qjwbhplpl5d94bjdfhn92w4ffn4kxr7aviri1gynfz"; + }; + + buildInputs = with goPackages; [ + fsnotify + prometheus.client_golang + ]; + + meta = with lib; { + description = "Receives StatsD-style metrics and exports them to Prometheus"; + homepage = https://github.com/prometheus/statsd_bridge; + licenses = licenses.asl20; + maintainers = with maintainers; [ benley ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 921288ab8cc..ecc5a4b7e46 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8395,6 +8395,8 @@ let callPackage ../servers/monitoring/prometheus/node_exporter { }; prometheus-pushgateway = callPackage ../servers/monitoring/prometheus/pushgateway { }; + prometheus-statsd-bridge = + callPackage ../servers/monitoring/prometheus/statsd_bridge { }; psqlodbc = callPackage ../servers/sql/postgresql/psqlodbc { }; From 56e21d05e874a29ad0d51aea18e8c982c7c826f3 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 23 Mar 2015 16:26:13 -0400 Subject: [PATCH 38/53] RStudio: initial commit at version 0.98.110 --- pkgs/applications/editors/rstudio/default.nix | 71 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 73 insertions(+) create mode 100644 pkgs/applications/editors/rstudio/default.nix diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix new file mode 100644 index 00000000000..c3ecbf0a60f --- /dev/null +++ b/pkgs/applications/editors/rstudio/default.nix @@ -0,0 +1,71 @@ +{ stdenv, fetchurl, cmake, boost155, zlib, openssl, R, qt4, libuuid, hunspellDicts, unzip, ant, jdk }: + +let + version = "0.98.110"; + ginVer = "1.5"; + gwtVer = "2.5.1"; +in +stdenv.mkDerivation { + name = "RStudio-${version}"; + + buildInputs = [ cmake boost155 zlib openssl R qt4 libuuid unzip ant jdk ]; + + src = fetchurl { + url = "https://github.com/rstudio/rstudio/archive/v${version}.tar.gz"; + sha256 = "0wybbvl5libki8z2ywgcd0hg0py1az484r95lhwh3jbrwfx7ri2z"; + }; + + # Hack RStudio to only use the input R. + patches = [ ./r-location.patch ]; + postPatch = "substituteInPlace src/cpp/core/r_util/REnvironmentPosix.cpp --replace '@R@' ${R}"; + + inherit ginVer; + ginSrc = fetchurl { + url = "https://s3.amazonaws.com/rstudio-buildtools/gin-${ginVer}.zip"; + sha256 = "155bjrgkf046b8ln6a55x06ryvm8agnnl7l8bkwwzqazbpmz8qgm"; + }; + + inherit gwtVer; + gwtSrc = fetchurl { + url = "https://s3.amazonaws.com/rstudio-buildtools/gwt-${gwtVer}.zip"; + sha256 = "0fjr2rcr8lnywj54mzhg9i4xz1b6fh8yv12p5i2q5mgfld2xymy4"; + }; + + hunspellDicts = builtins.attrValues hunspellDicts; + + mathJaxSrc = fetchurl { + url = https://s3.amazonaws.com/rstudio-buildtools/mathjax-20.zip; + sha256 = "1ikg3fhharsfrh2fv8c53fdawqajj24nif89400l3klw1hyq4zal"; + }; + + preConfigure = + '' + GWT_LIB_DIR=src/gwt/lib + + mkdir -p $GWT_LIB_DIR/gin/$ginVer + unzip $ginSrc -d $GWT_LIB_DIR/gin/$ginVer + + unzip $gwtSrc + mkdir -p $GWT_LIB_DIR/gwt + mv gwt-$gwtVer $GWT_LIB_DIR/gwt/$gwtVer + + mkdir dependencies/common/dictionaries + for dict in $hunspellDicts; do + for i in $dict/share/hunspell/* + do ln -sv $i dependencies/common/dictionaries/ + done + done + + unzip $mathJaxSrc -d dependencies/common/mathjax + ''; + + cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" ]; + + meta = with stdenv.lib; + { description = "Set of integrated tools for the R language"; + homepage = http://www.rstudio.com/; + license = licenses.agpl3; + maintainers = [ maintainers.emery ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 75d0cf80130..2a4a29b1742 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11502,6 +11502,8 @@ let automake = automake114x; }; + rstudio = callPackage ../applications/editors/rstudio { }; + rsync = callPackage ../applications/networking/sync/rsync { enableACLs = !(stdenv.isDarwin || stdenv.isSunOS || stdenv.isFreeBSD); enableCopyDevicesPatch = (config.rsync.enableCopyDevicesPatch or false); From 7f728ae2e1ff3f2a25148cc830f86a46eb30cace Mon Sep 17 00:00:00 2001 From: Patrick Mahoney Date: Mon, 23 Mar 2015 15:52:34 -0500 Subject: [PATCH 39/53] libdevil: patch to build on darwin On a OSX 10.10 system: libtool: compile: clang++ -DHAVE_CONFIG_H -I. -I../include/IL -I ./../src-IL/include -I ./../include -fgnu89-inline -msse -msse2 -msse3 -D_THREAD_SAFE -I/nix/store/7n9c36hz9sl2dqvfry8d554l935hq4ma-openexr-2.2.0/include/OpenEXR -I/nix/store/3jxslxa37wmfdnyfj1hckpxl0skscgj0-ilmbase-2.2.0/include/OpenEXR -O3 -c ./../src-IL/src/il_exr.cpp -fno-common -DPIC -o .libs/libIL_la-il_exr.o In file included from ./../src-IL/src/il_exr.cpp:22: In file included from ./../src-IL/include/il_exr.h:18: In file included from /nix/store/7n9c36hz9sl2dqvfry8d554l935hq4ma-openexr-2.2.0/include/OpenEXR/ImfIO.h:49: In file included from /nix/store/3qsrpjbsmn7w4d18i8zc6a44myiaa516-libc++-3.5.0/include/c++/v1/string:434: /nix/store/3qsrpjbsmn7w4d18i8zc6a44myiaa516-libc++-3.5.0/include/c++/v1/__config:32:22: error: expected value in expression #if __LITTLE_ENDIAN__ ^ /nix/store/3qsrpjbsmn7w4d18i8zc6a44myiaa516-libc++-3.5.0/include/c++/v1/__config:110:11: fatal error: 'endian.h' file not found # include ^ 2 errors generated. make[1]: *** [libIL_la-il_exr.lo] Error 1 make[1]: Leaving directory `/private/var/folders/1g/yfm550_10sb76p0z469bq9mr5zsthm/T/nix-build-libdevil-1.7.8.drv-1/devil-1.7.8/lib' make: *** [all-recursive] Error 1 See http://sourceforge.net/p/resil/tickets/8/ --- .../libraries/libdevil/default.nix | 1 + .../libraries/libdevil/il_endian.h.patch | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/libraries/libdevil/il_endian.h.patch diff --git a/pkgs/development/libraries/libdevil/default.nix b/pkgs/development/libraries/libdevil/default.nix index 6cbbddfdba8..abc7dd3af40 100644 --- a/pkgs/development/libraries/libdevil/default.nix +++ b/pkgs/development/libraries/libdevil/default.nix @@ -31,6 +31,7 @@ stdenv.mkDerivation rec { sha256 = "0qkx2qfv02igbrmsn6z5a3lbrbwjfh3rb0c2sj54wy0j1f775hbc"; } ) ./ftbfs-libpng15.patch + ./il_endian.h.patch ]; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/libdevil/il_endian.h.patch b/pkgs/development/libraries/libdevil/il_endian.h.patch new file mode 100644 index 00000000000..c220e6802fd --- /dev/null +++ b/pkgs/development/libraries/libdevil/il_endian.h.patch @@ -0,0 +1,27 @@ +Source: http://sourceforge.net/p/resil/tickets/8/ +--- devil-1.7.8.orig/src-IL/include/il_endian.h.orig 2009-03-08 01:10:08.000000000 -0600 ++++ devil-1.7.8/src-IL/include/il_endian.h 2013-11-03 01:52:37.000000000 -0600 +@@ -19,9 +19,13 @@ + #ifndef __BIG_ENDIAN__ + #define __BIG_ENDIAN__ 1 + #endif ++#else ++ #ifndef __LITTLE_ENDIAN__ ++ #define __LITTLE_ENDIAN__ 1 ++ #endif + #endif + +-#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __BIG_ENDIAN__) \ ++#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) \ + || (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) + #undef __LITTLE_ENDIAN__ + #define Short(s) iSwapShort(s) +@@ -39,8 +43,6 @@ + #define BigDouble(d) + #else + #undef __BIG_ENDIAN__ +- #undef __LITTLE_ENDIAN__ // Not sure if it's defined by any compiler... +- #define __LITTLE_ENDIAN__ + #define Short(s) + #define UShort(s) + #define Int(i) From 232b434bc4ad4dfbb32367a5180b9ad6c07b9e14 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Mon, 23 Mar 2015 19:32:28 +0100 Subject: [PATCH 40/53] gradm: Update from 3.1-201502222102 -> 3.1-201503211320 --- pkgs/os-specific/linux/gradm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/gradm/default.nix b/pkgs/os-specific/linux/gradm/default.nix index 718a9672c90..d34a028220c 100644 --- a/pkgs/os-specific/linux/gradm/default.nix +++ b/pkgs/os-specific/linux/gradm/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { name = "gradm-${version}"; - version = "3.1-201502222102"; + version = "3.1-201503211320"; src = fetchurl { url = "http://grsecurity.net/stable/${name}.tar.gz"; - sha256 = "1dvzjjyq8phhjcm425j9hw0m0azg34lm02p0yn058jiipx731xrp"; + sha256 = "17yd307jqva8jqib2xr3i9kmp58f2cb4jd7an5rbk5zr1k48ap9j"; }; buildInputs = [ gcc coreutils findutils binutils pam flex bison bash ]; From c3bc040128da089d897340ed9f365c08828d7b97 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 24 Mar 2015 04:00:21 +0100 Subject: [PATCH 41/53] python-packages: pgcli 0.16.1 -> 0.16.2 --- pkgs/top-level/python-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bcce660ad3c..c01b3b59ee0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7526,10 +7526,10 @@ let pgcli = buildPythonPackage rec { name = "pgcli-${version}"; - version = "0.16.1"; + version = "0.16.2"; src = pkgs.fetchFromGitHub { - sha256 = "1sysx67inf0fcfa4qhqcii97y59zpg98f4kcvz15rlbnsi357css"; + sha256 = "1f30f9v2iz2206aqzwc6jjadlxd7snicazrp9bcy5sizpha3r55i"; rev = "v${version}"; repo = "pgcli"; owner = "amjith"; From ff9bc819461bd234d8b22f26ccf9784738275c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Tue, 24 Mar 2015 07:05:25 +0100 Subject: [PATCH 42/53] lttng-modules: update to latest stable (fixes build) Fixes build against linux 3.14.36+. Also * It works with linux 3.12 now, so remove that assert * Remove unneeded patches (merged upstream) --- ...f2643c40b57280796eaa4fe60ce4f678b6dc.patch | 71 ------------------- .../linux/lttng-modules/build-fix.patch | 30 -------- .../linux/lttng-modules/default.nix | 15 ++-- 3 files changed, 6 insertions(+), 110 deletions(-) delete mode 100644 pkgs/os-specific/linux/lttng-modules/6f0af2643c40b57280796eaa4fe60ce4f678b6dc.patch delete mode 100644 pkgs/os-specific/linux/lttng-modules/build-fix.patch diff --git a/pkgs/os-specific/linux/lttng-modules/6f0af2643c40b57280796eaa4fe60ce4f678b6dc.patch b/pkgs/os-specific/linux/lttng-modules/6f0af2643c40b57280796eaa4fe60ce4f678b6dc.patch deleted file mode 100644 index 2c9cb9835d1..00000000000 --- a/pkgs/os-specific/linux/lttng-modules/6f0af2643c40b57280796eaa4fe60ce4f678b6dc.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 6f0af2643c40b57280796eaa4fe60ce4f678b6dc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andr=C3=A9=20Goddard=20Rosa?= -Date: Thu, 13 Nov 2014 21:33:02 -0800 -Subject: [PATCH] Fix compilation on Linux kernel >= 3.18.0 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Since kernel commit 8a9522d2fe compilation fails as kvm_age_page -tracepoint had its signature changed, so update it accordingly. - -Tested pointing to kernels: - git reset --hard v3.17; make init/version.o - git reset --hard v3.18-rc1; make init/version.o - -Signed-off-by: André Goddard Rosa -Signed-off-by: Mathieu Desnoyers ---- - instrumentation/events/lttng-module/kvm.h | 29 +++++++++++++++++++++++++++++ - 1 file changed, 29 insertions(+) - mode change 100644 => 100755 instrumentation/events/lttng-module/kvm.h - -diff --git a/instrumentation/events/lttng-module/kvm.h b/instrumentation/events/lttng-module/kvm.h -old mode 100644 -new mode 100755 -index c0d42e2..4f95095 ---- a/instrumentation/events/lttng-module/kvm.h -+++ b/instrumentation/events/lttng-module/kvm.h -@@ -232,6 +232,34 @@ LTTNG_TRACEPOINT_EVENT(kvm_fpu, - TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol)) - ) - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)) -+ -+LTTNG_TRACEPOINT_EVENT(kvm_age_page, -+ TP_PROTO(ulong gfn, int level, struct kvm_memory_slot *slot, int ref), -+ TP_ARGS(gfn, level, slot, ref), -+ -+ TP_STRUCT__entry( -+ __field( u64, hva ) -+ __field( u64, gfn ) -+ __field( u8, level ) -+ __field( u8, referenced ) -+ ), -+ -+ TP_fast_assign( -+ tp_assign(gfn, gfn) -+ tp_assign(level, level) -+ tp_assign(hva, ((gfn - slot->base_gfn) << -+ PAGE_SHIFT) + slot->userspace_addr) -+ tp_assign(referenced, ref) -+ ), -+ -+ TP_printk("hva %llx gfn %llx level %u %s", -+ __entry->hva, __entry->gfn, __entry->level, -+ __entry->referenced ? "YOUNG" : "OLD") -+) -+ -+#else -+ - LTTNG_TRACEPOINT_EVENT(kvm_age_page, - TP_PROTO(ulong hva, struct kvm_memory_slot *slot, int ref), - TP_ARGS(hva, slot, ref), -@@ -254,6 +282,7 @@ LTTNG_TRACEPOINT_EVENT(kvm_age_page, - __entry->referenced ? "YOUNG" : "OLD") - ) - #endif -+#endif - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) - diff --git a/pkgs/os-specific/linux/lttng-modules/build-fix.patch b/pkgs/os-specific/linux/lttng-modules/build-fix.patch deleted file mode 100644 index 76f449b8b2c..00000000000 --- a/pkgs/os-specific/linux/lttng-modules/build-fix.patch +++ /dev/null @@ -1,30 +0,0 @@ -[PATCH] Update compaction instrumentation for 3.14.x stable kernels - -Conditional compilation introduced by lttng-modules commit - - 0007344741ef65259bc52dea72259173dfbf96c0 - -needs to be applied to kernels 3.14.25 and up in the 3.14.x branch. - -Signed-off-by: Simon Marchi -Reported-by: Bjørn Forsman ---- - instrumentation/events/lttng-module/compaction.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h -index ee23aa9..773a6ad 100644 ---- a/instrumentation/events/lttng-module/compaction.h -+++ b/instrumentation/events/lttng-module/compaction.h -@@ -46,7 +46,8 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_compaction_isolate_template, mm_compaction_is - TP_ARGS(nr_scanned, nr_taken) - ) - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) -+#if LTTNG_KERNEL_RANGE(3,14,25, 3,15,0) || \ -+ (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) - LTTNG_TRACEPOINT_EVENT(mm_compaction_migratepages, - - TP_PROTO(unsigned long nr_all, --- -2.1.3 diff --git a/pkgs/os-specific/linux/lttng-modules/default.nix b/pkgs/os-specific/linux/lttng-modules/default.nix index 871edf87b7a..5fe065d3cc6 100644 --- a/pkgs/os-specific/linux/lttng-modules/default.nix +++ b/pkgs/os-specific/linux/lttng-modules/default.nix @@ -1,21 +1,18 @@ -{ stdenv, fetchurl, kernel }: +{ stdenv, fetchgit, kernel }: assert stdenv.lib.versionAtLeast kernel.version "3.4"; # fails on 3.2 -assert builtins.substring 0 4 kernel.version != "3.12"; stdenv.mkDerivation rec { pname = "lttng-modules-${version}"; name = "${pname}-${kernel.version}"; - version = "2.6.0-rc1"; # "git describe bf2ba318fff" + version = "2.6.0-5-g1b2a542"; - src = fetchurl { - url = "https://github.com/lttng/lttng-modules/archive/v${version}.tar.gz"; - sha256 = "01gha02ybbzr86v6s6bqn649jiw5k89kb363b9s1iv8igrdlzhl1"; + src = fetchgit { + url = "https://github.com/lttng/lttng-modules.git"; + rev = "1b2a5429de815c95643df2eadf91253909708728"; + sha256 = "0zccaiadnk0xl6xrqaqlg9rpkwjgbq2fiyc3psylzqimnx0ydxc2"; }; - # from upstream ML, should be in the next release - patches = [ ./build-fix.patch ./6f0af2643c40b57280796eaa4fe60ce4f678b6dc.patch ]; - preConfigure = '' export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" export INSTALL_MOD_PATH="$out" From 03912fb435a7284a97d37fea8ffc752e6595614e Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Tue, 24 Mar 2015 09:45:00 +0300 Subject: [PATCH 43/53] Update libfixposix link --- pkgs/development/libraries/libfixposix/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libfixposix/default.nix b/pkgs/development/libraries/libfixposix/default.nix index 19c2d2a6b80..078a2ab0733 100644 --- a/pkgs/development/libraries/libfixposix/default.nix +++ b/pkgs/development/libraries/libfixposix/default.nix @@ -13,7 +13,7 @@ let sourceInfo = rec { method="fetchgit"; baseName="libfixposix"; - url="git://gitorious.org/${baseName}/${baseName}"; + url="https://github.com/sionescu/libfixposix"; rev="30b75609d858588ea00b427015940351896867e9"; version="git-${rev}"; name="${baseName}-${version}"; From 85704cd9d3f9633488469f66240a9aec76066d0d Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 24 Mar 2015 13:58:08 +0100 Subject: [PATCH 44/53] cabal2nix: update to latest Git version --- pkgs/development/haskell-modules/configuration-common.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index a339166fd2d..ffd2e209999 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -642,11 +642,11 @@ self: super: { # Not on Hackage. cabal2nix = self.mkDerivation { pname = "cabal2nix"; - version = "20150310"; + version = "20150318"; src = pkgs.fetchgit { url = "http://github.com/NixOS/cabal2nix.git"; - rev = "267d0495209822ad819b58cb472a0da54f5a0b72"; - sha256 = "1sdsjwf1cda4bpriiv1vfx0pa26087hzw7vviacvgbmn0xh6wm8g"; + rev = "a8eaadbe6529cabd5088b8ae24fb325fc85a50c1"; + sha256 = "08q6c6g6syf4qgmgmicq8gf3fmp2cvy9mm6wm0vi7wjll3i2dns1"; deepClone = true; }; isLibrary = false; From f80e342e8335912040000a47e19e0151f96e32fe Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Tue, 24 Mar 2015 08:59:34 -0400 Subject: [PATCH 45/53] ccache-links is wrapped, so it needs a gcc attribute --- pkgs/development/tools/misc/ccache/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix index 305ccdb8dd0..7c0cfa51cd7 100644 --- a/pkgs/development/tools/misc/ccache/default.nix +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { passthru = { # A derivation that provides gcc and g++ commands, but that # will end up calling ccache for the given cacheDir - links = extraConfig : (runCommand "ccache-links" { } + links = extraConfig : (runCommand "ccache-links" { passthru.gcc = gcc; } '' mkdir -p $out/bin if [ -x "${gcc.cc}/bin/gcc" ]; then From 62a64992438dbecac3b5044b6a4c411d659d2a48 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 24 Mar 2015 13:56:36 +0100 Subject: [PATCH 46/53] j: re-implement using mkDerivation --- pkgs/development/interpreters/j/default.nix | 84 ++++++--------------- 1 file changed, 25 insertions(+), 59 deletions(-) diff --git a/pkgs/development/interpreters/j/default.nix b/pkgs/development/interpreters/j/default.nix index 3668fedf051..4c064a42ebf 100644 --- a/pkgs/development/interpreters/j/default.nix +++ b/pkgs/development/interpreters/j/default.nix @@ -1,42 +1,16 @@ -x@{builderDefsPackage - , readline - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, readline }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="j"; - version="701_b"; - name="${baseName}-${version}"; - url="http://www.jsoftware.com/download/${baseName}${version}_source.tar.gz"; - hash="1gmjlpxcd647x690c4dxnf8h6ays8ndir6cib70h3zfnkrc34cys"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "j-${version}"; + version = "701_b"; + src = fetchurl { + url = "http://www.jsoftware.com/download/j${version}_source.tar.gz"; + sha256 = "1gmjlpxcd647x690c4dxnf8h6ays8ndir6cib70h3zfnkrc34cys"; }; + buildInputs = [ readline ]; + bits = if stdenv.is64bit then "64" else "32"; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doUnpack" "doBuildJ" "doDeploy"]; - - bits = if a.stdenv.is64bit then - "64" - else if a.stdenv.isi686 then - "32" - else - builtins.trace "assuming ${a.stdenv.system} is 32 bits" "32"; - - doBuildJ = a.fullDepEntry '' + buildPhase = '' sed -i bin/jconfig -e ' s@bits=32@bits=${bits}@g; s@readline=0@readline=1@; @@ -51,36 +25,28 @@ rec { sh -o errexit bin/build_defs sh -o errexit bin/build_tsdll - sed -i j/bin/profile.ijs -e "s@userx=[.] *'.j'@userx=. '/.j'@; + sed -i j/bin/profile.ijs -e " + s@userx=[.] *'.j'@userx=. '/.j'@; s@bin,'/profilex.ijs'@user,'/profilex.ijs'@ ; /install=./ainstall=. install,'/share/j' - " - '' ["doUnpack" "addInputs" "minInit"]; + " + ''; - doDeploy = a.fullDepEntry '' + installPhase = '' mkdir -p "$out" cp -r j/bin "$out/bin" rm "$out/bin/profilex_template.ijs" - + mkdir -p "$out/share/j" cp -r docs j/addons j/system "$out/share/j" - '' ["doUnpack" "doBuildJ" "minInit" "defEnsureDir"]; - - meta = { - description = "J programming language, an ASCII-based APL successor"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - unix; - license = a.lib.licenses.gpl3Plus; - }; - passthru = { - updateInfo = { - downloadPage = "http://jsoftware.com/source.htm"; - }; - }; -}) x + ''; + meta = with stdenv.lib; { + description = "J programming language, an ASCII-based APL successor"; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.unix; + license = licenses.gpl3Plus; + homepage = http://jsoftware.com/; + }; +} From 5cc05f6cf23bc90f770f63d67b9ced2dbcdd331e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Mar 2015 14:42:37 +0100 Subject: [PATCH 47/53] nixUnstable: Update to 1.9pre4083_5114a07 --- pkgs/tools/package-management/nix/unstable.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix index 8a1937933c9..d39a13196a8 100644 --- a/pkgs/tools/package-management/nix/unstable.nix +++ b/pkgs/tools/package-management/nix/unstable.nix @@ -5,11 +5,11 @@ }: stdenv.mkDerivation rec { - name = "nix-1.9pre4074_e659978"; + name = "nix-1.9pre4083_5114a07"; src = fetchurl { - url = "http://hydra.nixos.org/build/20175576/download/4/${name}.tar.xz"; - sha256 = "51cafd9428cce907a735e37e5dd46f36218351175e458d0834b306d257760204"; + url = "http://hydra.nixos.org/build/20650421/download/4/${name}.tar.xz"; + sha256 = "971fdd36bcf39c7e6ce9ef12dbfe09c98d2be3275e482ca2dbacb2e668f0dff9"; }; nativeBuildInputs = [ perl pkgconfig ]; From 253f3d72c2f4ceeb03e348c64de446e31cd6502b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Mar 2015 15:59:05 +0100 Subject: [PATCH 48/53] fix-darwin-dylib-names: Fix all outputs This fixes the install names of the Boost dylibs on Darwin. --- pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh index 2b64fbf8f09..8fe66102677 100644 --- a/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh +++ b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh @@ -10,7 +10,7 @@ # their absolute path (using "install_name_tool -id"). It also # rewrites references in other dylibs to absolute paths. -postFixupHooks+=('fixDarwinDylibNamesIn $prefix') +fixupOutputHooks+=('fixDarwinDylibNamesIn $prefix') fixDarwinDylibNames() { local flags=() From b4830add94405945b674f5a2d3998c24a8bfab9a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Mar 2015 16:27:54 +0100 Subject: [PATCH 49/53] Revert "fix-darwin-dylib-names: Fix all outputs" This reverts commit 253f3d72c2f4ceeb03e348c64de446e31cd6502b. --- pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh index 8fe66102677..2b64fbf8f09 100644 --- a/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh +++ b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh @@ -10,7 +10,7 @@ # their absolute path (using "install_name_tool -id"). It also # rewrites references in other dylibs to absolute paths. -fixupOutputHooks+=('fixDarwinDylibNamesIn $prefix') +postFixupHooks+=('fixDarwinDylibNamesIn $prefix') fixDarwinDylibNames() { local flags=() From 7b7ab0cdaa8539738cb1be5f6005b086af6f419e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edward=20Tj=C3=B6rnhammar?= Date: Tue, 24 Mar 2015 17:01:41 +0100 Subject: [PATCH 50/53] idea-{community,ultimate}: 14.0.3 -> 14.1 --- pkgs/applications/editors/idea/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/idea/default.nix b/pkgs/applications/editors/idea/default.nix index ba4a4173da7..61d508936b8 100644 --- a/pkgs/applications/editors/idea/default.nix +++ b/pkgs/applications/editors/idea/default.nix @@ -218,25 +218,25 @@ in idea-community = buildIdea rec { name = "idea-community-${version}"; - version = "14.0.3"; - build = "IC-139.1117"; + version = "14.1"; + build = "IC-141.177.4"; description = "Integrated Development Environment (IDE) by Jetbrains, community edition"; license = stdenv.lib.licenses.asl20; src = fetchurl { url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz"; - sha256 = "01wcpzdahkh3li2l3k2bgirnlp7hdxk9y1kyrxc3d9d1nazq8wqn"; + sha256 = "05irkxhmx6pisvghjalw8hcf9v3n4wn0n0zc92ahivzxlicylpr6"; }; }; idea-ultimate = buildIdea rec { name = "idea-ultimate-${version}"; - version = "14.0.3"; - build = "IU-139.1117"; + version = "14.1"; + build = "IU-141.177.4"; description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license"; license = stdenv.lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/idea/ideaIU-${version}.tar.gz"; - sha256 = "1zkqigdh9l1f3mjjvxsp7b7vc93v5ylvxa1dfpclzmfbzna7h69s"; + sha256 = "10zv3m44ci7gl7163yp4wxnjy7c0g5zl34c2ibnx4c6ds6l4di2p"; }; }; From d3500f67c901c1f0bfca6cce7af4e7a5ff3d4749 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 24 Mar 2015 13:52:47 -0500 Subject: [PATCH 51/53] kde4: fix override --- pkgs/top-level/all-packages.nix | 252 +++++++++++++++++--------------- 1 file changed, 133 insertions(+), 119 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4bffb5aeb6e..e22a53d8e29 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12851,187 +12851,201 @@ let kde4 = recurseIntoAttrs pkgs.kde414; - kde414 = kdePackagesFor (pkgs.kde414 // { - libusb = libusb1; - libcanberra = libcanberra_kde; - boost = boost156; - }) ../desktops/kde-4.14; - - kdePackagesFor = self: dir: - let callPackageOrig = newScope { cmake = cmake-3_2; }; in - let - callPackage = newScope (self // { cmake = cmake-3_2; }); - kde4 = callPackageOrig dir { - inherit callPackage callPackageOrig; + kde414 = + kdePackagesFor + { + libusb = libusb1; + libcanberra = libcanberra_kde; + boost = boost156; kdelibs = kdeApps_stable.kdelibs; - }; - in kde4 // { - inherit kde4; + } + ../desktops/kde-4.14; - wrapper = callPackage ../build-support/kdewrapper {}; - recurseForRelease = true; + kdePackagesFor = extra: dir: + let + # list of extra packages not included in KDE + # the real work in this function is done below this list + extraPackages = callPackage: + rec { + amarok = callPackage ../applications/audio/amarok { }; - amarok = callPackage ../applications/audio/amarok { }; + bangarang = callPackage ../applications/video/bangarang { }; - bangarang = callPackage ../applications/video/bangarang { }; + basket = callPackage ../applications/office/basket { }; - basket = callPackage ../applications/office/basket { }; + bluedevil = callPackage ../tools/bluetooth/bluedevil { }; - bluedevil = callPackage ../tools/bluetooth/bluedevil { }; + calligra = callPackage ../applications/office/calligra { eigen = eigen2; }; - calligra = callPackage ../applications/office/calligra { eigen = eigen2; }; + choqok = callPackage ../applications/networking/instant-messengers/choqok { }; - choqok = callPackage ../applications/networking/instant-messengers/choqok { }; + colord-kde = callPackage ../tools/misc/colord-kde { }; - colord-kde = callPackage ../tools/misc/colord-kde { }; + digikam = if builtins.compareVersions "4.9" kde4.release == 1 then + callPackage ../applications/graphics/digikam/2.nix { } + else + callPackage ../applications/graphics/digikam { }; - digikam = if builtins.compareVersions "4.9" kde4.release == 1 then - callPackage ../applications/graphics/digikam/2.nix { } - else - callPackage ../applications/graphics/digikam { }; + eventlist = callPackage ../applications/office/eventlist {}; - eventlist = callPackage ../applications/office/eventlist {}; + k3b = callPackage ../applications/misc/k3b { + cdrtools = cdrkit; + }; - k3b = callPackage ../applications/misc/k3b { - cdrtools = cdrkit; - }; + kadu = callPackage ../applications/networking/instant-messengers/kadu { }; - kadu = callPackage ../applications/networking/instant-messengers/kadu { }; + kbibtex = callPackage ../applications/office/kbibtex { }; - kbibtex = callPackage ../applications/office/kbibtex { }; + kde_gtk_config = callPackage ../tools/misc/kde-gtk-config { }; - kde_gtk_config = callPackage ../tools/misc/kde-gtk-config { }; + kde_wacomtablet = callPackage ../applications/misc/kde-wacomtablet { }; - kde_wacomtablet = callPackage ../applications/misc/kde-wacomtablet { }; + kdeconnect = callPackage ../applications/misc/kdeconnect { }; - kdeconnect = callPackage ../applications/misc/kdeconnect { }; + kdenlive = callPackage ../applications/video/kdenlive { mlt = mlt-qt4; }; - kdenlive = callPackage ../applications/video/kdenlive { mlt = mlt-qt4; }; + kdesvn = callPackage ../applications/version-management/kdesvn { }; - kdesvn = callPackage ../applications/version-management/kdesvn { }; + kdevelop = callPackage ../applications/editors/kdevelop { }; - kdevelop = callPackage ../applications/editors/kdevelop { }; + kdevplatform = callPackage ../development/libraries/kdevplatform { + boost = boost156; + }; - kdevplatform = callPackage ../development/libraries/kdevplatform { - boost = boost156; - }; + kdiff3 = callPackage ../tools/text/kdiff3 { }; - kdiff3 = callPackage ../tools/text/kdiff3 { }; + kgraphviewer = callPackage ../applications/graphics/kgraphviewer { }; - kgraphviewer = callPackage ../applications/graphics/kgraphviewer { }; + kile = callPackage ../applications/editors/kile { }; - kile = callPackage ../applications/editors/kile { }; + kmplayer = callPackage ../applications/video/kmplayer { }; - kmplayer = callPackage ../applications/video/kmplayer { }; + kmymoney = callPackage ../applications/office/kmymoney { }; - kmymoney = callPackage ../applications/office/kmymoney { }; + kipi_plugins = callPackage ../applications/graphics/kipi-plugins { }; - kipi_plugins = callPackage ../applications/graphics/kipi-plugins { }; + konversation = callPackage ../applications/networking/irc/konversation { }; - konversation = callPackage ../applications/networking/irc/konversation { }; + kvirc = callPackage ../applications/networking/irc/kvirc { }; - kvirc = callPackage ../applications/networking/irc/kvirc { }; + krename = callPackage ../applications/misc/krename { }; - krename = callPackage ../applications/misc/krename { }; + krusader = callPackage ../applications/misc/krusader { }; - krusader = callPackage ../applications/misc/krusader { }; + ksshaskpass = callPackage ../tools/security/ksshaskpass {}; - ksshaskpass = callPackage ../tools/security/ksshaskpass {}; + ktorrent = callPackage ../applications/networking/p2p/ktorrent { }; - ktorrent = callPackage ../applications/networking/p2p/ktorrent { }; + kuickshow = callPackage ../applications/graphics/kuickshow { }; - kuickshow = callPackage ../applications/graphics/kuickshow { }; + libalkimia = callPackage ../development/libraries/libalkimia { }; - libalkimia = callPackage ../development/libraries/libalkimia { }; + libktorrent = callPackage ../development/libraries/libktorrent { + boost = boost156; + }; - libktorrent = callPackage ../development/libraries/libktorrent { - boost = boost156; - }; + libkvkontakte = callPackage ../development/libraries/libkvkontakte { }; - libkvkontakte = callPackage ../development/libraries/libkvkontakte { }; + liblikeback = callPackage ../development/libraries/liblikeback { }; - liblikeback = callPackage ../development/libraries/liblikeback { }; + libmm-qt = callPackage ../development/libraries/libmm-qt { }; - libmm-qt = callPackage ../development/libraries/libmm-qt { }; + libnm-qt = callPackage ../development/libraries/libnm-qt { }; - libnm-qt = callPackage ../development/libraries/libnm-qt { }; + massif-visualizer = callPackage ../development/tools/analysis/massif-visualizer { }; - massif-visualizer = callPackage ../development/tools/analysis/massif-visualizer { }; + networkmanagement = callPackage ../tools/networking/networkmanagement { }; - networkmanagement = callPackage ../tools/networking/networkmanagement { }; + partitionManager = callPackage ../tools/misc/partition-manager { }; - partitionManager = callPackage ../tools/misc/partition-manager { }; + plasma-nm = callPackage ../tools/networking/plasma-nm { }; - plasma-nm = callPackage ../tools/networking/plasma-nm { }; + polkit_kde_agent = callPackage ../tools/security/polkit-kde-agent { }; - polkit_kde_agent = callPackage ../tools/security/polkit-kde-agent { }; + psi = callPackage ../applications/networking/instant-messengers/psi { }; - psi = callPackage ../applications/networking/instant-messengers/psi { }; + qtcurve = callPackage ../misc/themes/qtcurve { }; - qtcurve = callPackage ../misc/themes/qtcurve { }; + quassel = callPackage ../applications/networking/irc/quassel rec { + monolithic = true; + daemon = false; + client = false; + withKDE = stdenv.isLinux; + qt = if withKDE then qt4 else qt5; # KDE supported quassel cannot build with qt5 yet (maybe in 0.12.0) + dconf = gnome3.dconf; + }; - quassel = callPackage ../applications/networking/irc/quassel rec { - monolithic = true; - daemon = false; - client = false; - withKDE = stdenv.isLinux; - qt = if withKDE then qt4 else qt5; # KDE supported quassel cannot build with qt5 yet (maybe in 0.12.0) - dconf = gnome3.dconf; - }; + quasselWithoutKDE = (quassel.override { + monolithic = true; + daemon = false; + client = false; + withKDE = false; + #qt = qt5; + tag = "-without-kde"; + }); - quasselWithoutKDE = (self.quassel.override { - monolithic = true; - daemon = false; - client = false; - withKDE = false; - #qt = qt5; - tag = "-without-kde"; - }); + quasselDaemon = (quassel.override { + monolithic = false; + daemon = true; + client = false; + withKDE = false; + #qt = qt5; + tag = "-daemon"; + }); - quasselDaemon = (self.quassel.override { - monolithic = false; - daemon = true; - client = false; - withKDE = false; - #qt = qt5; - tag = "-daemon"; - }); + quasselClient = (quassel.override { + monolithic = false; + daemon = false; + client = true; + tag = "-client"; + }); - quasselClient = (self.quassel.override { - monolithic = false; - daemon = false; - client = true; - tag = "-client"; - }); + quasselClientWithoutKDE = (quasselClient.override { + monolithic = false; + daemon = false; + client = true; + withKDE = false; + #qt = qt5; + tag = "-client-without-kde"; + }); - quasselClientWithoutKDE = (self.quasselClient.override { - monolithic = false; - daemon = false; - client = true; - withKDE = false; - #qt = qt5; - tag = "-client-without-kde"; - }); + rekonq = callPackage ../applications/networking/browsers/rekonq { }; - rekonq = callPackage ../applications/networking/browsers/rekonq { }; + kwebkitpart = callPackage ../applications/networking/browsers/kwebkitpart { }; - kwebkitpart = callPackage ../applications/networking/browsers/kwebkitpart { }; + rsibreak = callPackage ../applications/misc/rsibreak { }; - rsibreak = callPackage ../applications/misc/rsibreak { }; + semnotes = callPackage ../applications/misc/semnotes { }; - semnotes = callPackage ../applications/misc/semnotes { }; + skrooge = callPackage ../applications/office/skrooge { }; - skrooge = callPackage ../applications/office/skrooge { }; + telepathy = callPackage ../applications/networking/instant-messengers/telepathy/kde {}; - telepathy = callPackage ../applications/networking/instant-messengers/telepathy/kde {}; + yakuake = callPackage ../applications/misc/yakuake { }; - yakuake = callPackage ../applications/misc/yakuake { }; + zanshin = callPackage ../applications/office/zanshin { }; - zanshin = callPackage ../applications/office/zanshin { }; + kwooty = callPackage ../applications/networking/newsreaders/kwooty { }; + }; - kwooty = callPackage ../applications/networking/newsreaders/kwooty { }; - }; + callPackageOrig = newScope (extra // { cmake = cmake-3_2; }); + + makePackages = extra: + let + callPackage = newScope (extra // { cmake = cmake-3_2; } // self); + kde4 = callPackageOrig dir { inherit callPackage callPackageOrig; }; + self = + kde4 + // extraPackages callPackage + // { + inherit kde4; + wrapper = callPackage ../build-support/kdewrapper {}; + recurseForRelease = true; + }; + in self; + + in makeOverridable makePackages extra; pantheon = recurseIntoAttrs rec { callPackage = newScope pkgs.pantheon; From f7e4be5011795dab79b1c0f6cb5d3eebaed16b8b Mon Sep 17 00:00:00 2001 From: "Luis G. Torres" Date: Mon, 23 Mar 2015 08:36:24 -0400 Subject: [PATCH 52/53] flann: make it build on Darwin (close #6946) --- pkgs/development/libraries/flann/default.nix | 7 +++++-- pkgs/development/libraries/flann/no-examples.patch | 10 ++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/libraries/flann/no-examples.patch diff --git a/pkgs/development/libraries/flann/default.nix b/pkgs/development/libraries/flann/default.nix index bffb124dc68..145d2b42a9d 100644 --- a/pkgs/development/libraries/flann/default.nix +++ b/pkgs/development/libraries/flann/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation { name = "flann-1.8.4"; - + src = fetchurl { url = http://people.cs.ubc.ca/~mariusm/uploads/FLANN/flann-1.8.4-src.zip; sha256 = "022w8hph7bli5zbpnk3z1qh1c2sl5hm8fw2ccim651ynn0hr7fyz"; @@ -10,11 +10,14 @@ stdenv.mkDerivation { buildInputs = [ unzip cmake python ]; + # patch out examples in Darwin because they do not compile. + patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-examples.patch ]; + meta = { homepage = http://people.cs.ubc.ca/~mariusm/flann/; license = stdenv.lib.licenses.bsd3; description = "Fast approximate nearest neighbor searches in high dimensional spaces"; maintainers = with stdenv.lib.maintainers; [viric]; - platforms = with stdenv.lib.platforms; linux; + platforms = with stdenv.lib.platforms; linux ++ darwin; }; } diff --git a/pkgs/development/libraries/flann/no-examples.patch b/pkgs/development/libraries/flann/no-examples.patch new file mode 100644 index 00000000000..95a6f0eed8e --- /dev/null +++ b/pkgs/development/libraries/flann/no-examples.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -155,7 +155,7 @@ + + add_subdirectory( cmake ) + add_subdirectory( src ) +-add_subdirectory( examples ) ++#add_subdirectory( examples ) + add_subdirectory( test ) + add_subdirectory( doc ) From 9a75c1d7c8ee19046ce67f2dc725821d2d5452fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 24 Mar 2015 21:06:19 +0100 Subject: [PATCH 53/53] lensfun: fix build by using older make --- pkgs/development/libraries/lensfun/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/lensfun/default.nix b/pkgs/development/libraries/lensfun/default.nix index 94dfe871240..ebb90f79663 100644 --- a/pkgs/development/libraries/lensfun/default.nix +++ b/pkgs/development/libraries/lensfun/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, python, glib, zlib, libpng }: +{ stdenv, fetchurl, pkgconfig, python, glib, zlib, libpng, gnumake3 }: stdenv.mkDerivation rec { name = "lensfun-0.2.8"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { patchPhase = "sed -e 's@/usr/bin/python@${python}/bin/python@' -i configure"; - buildInputs = [ pkgconfig glib zlib libpng ]; + buildInputs = [ pkgconfig glib zlib libpng gnumake3 ]; configureFlags = "-v"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e22a53d8e29..eb83bcc8996 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5037,6 +5037,7 @@ let gnumake380 = callPackage ../development/tools/build-managers/gnumake/3.80 { }; gnumake381 = callPackage ../development/tools/build-managers/gnumake/3.81 { }; gnumake382 = callPackage ../development/tools/build-managers/gnumake/3.82 { }; + gnumake3 = gnumake382; gnumake40 = callPackage ../development/tools/build-managers/gnumake/4.0 { }; gnumake41 = callPackage ../development/tools/build-managers/gnumake/4.1 { }; gnumake = gnumake41; @@ -6116,7 +6117,9 @@ let python = python2; }; - lensfun = callPackage ../development/libraries/lensfun { }; + lensfun = callPackage ../development/libraries/lensfun { + inherit gnumake3; + }; lesstif = callPackage ../development/libraries/lesstif { };