Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #269856 from prusnak/rocksdb

rocksdb_6_23, rocksdb_7_10: fix build on newer compilers

authored by Pavol Rusnak and committed by GitHub 911ce27f 6f963568

+10 -6
+10 -6
pkgs/development/libraries/rocksdb/default.nix
··· 16 16 , sse42Support ? stdenv.hostPlatform.sse4_2Support 17 17 }: 18 18 19 - stdenv.mkDerivation rec { 19 + stdenv.mkDerivation (finalAttrs: { 20 20 pname = "rocksdb"; 21 21 version = "8.3.2"; 22 22 23 23 src = fetchFromGitHub { 24 24 owner = "facebook"; 25 - repo = pname; 26 - rev = "v${version}"; 25 + repo = finalAttrs.pname; 26 + rev = "v${finalAttrs.version}"; 27 27 hash = "sha256-mfIRQ8nkUbZ3Bugy3NAvOhcfzFY84J2kBUIUBcQ2/Qg="; 28 28 }; 29 29 ··· 48 48 ] ++ lib.optionals stdenv.cc.isClang [ 49 49 "-Wno-error=unused-private-field" 50 50 "-faligned-allocation" 51 + ] ++ lib.optionals (lib.versionOlder finalAttrs.version "8") [ 52 + "-Wno-error=unused-but-set-variable" 53 + ] ++ lib.optionals (lib.versionOlder finalAttrs.version "7") [ 54 + "-Wno-error=deprecated-copy" 51 55 ]); 52 56 53 57 cmakeFlags = [ ··· 77 81 mkdir -p $tools/bin 78 82 cp tools/{ldb,sst_dump}${stdenv.hostPlatform.extensions.executable} $tools/bin/ 79 83 '' + lib.optionalString stdenv.isDarwin '' 80 - ls -1 $tools/bin/* | xargs -I{} install_name_tool -change "@rpath/librocksdb.${lib.versions.major version}.dylib" $out/lib/librocksdb.dylib {} 84 + ls -1 $tools/bin/* | xargs -I{} install_name_tool -change "@rpath/librocksdb.${lib.versions.major finalAttrs.version}.dylib" $out/lib/librocksdb.dylib {} 81 85 '' + lib.optionalString (stdenv.isLinux && enableShared) '' 82 86 ls -1 $tools/bin/* | xargs -I{} patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib {} 83 87 ''; ··· 93 97 meta = with lib; { 94 98 homepage = "https://rocksdb.org"; 95 99 description = "A library that provides an embeddable, persistent key-value store for fast storage"; 96 - changelog = "https://github.com/facebook/rocksdb/raw/v${version}/HISTORY.md"; 100 + changelog = "https://github.com/facebook/rocksdb/raw/v${finalAttrs.version}/HISTORY.md"; 97 101 license = licenses.asl20; 98 102 platforms = platforms.all; 99 103 maintainers = with maintainers; [ adev magenbluten ]; 100 104 }; 101 - } 105 + })