Merge pull request #54262 from smaximov/fix-rbnacl-6.0.0

gem-config: support rbnacl v6.0.0
This commit is contained in:
Jörg Thalheim 2019-01-18 08:37:09 +00:00 committed by GitHub
commit 08ee0d9d08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,13 +297,16 @@ in
buildInputs = [ rainbow_rake ];
};
rbnacl = spec: {
postInstall = ''
sed -i $(cat $out/nix-support/gem-meta/install-path)/lib/rbnacl.rb -e "2a \
RBNACL_LIBSODIUM_GEM_LIB_PATH = '${libsodium.out}/lib/libsodium${stdenv.hostPlatform.extensions.sharedLibrary}'
"
'';
};
rbnacl = spec:
if lib.versionOlder spec.version "6.0.0" then {
postInstall = ''
sed -i $(cat $out/nix-support/gem-meta/install-path)/lib/rbnacl.rb -e "2a \
RBNACL_LIBSODIUM_GEM_LIB_PATH = '${libsodium.out}/lib/libsodium${stdenv.hostPlatform.extensions.sharedLibrary}'
"
'';
} else {
buildInputs = [ libsodium ];
};
re2 = attrs: {
buildInputs = [ re2 ];