diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-04-14 19:11:17 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-04-14 19:11:17 +0200 |
commit | 2090aa4f65e860567af03cb3b7aa042df7168ead (patch) | |
tree | bdf4623501830af0cbf68f2d22075f70b38157b5 /pkgs/tools | |
parent | eec35cb6bd82cb0eba69c55e83990f3b9f0107dc (diff) | |
parent | 4aec96b379d3f1b89128297b0943253d6961cf94 (diff) |
Merge: fixup a bad merge
For details see: https://github.com/NixOS/nixpkgs/commit/24444513fb5#commitcomment-21767916
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/filesystems/bonnie/bonnie-homebrew.patch | 81 | ||||
-rw-r--r-- | pkgs/tools/filesystems/bonnie/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/package-management/nix/default.nix | 43 |
3 files changed, 32 insertions, 94 deletions
diff --git a/pkgs/tools/filesystems/bonnie/bonnie-homebrew.patch b/pkgs/tools/filesystems/bonnie/bonnie-homebrew.patch deleted file mode 100644 index aba80e7938dde..0000000000000 --- a/pkgs/tools/filesystems/bonnie/bonnie-homebrew.patch +++ /dev/null @@ -1,81 +0,0 @@ -Derivied from a patch distributed with the Homebrew formula: -https://github.com/Homebrew/homebrew-core/blob/6ae11ea82c00dc8c11297ecc3f06bc33979862d8/Formula/bonnie++.rb - - -Copyright 2009-2016 Homebrew contributors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -# Changes included in this patchset: -# 3) Remove the #ifdef _LARGEFILE64_SOURCE macros which not only prohibits the intended functionality of -# splitting into 2 GB files for such filesystems but also incorrectly tests for it in the first place. -# The ideal fix would be to replace the AC_TRY_RUN() in configure.in if the fail code actually worked. -# Files affected: bonnie++.cp - -diff --git i/bonnie++.cpp w/bonnie++.cpp -index 8c5a43a..8a4b3dc 100644 ---- i/bonnie++.cpp -+++ w/bonnie++.cpp -@@ -294,11 +294,7 @@ int main(int argc, char *argv[]) - { - char *sbuf = _strdup(optarg); - char *size = strtok(sbuf, ":"); --#ifdef _LARGEFILE64_SOURCE - file_size = size_from_str(size, "gt"); --#else -- file_size = size_from_str(size, "g"); --#endif - size = strtok(NULL, ""); - if(size) - { -@@ -384,15 +380,6 @@ int main(int argc, char *argv[]) - if(file_size % 1024 > 512) - file_size = file_size + 1024 - (file_size % 1024); - } --#ifndef _LARGEFILE64_SOURCE -- if(file_size == 2048) -- file_size = 2047; -- if(file_size > 2048) -- { -- fprintf(stderr, "Large File Support not present, can't do %dM.\n", file_size); -- usage(); -- } --#endif - globals.byte_io_size = min(file_size, globals.byte_io_size); - globals.byte_io_size = max(0, globals.byte_io_size); - -@@ -465,14 +452,6 @@ int main(int argc, char *argv[]) - && (directory_max_size < directory_min_size || directory_max_size < 0 - || directory_min_size < 0) ) - usage(); --#ifndef _LARGEFILE64_SOURCE -- if(file_size > (1 << (31 - 20 + globals.io_chunk_bits)) ) -- { -- fprintf(stderr -- , "The small chunk size and large IO size make this test impossible in 32bit.\n"); -- usage(); -- } --#endif - if(file_size && globals.ram && (file_size * concurrency) < (globals.ram * 2) ) - { - fprintf(stderr diff --git a/pkgs/tools/filesystems/bonnie/default.nix b/pkgs/tools/filesystems/bonnie/default.nix index 65a722c740847..c120073866d44 100644 --- a/pkgs/tools/filesystems/bonnie/default.nix +++ b/pkgs/tools/filesystems/bonnie/default.nix @@ -7,8 +7,6 @@ stdenv.mkDerivation rec { sha256 = "0vkl42rsrsy95fc1ykc6g8rsdbnpxayvdaihnnkly1fww1m3hyz2"; }; - patches = stdenv.lib.optional stdenv.isDarwin ./bonnie-homebrew.patch; - enableParallelBuilding = true; meta = { diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 93463509b7912..629c9b685360f 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -16,7 +16,8 @@ let outputs = [ "out" "dev" "man" "doc" ]; nativeBuildInputs = - [ perl pkgconfig ] + [ pkgconfig ] + ++ lib.optionals (!lib.versionAtLeast version "1.12pre") [ perl ] ++ lib.optionals fromGit [ autoreconfHook autoconf-archive bison flex libxml2 libxslt docbook5 docbook5_xsl ]; buildInputs = [ curl openssl sqlite xz ] @@ -43,12 +44,12 @@ let [ "--with-store-dir=${storeDir}" "--localstatedir=${stateDir}" "--sysconfdir=/etc" - "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}" - "--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}" "--disable-init-state" "--enable-gc" ] - ++ lib.optional (!lib.versionAtLeast version "1.12pre") [ + ++ lib.optionals (!lib.versionAtLeast version "1.12pre") [ + "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}" + "--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}" "--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}" ]; @@ -97,13 +98,33 @@ let maintainers = [ stdenv.lib.maintainers.eelco ]; platforms = stdenv.lib.platforms.all; }; + + passthru = { inherit fromGit; }; + }; + + perl-bindings = { nix }: stdenv.mkDerivation { + name = "nix-perl-" + nix.version; + + inherit (nix) src; + + postUnpack = "sourceRoot=$sourceRoot/perl"; + + nativeBuildInputs = + [ perl pkgconfig curl nix libsodium ] + ++ lib.optionals nix.fromGit [ autoreconfHook autoconf-archive ]; + + configureFlags = + [ "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}" + "--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}" + "--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}" + ]; }; in rec { nix = nixStable; - nixStable = common rec { + nixStable = (common rec { name = "nix-1.11.8"; src = fetchurl { url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz"; @@ -117,18 +138,18 @@ in rec { --replace 'std::less<Symbol>, gc_allocator<Value *>' \ 'std::less<Symbol>, gc_allocator<std::pair<const Symbol, Value *> >' ''; - }; + }) // { perl-bindings = nixStable; }; - nixUnstable = lib.lowPrio (common rec { + nixUnstable = (lib.lowPrio (common rec { name = "nix-1.12${suffix}"; - suffix = "pre5122_c60715e"; + suffix = "pre5152_915f62fa"; src = fetchFromGitHub { owner = "NixOS"; repo = "nix"; - rev = "c60715e937e3773bbb8a114fc9b9c6577f8c5cb5"; - sha256 = "0hkc4g7i3z06y3rsdxqzdnx5rz77jb8ij1j13bdskbvpp7vfm60p"; + rev = "915f62fa19790d8f826aeb4dd3d2bb5bde2f67e9"; + sha256 = "0mf7y7hvzw2x5dp482qy8774djr3vzcjaqq58cp82zdil8l7kwjd"; }; fromGit = true; - }); + })) // { perl-bindings = perl-bindings { nix = nixUnstable; }; }; } |