depot/third_party/nixpkgs/pkgs/development/lisp-modules/openssl-lib-marked.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

18 lines
590 B
Nix

with import ../../../default.nix {};
runCommand "openssl-lib-marked" {} ''
mkdir -p "$out/lib"
for lib in ssl crypto; do
version="${lib.getVersion openssl}"
ln -s "${lib.getLib openssl}/lib/lib$lib.so" "$out/lib/lib$lib.so.$version"
version="$(echo "$version" | sed -re 's/[a-z]+$//')"
while test -n "$version"; do
ln -sfT "${lib.getLib openssl}/lib/lib$lib.so" "$out/lib/lib$lib.so.$version"
nextversion="''${version%.*}"
if test "$version" = "$nextversion"; then
version=
else
version="$nextversion"
fi
done
done
''