Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2022-04-02 18:01:37 +00:00 committed by GitHub
commit ffa96ab0c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 751 additions and 341 deletions

View file

@ -877,7 +877,7 @@ in
copy_bin_and_libs ${pkgs.yubikey-personalization}/bin/ykinfo
copy_bin_and_libs ${pkgs.openssl.bin}/bin/openssl
cc -O3 -I${pkgs.openssl.dev}/include -L${pkgs.openssl.out}/lib ${./pbkdf2-sha512.c} -o pbkdf2-sha512 -lcrypto
cc -O3 -I${pkgs.openssl.dev}/include -L${lib.getLib pkgs.openssl}/lib ${./pbkdf2-sha512.c} -o pbkdf2-sha512 -lcrypto
strip -s pbkdf2-sha512
copy_bin_and_libs pbkdf2-sha512

View file

@ -6,11 +6,11 @@
stdenv.mkDerivation rec {
pname = "bitwig-studio";
version = "4.2";
version = "4.2.1";
src = fetchurl {
url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb";
sha256 = "sha256-hIIEVj5sM/NdhBiwerFvyIXqj0R8EvcxwM6UZ0CE428=";
sha256 = "sha256-kkpb8tLuj4QO+TBW2yNDugS4c6dCQ9Lddv6Z8NS0uio=";
};
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];

View file

@ -126,8 +126,8 @@ stdenv.mkDerivation {
# Work around Spotify referring to a specific minor version of
# OpenSSL.
ln -s ${openssl.out}/lib/libssl.so $libdir/libssl.so.1.0.0
ln -s ${openssl.out}/lib/libcrypto.so $libdir/libcrypto.so.1.0.0
ln -s ${lib.getLib openssl}/lib/libssl.so $libdir/libssl.so.1.0.0
ln -s ${lib.getLib openssl}/lib/libcrypto.so $libdir/libcrypto.so.1.0.0
ln -s ${nspr.out}/lib/libnspr4.so $libdir/libnspr4.so
ln -s ${nspr.out}/lib/libplc4.so $libdir/libplc4.so

View file

@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec {
# Needed to get openssl-sys to use pkg-config.
OPENSSL_NO_VENDOR = 1;
OPENSSL_LIB_DIR = "${openssl.out}/lib";
OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib";
OPENSSL_DIR="${lib.getDev openssl}";
LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib";

View file

@ -37,7 +37,7 @@ rustPlatform.buildRustPackage rec {
# checkInputs = lib.optionals stdenv.isDarwin [ pkg-config rustfmt ];
# Needed to get openssl-sys to use pkg-config.
# OPENSSL_NO_VENDOR = 1;
# OPENSSL_LIB_DIR = "${openssl.out}/lib";
# OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib";
# OPENSSL_DIR="${lib.getDev openssl}";
# LLVM_CONFIG_PATH="${llvm}/bin/llvm-config";
# LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib";

View file

@ -57,7 +57,7 @@ in
$out/kodestudio
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ".:${stdenv.cc.libc}/lib:${xorg.libXinerama}/lib:${xorg.libX11}/lib:${alsa-lib}/lib:${libGL}/lib:${libGLU}/lib:${openssl.out}/lib" \
--set-rpath ".:${stdenv.cc.libc}/lib:${xorg.libXinerama}/lib:${xorg.libX11}/lib:${alsa-lib}/lib:${libGL}/lib:${libGLU}/lib:${lib.getLib openssl}/lib" \
$out/resources/app/extensions/krom/Krom/linux/Krom
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \

View file

@ -101,7 +101,7 @@ in let
"''${gappsWrapperArgs[@]}"
# Without this, plugin_host crashes, even though it has the rpath
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl.out}/lib/libssl.so:${bzip2.out}/lib/libbz2.so
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${lib.getLib openssl}/lib/libssl.so:${bzip2.out}/lib/libbz2.so
'';
};
in stdenv.mkDerivation (rec {

View file

@ -107,7 +107,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
patchelf_add_icu_as_needed "$elf"
patchelf --add-needed "libssl.so" "$elf"
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc openssl.out icu.out ]}:\$ORIGIN" \
--set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc openssl icu.out ]}:\$ORIGIN" \
"$elf"
}

View file

@ -0,0 +1,57 @@
{ stdenv
, lib
, fetchurl
, autoPatchelfHook
, wrapGAppsHook
, dbus
, libGL
, libX11
, libXcursor
, libXi
, libXrandr
, udev
, unzip
}:
stdenv.mkDerivation rec {
pname = "cryptowatch-desktop";
version = "0.5.0";
src = fetchurl {
url = "https://cryptowat.ch/desktop/download/linux/${version}";
sha256 = "0lr5fsd0f44b1v9f2dvx0a0lmz9dyivyz5d98qx2gcv3jkngw34v";
};
unpackPhase = "unzip $src";
nativeBuildInputs = [
autoPatchelfHook
wrapGAppsHook
unzip
];
buildInputs = [
dbus
udev
];
sourceRoot = ".";
installPhase = ''
install -m755 -D cryptowatch_desktop $out/bin/cryptowatch_desktop
'';
preFixup = ''
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL libX11 libXcursor libXrandr libXi ]}"
)
'';
meta = with lib; {
homepage = "https://cryptowat.ch";
description = "Application for visualising real-time cryptocurrency market data";
platforms = platforms.linux;
license = licenses.unfree;
maintainers = with maintainers; [ livnev ];
};
}

View file

@ -31,6 +31,8 @@
, zip
, zlib
, withGTK3 ? true, gtk3, gtk2
, testVersion
, palemoon
}:
# Only specific GCC versions are supported with branding
@ -44,12 +46,12 @@ assert with lib.strings; (
stdenv.mkDerivation rec {
pname = "palemoon";
version = "29.4.5";
version = "29.4.5.1";
src = fetchzip {
name = "${pname}-${version}";
url = "http://archive.palemoon.org/source/${pname}-${version}.source.tar.xz";
sha256 = "sha256-ls4uhfFaiFHkmAVbwwBenm71sNm6Tql2tMpzk9D2b5Y=";
sha256 = "sha256-IC7E88dECAz2diVLEEdjMltpNMBhPTlPvbz05BniBMI=";
};
nativeBuildInputs = [
@ -194,18 +196,23 @@ stdenv.mkDerivation rec {
platforms = [ "i686-linux" "x86_64-linux" ];
};
passthru.updateScript = writeScript "update-${pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts curl libxml2
passthru = {
updateScript = writeScript "update-${pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts curl libxml2
set -eu -o pipefail
set -eu -o pipefail
# Only release note announcement == finalized release
version="$(
curl -s 'http://www.palemoon.org/releasenotes.shtml' |
xmllint --html --xpath 'html/body/table/tbody/tr/td/h3/text()' - 2>/dev/null | head -n1 |
sed 's/v\(\S*\).*/\1/'
)"
update-source-version ${pname} "$version"
'';
# Only release note announcement == finalized release
version="$(
curl -s 'http://www.palemoon.org/releasenotes.shtml' |
xmllint --html --xpath 'html/body/table/tbody/tr/td/h3/text()' - 2>/dev/null | head -n1 |
sed 's/v\(\S*\).*/\1/'
)"
update-source-version ${pname} "$version"
'';
tests.version = testVersion {
package = palemoon;
};
};
}

View file

@ -19,13 +19,13 @@ let
in
buildGoModule rec {
pname = "argo";
version = "3.3.0";
version = "3.3.1";
src = fetchFromGitHub {
owner = "argoproj";
repo = "argo";
rev = "v${version}";
sha256 = "sha256-BDHbbb3WqQvRJB1A4NInfvujjB3r/AMmVvos8i/CnyU=";
sha256 = "sha256-IcKueb/bxPNwJ9bZWwmz4ywCtZGk0PSuH3KYDMp6Qd4=";
};
vendorSha256 = "sha256-YeSeaYOkNRjQgxsK9G7iPbVpfrPs4HRRFwfoUDxoCm0=";

View file

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "fluxctl";
version = "1.24.3";
version = "1.25.0";
src = fetchFromGitHub {
owner = "weaveworks";
repo = "flux";
rev = version;
sha256 = "sha256-i86WwSR14hxaXWMesvG2mG8nqXd97M3TekK2FLTLL+Y=";
sha256 = "sha256-EFB8iAs7e4FigYnTvkh+dpZq6ymX7Qfy0cUDtUaPdmM=";
};
vendorSha256 = "sha256-Fw3/SMO66eExlDNcIaHM+G2kB4zb1Cih7kp8xfel/iY=";
vendorSha256 = "sha256-9RyTeGjp7mEpmWnQeK2uG1krO6+1sK6fsID6JVrejHw=";
nativeBuildInputs = [ installShellFiles ];

View file

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "helmfile";
version = "0.143.3";
version = "0.143.5";
src = fetchFromGitHub {
owner = "roboll";
repo = "helmfile";
rev = "v${version}";
sha256 = "sha256-A0xpXsMWUaJYTzo9O4KkdyjonSGZ+FylTK140pqnJX8=";
sha256 = "sha256-48DbN3O5HVlNpHct6uKw9CjeaDlAZqY+/Tqd4a9mmUw=";
};
vendorSha256 = "sha256-qolmWat7An4HFm4O5vSCYZe+w79nsRIrnBLJacUCeA4=";
vendorSha256 = "sha256-ddf3m0DGsjubzp/aERvhfJ51UKKSNMC1Xu7ybyif8HA=";
doCheck = false;

View file

@ -14,7 +14,7 @@
with lib;
let
spark = { pname, version, sha256 }:
spark = { pname, version, sha256, extraMeta ? {} }:
stdenv.mkDerivation rec {
inherit pname version;
src = fetchzip {
@ -63,7 +63,7 @@ let
license = lib.licenses.asl20;
platforms = lib.platforms.all;
maintainers = with maintainers; [ thoughtpolice offline kamilchm illustris ];
};
} // extraMeta;
};
in
{
@ -74,12 +74,13 @@ in
};
spark_3_1 = spark rec {
pname = "spark";
version = "3.1.2";
sha256 = "1bgh2y6jm7wqy6yc40rx68xkki31i3jiri2yixb1bm0i9pvsj9yf";
version = "3.1.3";
sha256 = "sha256-RIQyN5YjxFLfNIrETR3Vv99zsHxt77rhOXHIThCI2Y8=";
};
spark_2_4 = spark rec {
pname = "spark";
version = "2.4.8";
sha256 = "1mkyq0gz9fiav25vr0dba5ivp0wh0mh7kswwnx8pvsmb6wbwyfxv";
extraMeta.knownVulnerabilities = [ "CVE-2021-38296" ];
};
}

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "vcluster";
version = "0.6.0";
version = "0.7.0";
src = fetchFromGitHub {
owner = "loft-sh";
repo = pname;
rev = "v${version}";
sha256 = "sha256-kY12bsZyDb36KE2dWx6RVYlKTbJh+XFQcBpFXoCLgEM=";
sha256 = "sha256-Yf2ZLhB6yfXySvPajI9mvdcYQPPpKI+LZ6+PMvOS4qo=";
};
vendorSha256 = null;

View file

@ -5,12 +5,12 @@
let
pname = "zulip";
version = "5.8.1";
version = "5.9.0";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/zulip/zulip-desktop/releases/download/v${version}/Zulip-${version}-x86_64.AppImage";
sha256 = "02m18y5j6jmmlygv8ycwaaq6n7mvj97ljhd3l9pvii0adwcvrpfz";
hash = "sha256-qiGkZuGJsKuquMuAcO+9wbU4KW++uyOb4TKb9lCgZmI=";
name="${pname}-${version}.AppImage";
};

View file

@ -2,7 +2,7 @@
buildGoModule rec {
pname = "ipfs";
version = "0.12.0"; # When updating, also check if the repo version changed and adjust repoVersion below
version = "0.12.1"; # When updating, also check if the repo version changed and adjust repoVersion below
rev = "v${version}";
repoVersion = "12"; # Also update ipfs-migrator when changing the repo version
@ -10,7 +10,7 @@ buildGoModule rec {
# go-ipfs makes changes to it's source tarball that don't match the git source.
src = fetchurl {
url = "https://github.com/ipfs/go-ipfs/releases/download/${rev}/go-ipfs-source.tar.gz";
sha256 = "jWoMm/xIp3Zn/FiHWQ5/q39i6Lh4Fdoi9OdnRVc51Xk=";
sha256 = "sha256-fUExCvE6x5VFBl66y52DGvr8ZNSXZ6MYpVQP/D7X328=";
};
# tarball contains multiple files/directories

View file

@ -52,7 +52,7 @@
-fi
-unset cf_openssl_basedir
+SSL_INCLUDES="-I@openssl.dev@/include"
+SSL_LIBS="-L@openssl.out@/lib"
+SSL_LIBS="-L@openssl-lib@/lib"
save_CXX="$CXX"
CXX="$CXX $SSL_INCLUDES"

View file

@ -12,9 +12,9 @@ stdenv.mkDerivation rec {
patches = [ ./configure.patch ./dlopen.patch ];
postPatch = ''
substituteInPlace configure --subst-var-by openssl.dev ${openssl.dev} \
--subst-var-by openssl.out ${openssl.out}
substituteInPlace src/libssl.cc --subst-var-by openssl ${openssl.out}
substituteInPlace src/libcrypto.cc --subst-var-by openssl ${openssl.out}
--subst-var-by openssl-lib ${lib.getLib openssl}
substituteInPlace src/libssl.cc --subst-var-by openssl ${lib.getLib openssl}
substituteInPlace src/libcrypto.cc --subst-var-by openssl ${lib.getLib openssl}
'';
installPhase = ''
mkdir -p $out/bin

View file

@ -75,7 +75,7 @@ stdenv.mkDerivation rec {
--replace dirname ${coreutils}/bin/dirname
ln -s $out/share/mailspring/mailspring $out/bin/mailspring
ln -s ${openssl.out}/lib/libcrypto.so $out/lib/libcrypto.so.1.0.0
ln -s ${lib.getLib openssl}/lib/libcrypto.so $out/lib/libcrypto.so.1.0.0
runHook postInstall
'';

View file

@ -14,7 +14,7 @@ let
openssl' = symlinkJoin {
name = "openssl-backwards-compat";
nativeBuildInputs = [ makeWrapper ];
paths = [ openssl.out ];
paths = [ (lib.getLib openssl) ];
postBuild = ''
ln -sf $out/lib/libcrypto.so $out/lib/libcrypto.so.1.0.0
ln -sf $out/lib/libssl.so $out/lib/libssl.so.1.0.0

View file

@ -92,7 +92,7 @@ let
--replace "${expat.dev}/lib" "${expat.out}/lib" \
--replace "${zlib.dev}/lib" "${zlib.out}/lib" \
--replace "${sqlite.dev}/lib" "${sqlite.out}/lib" \
--replace "${openssl.dev}/lib" "${openssl.out}/lib"
--replace "${openssl.dev}/lib" "${lib.getLib openssl}/lib"
done
'';

View file

@ -16,6 +16,7 @@
, xkeyboard_config
, glib
, libarchive
, python
}:
let

View file

@ -88,6 +88,11 @@ stdenv.mkDerivation rec {
patches = [
./fix-qemu-ga.patch
# MTP Devices were broken in QEMU 6.1.0, this patch fixes that.
(fetchpatch {
url = "https://gitlab.com/qemu-project/qemu/-/commit/9d30c78c7d3b994825cbe63fa277279ae3ef4248.patch";
sha256 = "sha256-AChB9HMEShrM+2UW2aOT9+MqlAm568sG3HxHK3nDC/M=";
})
# Cocoa clipboard support only works on macOS 10.14+
(fetchpatch {
url = "https://gitlab.com/qemu-project/qemu/-/commit/7e3e20d89129614f4a7b2451fe321cc6ccca3b76.diff";

View file

@ -86,8 +86,8 @@ gccStdenv.mkDerivation rec {
# OS-specific paths are hardcoded in ./configure
substituteInPlace config.status \
--replace "/usr/local/opt/openssl@1.1" "${openssl.out}" \
--replace "/usr/local/opt/openssl" "${openssl.out}"
--replace "/usr/local/opt/openssl@1.1" "${lib.getLib openssl}" \
--replace "/usr/local/opt/openssl" "${lib.getLib openssl}"
./config.status
'';

View file

@ -1,17 +1,60 @@
{ lib, callPackage, Foundation }:
{ callPackage, Foundation }:
/*
Add new graal versions and products here and then see update.nix on how to
generate the sources.
*/
let
mkGraal = opts: callPackage (import ./mkGraal.nix opts) {
inherit Foundation;
};
/*
Looks a bit ugly but makes version update in the update script using sed
much easier
*/
graalvm11-ce-release-version = "22.0.0.2";
graalvm17-ce-release-version = "22.0.0.2";
graalvm11-ce-dev-version = "22.2.0-dev-20220401_1942";
graalvm17-ce-dev-version = "22.2.0-dev-20220401_1942";
commonProducts = [
"graalvm-ce"
"native-image-installable-svm"
"ruby-installable-svm"
"wasm-installable-svm"
];
in
{
inherit mkGraal;
graalvm11-ce = mkGraal rec {
version = "22.0.0.2";
config = {
x86_64-darwin = {
arch = "darwin-amd64";
products = commonProducts ++ [ "python-installable-svm" ];
};
x86_64-linux = {
arch = "linux-amd64";
products = commonProducts ++ [ "python-installable-svm" ];
};
aarch64-darwin = {
arch = "darwin-aarch64";
products = [
"graalvm-ce"
"native-image-installable-svm"
];
version = graalvm11-ce-dev-version;
};
aarch64-linux = {
arch = "linux-aarch64";
products = commonProducts;
};
};
defaultVersion = graalvm11-ce-release-version;
javaVersion = "11";
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
platforms = builtins.attrNames config;
};
# TODO: fix aarch64-linux, failing during Native Image compilation
@ -20,8 +63,26 @@ in
# directory"/tmp/SVM-4194439592488143713"): error=0, Failed to exec spawn
# helper: pid: 19865, exit value: 1"
graalvm17-ce = mkGraal rec {
version = "22.0.0.2";
config = {
x86_64-darwin = {
arch = "darwin-amd64";
products = commonProducts ++ [ "python-installable-svm" ];
};
x86_64-linux = {
arch = "linux-amd64";
products = commonProducts ++ [ "python-installable-svm" ];
};
aarch64-darwin = {
arch = "darwin-aarch64";
products = [
"graalvm-ce"
"native-image-installable-svm"
];
version = graalvm17-ce-dev-version;
};
};
defaultVersion = graalvm17-ce-release-version;
javaVersion = "17";
platforms = [ "x86_64-linux" "x86_64-darwin" ];
platforms = builtins.attrNames config;
};
}

View file

@ -0,0 +1,74 @@
{
"darwin-aarch64": {
"graalvm-ce|java11|22.2.0-dev-20220401_1942": {
"sha256": "c83dee740ae148486598759e44a717b09d8124e4ea50f9da1e7d49d016572b89",
"url": "https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/22.2.0-dev-20220401_1942/graalvm-ce-java11-darwin-aarch64-dev.tar.gz"
},
"native-image-installable-svm|java11|22.2.0-dev-20220401_1942": {
"sha256": "661311ae26bfd6c46360b9e65aabe9361dc5cd05878a404343adf16925ae78fa",
"url": "https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/22.2.0-dev-20220401_1942/native-image-installable-svm-java11-darwin-aarch64-dev.jar"
}
},
"darwin-amd64": {
"graalvm-ce|java11|22.0.0.2": {
"sha256": "8280159b8a66c51a839c8079d885928a7f759d5da0632f3af7300df2b63a6323",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/graalvm-ce-java11-darwin-amd64-22.0.0.2.tar.gz"
},
"native-image-installable-svm|java11|22.0.0.2": {
"sha256": "03c27de6cce61ee8073e89252212457f3fbac2c0bc9bfa4acbff12176476c176",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/native-image-installable-svm-java11-darwin-amd64-22.0.0.2.jar"
},
"python-installable-svm|java11|22.0.0.2": {
"sha256": "67ee2f1cc10b0189e359344c31b22f423e636ff4ec2dd7d9437c3eb0ef54e601",
"url": "https://github.com/graalvm/graalpython/releases/download/vm-22.0.0.2/python-installable-svm-java11-darwin-amd64-22.0.0.2.jar"
},
"ruby-installable-svm|java11|22.0.0.2": {
"sha256": "a25c0099a21ca1ca9904dd3acdeef509f67a13b96c6135b6de199e9805330df9",
"url": "https://github.com/oracle/truffleruby/releases/download/vm-22.0.0.2/ruby-installable-svm-java11-darwin-amd64-22.0.0.2.jar"
},
"wasm-installable-svm|java11|22.0.0.2": {
"sha256": "d74c210a8a87b8eb0c4d18a65fde6f2c03ebc94d9bf7ed87bbb9cacc460006d7",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/wasm-installable-svm-java11-darwin-amd64-22.0.0.2.jar"
}
},
"linux-aarch64": {
"graalvm-ce|java11|22.0.0.2": {
"sha256": "1cc0263d95f642dada4e290dca7f49c0456cefa7b690b67e3e5c159b537b2c58",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/graalvm-ce-java11-linux-aarch64-22.0.0.2.tar.gz"
},
"native-image-installable-svm|java11|22.0.0.2": {
"sha256": "51d41e890a5aabf8e7b9d4f4e0f88206ee70a261f7dbb0315d51770ab8f3009e",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/native-image-installable-svm-java11-linux-aarch64-22.0.0.2.jar"
},
"ruby-installable-svm|java11|22.0.0.2": {
"sha256": "e0fb582a9c6b4167e7dc267c58ca1968bd1c471b3bc5c56061b436f175486d80",
"url": "https://github.com/oracle/truffleruby/releases/download/vm-22.0.0.2/ruby-installable-svm-java11-linux-aarch64-22.0.0.2.jar"
},
"wasm-installable-svm|java11|22.0.0.2": {
"sha256": "a48470ae391c75cb2805b7fe27cde2c925c0466fdbc0623dfbb67c54f19dbf8c",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/wasm-installable-svm-java11-linux-aarch64-22.0.0.2.jar"
}
},
"linux-amd64": {
"graalvm-ce|java11|22.0.0.2": {
"sha256": "bc86083bb7e2778c7e4fe4f55d74790e42255b96f7806a7fefa51d06f3bc7103",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/graalvm-ce-java11-linux-amd64-22.0.0.2.tar.gz"
},
"native-image-installable-svm|java11|22.0.0.2": {
"sha256": "8504a3441f5b28b8fd625f676674a9216f082ae63a4e30d43930c80f9672e71d",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/native-image-installable-svm-java11-linux-amd64-22.0.0.2.jar"
},
"python-installable-svm|java11|22.0.0.2": {
"sha256": "2f01d1bbc2ed2c507952d8ceaab1cb2176fc67e2d8c4b3bf5864e8d930c60c55",
"url": "https://github.com/graalvm/graalpython/releases/download/vm-22.0.0.2/python-installable-svm-java11-linux-amd64-22.0.0.2.jar"
},
"ruby-installable-svm|java11|22.0.0.2": {
"sha256": "e90f7ebc13b6c1f8e3f98881bb4fe2336870744174b2b6d41dc672d15f0b9a40",
"url": "https://github.com/oracle/truffleruby/releases/download/vm-22.0.0.2/ruby-installable-svm-java11-linux-amd64-22.0.0.2.jar"
},
"wasm-installable-svm|java11|22.0.0.2": {
"sha256": "c0fdfc40374b70f6f1597dd21660535c813dc5c3948c8a6ea9559a20f4d3fb5e",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/wasm-installable-svm-java11-linux-amd64-22.0.0.2.jar"
}
}
}

View file

@ -0,0 +1,56 @@
{
"darwin-aarch64": {
"graalvm-ce|java17|22.2.0-dev-20220401_1942": {
"sha256": "f0409c59adbce62da7be46ab7d0e01abe5c080ef97d0b555e6c773f94dbfdecf",
"url": "https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/22.2.0-dev-20220401_1942/graalvm-ce-java17-darwin-aarch64-dev.tar.gz"
},
"native-image-installable-svm|java17|22.2.0-dev-20220401_1942": {
"sha256": "3770dc4810d7ebae8f9ca2212e91112629096a964d3caea1667b0aaf5f70c1e0",
"url": "https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/22.2.0-dev-20220401_1942/native-image-installable-svm-java17-darwin-aarch64-dev.jar"
}
},
"darwin-amd64": {
"graalvm-ce|java17|22.0.0.2": {
"sha256": "d54af9d1f4d0d351827395a714ed84d2489b023b74a9c13a431cc9d31d1e8f9a",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/graalvm-ce-java17-darwin-amd64-22.0.0.2.tar.gz"
},
"native-image-installable-svm|java17|22.0.0.2": {
"sha256": "007fa742cd139d447f83d776b6d78e717c9df11d56a61061a5937547c20028b7",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/native-image-installable-svm-java17-darwin-amd64-22.0.0.2.jar"
},
"python-installable-svm|java17|22.0.0.2": {
"sha256": "af887b0304d5ec98fab1be2cd1fca2aa3b10e84e823142a7f274560b1e0ea7c1",
"url": "https://github.com/graalvm/graalpython/releases/download/vm-22.0.0.2/python-installable-svm-java17-darwin-amd64-22.0.0.2.jar"
},
"ruby-installable-svm|java17|22.0.0.2": {
"sha256": "fc5eb6f833136ae3fda61f46fe0af66a8454ca2f803ca35eaff7336521cb468d",
"url": "https://github.com/oracle/truffleruby/releases/download/vm-22.0.0.2/ruby-installable-svm-java17-darwin-amd64-22.0.0.2.jar"
},
"wasm-installable-svm|java17|22.0.0.2": {
"sha256": "b76e6d872ce07ca9facd5b997dbb6e557ba72aa369ddd5f1664431bd11b98796",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/wasm-installable-svm-java17-darwin-amd64-22.0.0.2.jar"
}
},
"linux-amd64": {
"graalvm-ce|java17|22.0.0.2": {
"sha256": "4f743e0ed3d974b7d619ca2ed6014554e8c12e5ebbb38b9bc9e820b182169bd4",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/graalvm-ce-java17-linux-amd64-22.0.0.2.tar.gz"
},
"native-image-installable-svm|java17|22.0.0.2": {
"sha256": "8c25f650d58c2649c97061cb806dfaec9e685d5d2b80afc7cf72fe61d6891831",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/native-image-installable-svm-java17-linux-amd64-22.0.0.2.jar"
},
"python-installable-svm|java17|22.0.0.2": {
"sha256": "b3b78a15bd29b4eaaf0f2607e21181ca2a5b41b38ba43a3ff2656c2f6effda8a",
"url": "https://github.com/graalvm/graalpython/releases/download/vm-22.0.0.2/python-installable-svm-java17-linux-amd64-22.0.0.2.jar"
},
"ruby-installable-svm|java17|22.0.0.2": {
"sha256": "d86c9ad50cbed980fa69d69b2eccd47d31880d8c55553483f59ce9eda15628bd",
"url": "https://github.com/oracle/truffleruby/releases/download/vm-22.0.0.2/ruby-installable-svm-java17-linux-amd64-22.0.0.2.jar"
},
"wasm-installable-svm|java17|22.0.0.2": {
"sha256": "7f7e51e4a24384b3dd960c12ab9b05b1fea58a0457d6b80e3797228fab93c0bd",
"url": "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/wasm-installable-svm-java17-linux-amd64-22.0.0.2.jar"
}
}
}

View file

@ -1,57 +0,0 @@
# Generated by ./update.sh script
{ javaVersionPlatform, ... }:
[
{
sha256 = {
"11-linux-aarch64" = "0n1cgd9rn5aw7rzbd45nlzpnqif095zwl3999vddlhpnjlyjdh0w";
"17-linux-aarch64" = "1iw27igiyzzl43yfgid1h6h7hd0xnv0rfdkp4r7r8i51sa3q7my7";
"11-linux-amd64" = "00vipkrhc7d5xxznm07pjrdjahhfg5s5vxg49xz8qxz2nwxhi1mw";
"17-linux-amd64" = "1m4v2s1b2878r6dqpcxvbqpc3s2l8l0xcbna37bbfx6rsc73wx2g";
"11-darwin-amd64" = "08v37avg439hywx2yqx0bnfpazwaja2xhyc0kj1imib6iadib042";
"17-darwin-amd64" = "16lg3qfx7j8w8cxc3abl7c19nj6jhkni99wmff153lyhyk8zjjnm";
}.${javaVersionPlatform} or null;
url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/graalvm-ce-java${javaVersionPlatform}-22.0.0.2.tar.gz";
}
{
sha256 = {
"11-linux-aarch64" = "17h0yfw0lxsiblqv1nzpc6i71vh6hbwf1x6lp7kziass1a4ixm2i";
"17-linux-aarch64" = "1nvm04smzbis1jy9znac2a4yf9ajqvvmadcf5ffr521rm784g2br";
"11-linux-amd64" = "07g7fab0zj1h77a30kiswqm0hvr1m5s6crszcbyvha2v3x2a6145";
"17-linux-amd64" = "0c8qi7b63zkjrz3sz01bbmfni7pcz9nq1jv1f34lj9lcsm8gc9cc";
"11-darwin-amd64" = "0xn1frj1f4pzrd5gm6xwq31blgvz8l9249c97q3yh7p6rkk7vhh3";
"17-darwin-amd64" = "1dr80314fxcklmhi19jn3pqrsz3iivbvcxnphdzl978krm1afzq0";
}.${javaVersionPlatform} or null;
url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/native-image-installable-svm-java${javaVersionPlatform}-22.0.0.2.jar";
}
{
sha256 = {
"11-linux-aarch64" = "103d91sz2dmlc5hcbi9v3d3irgb83755hz16vkknfhbbkhm5iyz0";
"17-linux-aarch64" = "0vas98knpvpajmv8bkgcf0fh7n5fy361nd47002cpppg6hrp7k9q";
"11-linux-amd64" = "0h4s1dgx2wn63pabdckl85s70s1kw97vp0c8z7izihdn2fy7w3z9";
"17-linux-amd64" = "1g98ashyvscwyn1k8mamih6qhcbxsk62x6ynd7x81ndy1karlv6q";
"11-darwin-amd64" = "1y8d6c2ri7hrvsv3aqbcp49pmxh9yppcsfnx0jcwm88wlach0p52";
"17-darwin-amd64" = "13a6rchnaczpmxga6g405z55913ayq5gwihzlvyy6shk6gwbcppw";
}.${javaVersionPlatform} or null;
url = "https://github.com/oracle/truffleruby/releases/download/vm-22.0.0.2/ruby-installable-svm-java${javaVersionPlatform}-22.0.0.2.jar";
}
{
sha256 = {
"11-linux-aarch64" = "135zkpqm8z5nzcyn5h6vdx3c09f9wb6jgzmp0llcnx8w76p71154";
"17-linux-aarch64" = "0pij3kh70lxrzmbzx8zw97f9nb0rr492l7x3n13wcr859cr8akas";
"11-linux-amd64" = "0ppvsgs216jmm5p8m34lqg2kv0awadh1dlkxb7qzcw2b6x0grzf0";
"17-linux-amd64" = "1gf0jfmqy8lp6w7bimjp0j5abzmi0ndsn4hcjvfv7123lbj52zkz";
"11-darwin-amd64" = "1mq6013crjmrpf3yvxwv9p4yn0rcdzg5z9hq9l6fpf47i8522k6p";
"17-darwin-amd64" = "15l7p48vsca4cvqxbpb9lcmafysmdsxpv6avrpxajz705j3nsvmp";
}.${javaVersionPlatform} or null;
url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/wasm-installable-svm-java${javaVersionPlatform}-22.0.0.2.jar";
}
{
sha256 = {
"11-linux-amd64" = "0m8cqqqdks34b2zv7i6qw9kzqxi1rfqsmknqa9wm0b7dqaxx209g";
"17-linux-amd64" = "12nszxp2yv35y8zkm94bnd0mnanah48y41r61ypymd19plaqmdxk";
"11-darwin-amd64" = "00g6akpv0gkw8gcxfbgcyipn6gj25yr32k1lb7iqj08bq4f2zvk7";
"17-darwin-amd64" = "1hd71qg0nmklyakl4cc29vl10fxalbyd2b5yn7x9iv6m0h1pp25g";
}.${javaVersionPlatform} or null;
url = "https://github.com/graalvm/graalpython/releases/download/vm-22.0.0.2/python-installable-svm-java${javaVersionPlatform}-22.0.0.2.jar";
}
]

View file

@ -1,7 +1,7 @@
{ version
, javaVersion
{ javaVersion
, defaultVersion
, platforms
, hashes ? import ./hashes.nix
, config
, useMusl ? false
}:
@ -33,16 +33,19 @@
, cairo
, glib
, gtk3
, writeShellScript
, jq
, gnused
}:
assert useMusl -> stdenv.isLinux;
let
platform = {
aarch64-linux = "linux-aarch64";
x86_64-linux = "linux-amd64";
x86_64-darwin = "darwin-amd64";
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
platform = config.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
version = platform.version or defaultVersion;
name = "graalvm${javaVersion}-ce";
sourcesFilename = "${name}-sources.json";
sources = builtins.fromJSON (builtins.readFile (./. + "/${sourcesFilename}"));
runtimeLibraryPath = lib.makeLibraryPath
([ cups ] ++ lib.optionals gtkSupport [ cairo glib gtk3 ]);
@ -56,21 +59,11 @@ let
(writeShellScriptBin "${stdenv.system}-musl-gcc" ''${lib.getDev musl}/bin/musl-gcc "$@"'')
]);
javaVersionPlatform = "${javaVersion}-${platform}";
graalvmXXX-ce = stdenv.mkDerivation rec {
inherit version;
name = "graalvm${javaVersion}-ce";
srcs =
let
# Some platforms doesn't have all GraalVM features
# e.g.: GraalPython on aarch64-linux
# When the platform doesn't have a feature, sha256 is null on hashes.nix
# To update hashes.nix file, run `./update.sh <graalvm-ce-version>`
maybeFetchUrl = url: if url.sha256 != null then (fetchurl url) else null;
in
(lib.remove null
(map maybeFetchUrl (hashes { inherit javaVersionPlatform; })));
pname = name;
srcs = map fetchurl (builtins.attrValues sources.${platform.arch});
buildInputs = lib.optionals stdenv.isLinux [
alsa-lib # libasound.so wanted by lib/libjsound.so
@ -140,65 +133,40 @@ let
outputs = [ "out" "lib" ];
installPhase =
let
copyClibrariesToOut = basepath: ''
# provide libraries needed for static compilation
${
if useMusl then
"for f in ${musl.stdenv.cc.cc}/lib/* ${musl}/lib/* ${zlib.static}/lib/*; do"
else
"for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do"
}
ln -s $f ${basepath}/${platform}/$(basename $f)
done
'';
copyClibrariesToLib = ''
# add those libraries to $lib output too, so we can use them with
# `native-image -H:CLibraryPath=''${lib.getLib graalvm11-ce}/lib ...` and reduce
# closure size by not depending on GraalVM $out (that is much bigger)
mkdir -p $lib/lib
for f in ${glibc}/lib/*; do
ln -s $f $lib/lib/$(basename $f)
done
'';
in
{
"11-linux-amd64" = ''
${copyClibrariesToOut "$out/lib/svm/clibraries"}
installPhase = ''
# ensure that $lib/lib exists to avoid breaking builds
mkdir -p $lib/lib
# jni.h expects jni_md.h to be in the header search path.
ln -s $out/include/linux/*_md.h $out/include/
${copyClibrariesToLib}
'';
"17-linux-amd64" = ''
${copyClibrariesToOut "$out/lib/svm/clibraries"}
# copy-paste openjdk's preFixup
# Set JAVA_HOME automatically.
mkdir -p $out/nix-support
cat > $out/nix-support/setup-hook << EOF
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
EOF
${
lib.optionalString (stdenv.isLinux) ''
# provide libraries needed for static compilation
${
if useMusl then
"for f in ${musl.stdenv.cc.cc}/lib/* ${musl}/lib/* ${zlib.static}/lib/*; do"
else
"for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do"
}
ln -s $f $out/lib/svm/clibraries/${platform.arch}/$(basename $f)
done
${copyClibrariesToLib}
'';
"11-linux-aarch64" = ''
${copyClibrariesToOut "$out/lib/svm/clibraries"}
${copyClibrariesToLib}
'';
"17-linux-aarch64" = ''
${copyClibrariesToOut "$out/lib/svm/clibraries"}
${copyClibrariesToLib}
'';
"11-darwin-amd64" = "";
"17-darwin-amd64" = "";
}.${javaVersionPlatform} + ''
# ensure that $lib/lib exists to avoid breaking builds
# add those libraries to $lib output too, so we can use them with
# `native-image -H:CLibraryPath=''${lib.getLib graalvmXX-ce}/lib ...` and reduce
# closure size by not depending on GraalVM $out (that is much bigger)
mkdir -p $lib/lib
# jni.h expects jni_md.h to be in the header search path.
ln -s $out/include/linux/*_md.h $out/include/
# copy-paste openjdk's preFixup
# Set JAVA_HOME automatically.
mkdir -p $out/nix-support
cat <<EOF > $out/nix-support/setup-hook
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
EOF
'';
for f in ${glibc}/lib/*; do
ln -s $f $lib/lib/$(basename $f)
done
''
}
'';
dontStrip = true;
@ -282,7 +250,7 @@ let
}
${
lib.optionalString (platform != "linux-aarch64") ''
lib.optionalString (builtins.any (a: a == "python-installable-svm") platform.products) ''
echo "Testing GraalPython"
$out/bin/graalpython -c 'print(1 + 1)'
echo '1 + 1' | $out/bin/graalpython
@ -290,10 +258,14 @@ let
}
echo "Testing TruffleRuby"
${
lib.optionalString (builtins.any (a: a == "ruby-installable-svm") platform.products) ''
# Hide warnings about wrong locale
export LANG=C
export LC_ALL=C
$out/bin/ruby -e 'puts(1 + 1)'
''
}
${# FIXME: irb is broken in all platforms
# TODO: `irb` on MacOS gives an error saying "Could not find OpenSSL
# headers, install via Homebrew or MacPorts or set OPENSSL_PREFIX", even
@ -312,7 +284,11 @@ let
passthru = {
home = graalvmXXX-ce;
updateScript = ./update.sh;
updateScript = import ./update.nix {
inherit lib writeShellScript jq sourcesFilename name config gnused defaultVersion;
graalVersion = version;
javaVersion = "java${javaVersion}";
};
};
meta = with lib; {

View file

@ -0,0 +1,223 @@
{ javaVersion
, graalVersion
, defaultVersion
, config
, sourcesFilename
, name
, lib
, writeShellScript
, jq
, gnused
}:
/*
How to use:
run `nix-shell maintainers/scripts/update.nix --argstr package graalvmXX-ce`
to update the graalvmXX-ce-sources.json file.
E.g: nix-shell maintainers/scripts/update.nix --argstr package graalvm17-ce
Basic idea:
If we know the platform, product, javaVersion and graalVersion
we can create the url. This leads to the following json structure:
{
"platform/arch1": {
"product1|javaVersion|graalVersion": { "sha256": "...", "url": "..."},
"product2|javaVersion|graalVersion": { "sha256": "...", "url": "..."},
...
},
"platform/arch2": {
...
}
}
*/
let
separator = "|";
# isDev :: String -> Boolean
isDev = version:
lib.hasInfix "dev" version;
# getLatestVersion :: String -> String
getLatestVersion = currentVersion:
let
dev = if isDev currentVersion then "dev-" else "";
url = "https://api.github.com/repos/graalvm/graalvm-ce-${dev}builds/releases/latest";
file = builtins.fetchurl url;
json = builtins.fromJSON (builtins.readFile file);
in
lib.removePrefix "vm-" json.tag_name;
# getArchString :: String -> String
getArchString = nixArchString:
{
"aarch64-linux" = "linux-aarch64";
"x86_64-linux" = "linux-amd64";
"x86_64-darwin" = "darwin-amd64";
}.${nixArchString};
# getProductSuffix :: String -> String
getProductSuffix = productName:
{
"graalvm-ce" = ".tar.gz";
"native-image-installable-svm" = ".jar";
"ruby-installable-svm" = ".jar";
"wasm-installable-svm" = ".jar";
"python-installable-svm" = ".jar";
}.${productName};
# getProductSuffix :: String -> String
getProductBaseUrl = productName:
{
"graalvm-ce" = "https://github.com/graalvm/graalvm-ce-builds/releases/download";
"native-image-installable-svm" = "https://github.com/graalvm/graalvm-ce-builds/releases/download";
"ruby-installable-svm" = "https://github.com/oracle/truffleruby/releases/download";
"wasm-installable-svm" = "https://github.com/graalvm/graalvm-ce-builds/releases/download";
"python-installable-svm" = "https://github.com/graalvm/graalpython/releases/download";
}.${productName};
# getDevUrl :: String
getDevUrl = { arch, graalVersion, product, javaVersion }:
let
baseUrl = https://github.com/graalvm/graalvm-ce-dev-builds/releases/download;
in
"${baseUrl}/${graalVersion}/${product}-${javaVersion}-${arch}-dev${getProductSuffix product}";
# getReleaseUrl :: AttrSet -> String
getReleaseUrl = { arch, graalVersion, product, javaVersion }:
let baseUrl = getProductBaseUrl product;
in
"${baseUrl}/vm-${graalVersion}/${product}-${javaVersion}-${arch}-${graalVersion}${getProductSuffix product}";
# getUrl :: AttrSet -> String
getUrl = args@{ arch, graalVersion, product, javaVersion }:
if isDev graalVersion
then getDevUrl args
else getReleaseUrl args;
# computeSha256 :: String -> String
computeSha256 = url:
builtins.hashFile "sha256" (builtins.fetchurl url);
# downloadSha256 :: String -> String
downloadSha256 = url:
let sha256Url = url + ".sha256";
in
builtins.readFile (builtins.fetchurl sha256Url);
# getSha256 :: String -> String -> String
getSha256 = graalVersion: url:
if isDev graalVersion
then computeSha256 url
else downloadSha256 url;
# cartesianZipListsWith :: (a -> b -> c) -> [a] -> [b] -> [c]
cartesianZipListsWith = f: fst: snd:
let
cartesianProduct = lib.cartesianProductOfSets { a = fst; b = snd; };
fst' = builtins.catAttrs "a" cartesianProduct;
snd' = builtins.catAttrs "b" cartesianProduct;
in
lib.zipListsWith f fst' snd';
# zipListsToAttrs :: [a] -> [b] -> AttrSet
zipListsToAttrs = names: values:
lib.listToAttrs (
lib.zipListsWith (name: value: { inherit name value; }) names values
);
# genProductJavaVersionGraalVersionAttrSet :: String -> AttrSet
genProductJavaVersionGraalVersionAttrSet = product_javaVersion_graalVersion:
let
attrNames = [ "product" "javaVersion" "graalVersion" ];
attrValues = lib.splitString separator product_javaVersion_graalVersion;
in
zipListsToAttrs attrNames attrValues;
# genUrlAndSha256 :: String -> String -> AttrSet
genUrlAndSha256 = arch: product_javaVersion_graalVersion:
let
productJavaVersionGraalVersion =
(genProductJavaVersionGraalVersionAttrSet product_javaVersion_graalVersion)
// { inherit arch; };
url = getUrl productJavaVersionGraalVersion;
sha256 = getSha256 productJavaVersionGraalVersion.graalVersion url;
in
{
${arch} = {
${product_javaVersion_graalVersion} = {
inherit sha256 url;
};
};
};
# genArchProductVersionPairs :: String -> -> String -> AttrSet -> [AttrSet]
genArchProductVersionList = javaVersion: graalVersion: archProducts:
let
arch = archProducts.arch;
products = archProducts.products;
javaGraalVersion = javaVersion + separator + (getLatestVersion (archProducts.version or graalVersion));
productJavaGraalVersionList =
cartesianZipListsWith (a: b: a + separator + b)
products [ javaGraalVersion ];
in
cartesianZipListsWith (genUrlAndSha256) [ arch ] productJavaGraalVersionList;
# genSources :: String -> String -> AttrSet -> Path String
genSources = javaVersion: defaultVersion: config:
let
archProducts = builtins.attrValues config;
sourcesList = builtins.concatMap (genArchProductVersionList javaVersion defaultVersion) archProducts;
sourcesAttr = builtins.foldl' (lib.recursiveUpdate) { } sourcesList;
in
builtins.toFile "sources.json" (builtins.toJSON sourcesAttr);
# isNew :: String -> String -> Boolean
isNew = newVersion: currentVersion:
{
"-1" = false;
"0" = false;
"1" = true;
}.${builtins.toString (builtins.compareVersions newVersion currentVersion)};
newVersion = getLatestVersion graalVersion;
sourcesJson = genSources javaVersion defaultVersion config;
sourcesJsonPath = lib.strings.escapeShellArg ./. + "/${sourcesFilename}";
# versionKeyInDefaultNix String -> String
versionKeyInDefaultNix = graalVersion:
if isDev graalVersion
then "${name}-dev-version"
else "${name}-release-version";
/*
updateScriptText :: String -> String -> String
Writes the json file and updates the version in default.nix using sed
because update-source-version does not work srcs.
*/
updateScriptText = newVersion: currentVersion:
if isNew newVersion currentVersion
then
let
versionKey = versionKeyInDefaultNix currentVersion;
in
''
echo "New version found. Updating ${currentVersion} -> ${newVersion}".
export PATH="${lib.makeBinPath [ jq gnused ]}:$PATH"
jq . ${sourcesJson} > ${sourcesJsonPath}
sed -i 's|${versionKey} = "${currentVersion}";|${versionKey} = "${newVersion}";|' \
${lib.strings.escapeShellArg ./default.nix}
''
else ''echo "No new version found. Skip updating."'';
in
writeShellScript "update-graal.sh" ''
set -o errexit
set -o nounset
set -o pipefail
${updateScriptText newVersion graalVersion}
''

View file

@ -1,81 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -p coreutils curl nix jq gnused -i bash
set -eou pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
info() { echo "[INFO] $*"; }
echo_file() { echo "$@" >> hashes.nix; }
verlte() {
[ "$1" = "$(echo -e "$1\n$2" | sort -V | head -n1)" ]
}
readonly nixpkgs=../../../../..
readonly old_version="$(nix-instantiate "$nixpkgs" --eval --strict -A graalvm11-ce.version)"
if [[ -z "${1:-}" ]]; then
readonly gh_version="$(curl \
${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
-s https://api.github.com/repos/graalvm/graalvm-ce-builds/releases/latest | \
jq --raw-output .tag_name)"
readonly new_version="${gh_version//vm-/}"
else
readonly new_version="$1"
fi
if verlte "$old_version" "$new_version"; then
info "graalvm-ce $old_version is up-to-date."
[[ -z "${FORCE:-}" ]] && exit 0
else
info "graalvm-ce $old_version is out-of-date. Updating..."
fi
readonly urls=(
"https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${new_version}/graalvm-ce-java@platform@-${new_version}.tar.gz"
"https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${new_version}/native-image-installable-svm-java@platform@-${new_version}.jar"
"https://github.com/oracle/truffleruby/releases/download/vm-${new_version}/ruby-installable-svm-java@platform@-${new_version}.jar"
"https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${new_version}/wasm-installable-svm-java@platform@-${new_version}.jar"
"https://github.com/graalvm/graalpython/releases/download/vm-${new_version}/python-installable-svm-java@platform@-${new_version}.jar"
)
readonly platforms=(
"11-linux-aarch64"
"17-linux-aarch64"
"11-linux-amd64"
"17-linux-amd64"
"11-darwin-amd64"
"17-darwin-amd64"
)
info "Deleting old hashes.nix file..."
rm -f hashes.nix
info "Generating hashes.nix file for 'graalvm-ce' $new_version. This will take a while..."
echo_file "# Generated by $0 script"
echo_file "{ javaVersionPlatform, ... }:"
echo_file "["
for url in "${urls[@]}"; do
echo_file " {"
echo_file " sha256 = {"
for platform in "${platforms[@]}"; do
if hash="$(nix-prefetch-url "${url//@platform@/$platform}")"; then
echo_file " \"$platform\" = \"$hash\";"
fi
done
echo_file ' }.${javaVersionPlatform} or null;'
echo_file " url = \"${url//@platform@/\$\{javaVersionPlatform\}}\";"
echo_file " }"
done
echo_file "]"
info "Updating graalvm-ce version..."
# update-source-version does not work here since it expects src attribute
sed "s|$old_version|\"$new_version\"|" -i default.nix
info "Done!"

View file

@ -1,17 +1,19 @@
{ lib, stdenv, libgcrypt, fetchFromGitHub, ocamlPackages, perl }:
stdenv.mkDerivation rec {
pname = "obliv-c";
version = "0.0pre20180624";
version = "0.0pre20210621";
buildInputs = [ perl ]
++ (with ocamlPackages; [ ocaml findlib ocamlbuild ]);
propagatedBuildInputs = [ libgcrypt ];
src = fetchFromGitHub {
owner = "samee";
repo = "obliv-c";
rev = "3d6804ca0fd85868207a0ccbd2509ec064723ac2";
sha256 = "1ib21ngn7zr58xxq4sjigrpaxb0wx35x3k9l4qvwflzrmvnman20";
rev = "e02e5c590523ef4dae06e167a7fa00037bb3fdaf";
sha256 = "sha256:02vyr4689f4dmwqqs0q1mrack9h3g8jz3pj8zqiz987dk0r5mz7a";
};
hardeningDisable = [ "fortify" ];
patches = [ ./ignore-complex-float128.patch ];
preBuild = ''

View file

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
export CC="${gcc}/bin/gcc";
export CCARGS="-I$out/include \
-L${openssl.out}/lib \
-L${lib.getLib openssl}/lib \
-L${libmysqlclient}/lib \
-L${postgresql.lib}/lib \
-L${sqlite.out}/lib";

View file

@ -36,8 +36,8 @@ in stdenv.mkDerivation rec {
patches = [(substituteAll {
src = ./0001-Fix-some-paths-for-Nix-build.patch;
libipasir = "${libipasir}/lib/${libipasir.libname}";
libssl = "${openssl.out}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}";
libcrypto = "${openssl.out}/lib/libcrypto${stdenv.hostPlatform.extensions.sharedLibrary}";
libssl = "${lib.getLib openssl}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}";
libcrypto = "${lib.getLib openssl}/lib/libcrypto${stdenv.hostPlatform.extensions.sharedLibrary}";
})];
buildInputs = [
@ -47,7 +47,7 @@ in stdenv.mkDerivation rec {
# To build community books, we need Perl and a couple of utilities:
which perl hostname makeWrapper
# Some of the books require one or more of these external tools:
openssl.out glucose minisat abc-verifier libipasir
glucose minisat abc-verifier libipasir
z3 (python2.withPackages (ps: [ ps.z3 ]))
];

View file

@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
substituteInPlace $f \
--replace "${expat.dev}/lib" "${expat.out}/lib" \
--replace "${db.dev}/lib" "${db.out}/lib" \
--replace "${openssl.dev}/lib" "${openssl.out}/lib"
--replace "${openssl.dev}/lib" "${lib.getLib openssl}/lib"
done
# Give apr1 access to sed for runtime invocations.

View file

@ -23,7 +23,7 @@ in stdenv.mkDerivation rec {
configureFlags = [
"--with-openssl-includes=${openssl.dev}/include"
"--with-openssl-libs=${openssl.out}/lib"
"--with-openssl-libs=${lib.getLib openssl}/lib"
];
preConfigure = ''

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
patchPhase = ''
substituteInPlace configure \
--replace "/usr/local/ssl/include" "${openssl.dev}/include" \
--replace "/usr/local/ssl/lib" "${openssl.out}/lib"
--replace "/usr/local/ssl/lib" "${lib.getLib openssl}/lib"
'';
configureFlags = [

View file

@ -129,7 +129,7 @@ stdenv.mkDerivation rec {
strictDeps = true;
nativeBuildInputs = [
(meson.override {
(buildPackages.meson.override {
withDarwinFrameworksGtkDocPatch = stdenv.isDarwin;
})
ninja pkg-config perl python3 gettext gtk-doc docbook_xsl docbook_xml_dtd_45 libxml2

View file

@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
preFixup = ''
sed -i $lib/lib/libarchive.la \
-e 's|-lcrypto|-L${openssl.out}/lib -lcrypto|' \
-e 's|-lcrypto|-L${lib.getLib openssl}/lib -lcrypto|' \
-e 's|-llzo2|-L${lzo}/lib -llzo2|'
'';

View file

@ -27,8 +27,8 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace config.macosx-catalina \
--replace '/usr/lib/libssl.46.dylib' "${openssl.out}/lib/libssl.dylib" \
--replace '/usr/lib/libcrypto.44.dylib' "${openssl.out}/lib/libcrypto.dylib"
--replace '/usr/lib/libssl.46.dylib' "${lib.getLib openssl}/lib/libssl.dylib" \
--replace '/usr/lib/libcrypto.44.dylib' "${lib.getLib openssl}/lib/libcrypto.dylib"
sed -i -e 's|/bin/rm|rm|g' genMakefiles
sed -i \
-e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \

View file

@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
rm -r libraries/*/.libs
rm -r contrib/slapd-modules/passwd/*/.libs
for f in $out/lib/libldap.la $out/lib/libldap_r.la; do
substituteInPlace "$f" --replace '-lssl' '-L${openssl.out}/lib -lssl'
substituteInPlace "$f" --replace '-lssl' '-L${lib.getLib openssl}/lib -lssl'
'' + lib.optionalString withCyrusSasl ''
substituteInPlace "$f" --replace '-lsasl2' '-L${cyrus_sasl.out}/lib -lsasl2'
'' + ''

View file

@ -261,7 +261,7 @@ stdenv.mkDerivation {
"-I" "${harfbuzz.dev}/include"
"-system-pcre"
"-openssl-linked"
"-L" "${openssl.out}/lib"
"-L" "${lib.getLib openssl}/lib"
"-I" "${openssl.dev}/include"
"-system-sqlite"
''-${if libmysqlclient != null then "plugin" else "no"}-sql-mysql''

View file

@ -157,7 +157,7 @@
'';
postFixup = ''
patchelf --set-rpath ${lib.makeLibraryPath [ unixODBC openssl.out libkrb5 libuuid stdenv.cc.cc ]} \
patchelf --set-rpath ${lib.makeLibraryPath [ unixODBC openssl libkrb5 libuuid stdenv.cc.cc ]} \
$out/lib/libmsodbcsql-${versionMajor}.${versionMinor}.so.${versionAdditional}
'';

View file

@ -64,7 +64,7 @@ in
propagatedBuildInputs = [pkgs.openssl];
overrides = y: (x.overrides y) // {
prePatch = ''
sed 's|libssl.so|${pkgs.openssl.out}/lib/libssl.so|' -i src/reload.lisp
sed 's|libssl.so|${pkgs.lib.getLib pkgs.openssl}/lib/libssl.so|' -i src/reload.lisp
'';
};
};

View file

@ -56,7 +56,7 @@ buildPythonPackage rec {
pytestCheckHook
];
disabledTests = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
disabledTests = lib.optionals stdenv.isDarwin [
# AssertionError: <class 'urllib3.poolmanager.ProxyManager'> != <class 'urllib3.poolmanager.Poolmanager'>
"test_rest_proxycare"
];

View file

@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "plaid-python";
version = "9.1.1";
version = "9.2.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-vHJ35MvMw3G1k/A2gifaE97GayoVEOQ9lR6yG6ZkzS4=";
hash = "sha256-3yFfANMkn8CXCheNHU77WGeYxPV4gs2jvOl/rV+/6vY=";
};
propagatedBuildInputs = [

View file

@ -34,7 +34,7 @@ buildPythonPackage rec {
# but it is not working as intended.
#patchPhase = ''
# substituteInPlace proton/srp/_ctsrp.py --replace \
# "ctypes.cdll.LoadLibrary('libssl.so.10')" "'${openssl.out}/lib/libssl.so'"
# "ctypes.cdll.LoadLibrary('libssl.so.10')" "'${lib.getLib openssl}/lib/libssl.so'"
#'';
# Regarding the issue above, I'm disabling tests for now
doCheck = false;

View file

@ -27,7 +27,7 @@ buildPythonPackage rec {
buildInputs = [
curl
openssl.out
openssl
];
nativeBuildInputs = [

View file

@ -12,7 +12,7 @@ buildPythonPackage rec {
patchPhase = ''
substituteInPlace telethon/crypto/libssl.py --replace \
"ctypes.util.find_library('ssl')" "'${openssl.out}/lib/libssl.so'"
"ctypes.util.find_library('ssl')" "'${lib.getLib openssl}/lib/libssl.so'"
'';
propagatedBuildInputs = [

View file

@ -1083,12 +1083,12 @@ let
patchShebangs configure
'';
PKGCONFIG_CFLAGS = "-I${pkgs.openssl.dev}/include";
PKGCONFIG_LIBS = "-Wl,-rpath,${pkgs.openssl.out}/lib -L${pkgs.openssl.out}/lib -lssl -lcrypto";
PKGCONFIG_LIBS = "-Wl,-rpath,${lib.getLib pkgs.openssl}/lib -L${lib.getLib pkgs.openssl}/lib -lssl -lcrypto";
});
websocket = old.websocket.overrideDerivation (attrs: {
PKGCONFIG_CFLAGS = "-I${pkgs.openssl.dev}/include";
PKGCONFIG_LIBS = "-Wl,-rpath,${pkgs.openssl.out}/lib -L${pkgs.openssl.out}/lib -lssl -lcrypto";
PKGCONFIG_LIBS = "-Wl,-rpath,${lib.getLib pkgs.openssl}/lib -L${lib.getLib pkgs.openssl}/lib -lssl -lcrypto";
});
Rserve = old.Rserve.overrideDerivation (attrs: {
@ -1193,7 +1193,7 @@ let
patchShebangs configure
'';
PKGCONFIG_CFLAGS = "-I${pkgs.openssl.dev}/include -I${pkgs.cyrus_sasl.dev}/include -I${pkgs.zlib.dev}/include";
PKGCONFIG_LIBS = "-Wl,-rpath,${pkgs.openssl.out}/lib -L${pkgs.openssl.out}/lib -L${pkgs.cyrus_sasl.out}/lib -L${pkgs.zlib.out}/lib -lssl -lcrypto -lsasl2 -lz";
PKGCONFIG_LIBS = "-Wl,-rpath,${lib.getLib pkgs.openssl}/lib -L${lib.getLib pkgs.openssl}/lib -L${pkgs.cyrus_sasl.out}/lib -L${pkgs.zlib.out}/lib -lssl -lcrypto -lsasl2 -lz";
});
ps = old.ps.overrideDerivation (attrs: {

View file

@ -27,8 +27,8 @@ stdenv.mkDerivation rec {
postPatch = ''
# patch cl-plus-ssl to ensure that it finds libssl and libcrypto
sed 's|libssl.so|${openssl.out}/lib/libssl.so|' -i ext/cl-plus-ssl/src/reload.lisp
sed 's|libcrypto.so|${openssl.out}/lib/libcrypto.so|' -i ext/cl-plus-ssl/src/reload.lisp
sed 's|libssl.so|${lib.getLib openssl}/lib/libssl.so|' -i ext/cl-plus-ssl/src/reload.lisp
sed 's|libcrypto.so|${lib.getLib openssl}/lib/libcrypto.so|' -i ext/cl-plus-ssl/src/reload.lisp
# patch dexador to avoid error due to dexador being loaded multiple times
sed -i 's/defpackage/uiop:define-package/g' ext/dexador/src/dexador.lisp
'';

View file

@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec {
preBuild = ''
export OPENSSL_DIR=${lib.getDev openssl}
export OPENSSL_LIB_DIR=${openssl.out}/lib
export OPENSSL_LIB_DIR=${lib.getLib openssl}/lib
export PROTOC=${protobuf}/bin/protoc
export PROTOC_INCLUDE="${protobuf}/include";

View file

@ -0,0 +1,67 @@
{ stdenv
, lib
, desktop-file-utils
, fetchpatch
, fetchurl
, glib
, gtk4
, libadwaita
, meson
, ninja
, pkg-config
, wrapGAppsHook4
, gnome
}:
stdenv.mkDerivation rec {
pname = "d-spy";
version = "1.2.0";
outputs = [ "out" "lib" "dev" ];
src = fetchurl {
url = "mirror://gnome/sources/dspy/${lib.versions.majorMinor version}/dspy-${version}.tar.xz";
sha256 = "XKL0z00w0va9m1OfuVq5YJyE1jzeynBxb50jc+O99tQ=";
};
patches = [
# Remove pointless dependencies
# https://gitlab.gnome.org/GNOME/d-spy/-/merge_requests/6
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/d-spy/-/commit/5a0ec8d53d006e95e93c6d6e32a381eb248b12a1.patch";
sha256 = "jalfdAXcH8GZ50qb2peG+2841cGan4EhwN88z5Ewf+k=";
})
];
nativeBuildInputs = [
meson
ninja
pkg-config
desktop-file-utils
wrapGAppsHook4
];
buildInputs = [
glib
gtk4
libadwaita
];
passthru = {
updateScript = gnome.updateScript {
packageName = "dspy";
attrPath = "d-spy";
};
};
meta = with lib; {
description = "D-Bus exploration tool";
homepage = "https://gitlab.gnome.org/GNOME/d-spy";
license = with licenses; [
lgpl3Plus # library
gpl3Plus # app
];
maintainers = teams.gnome.members;
platforms = platforms.linux;
};
}

View file

@ -11,11 +11,11 @@ let
in
stdenv.mkDerivation rec {
pname = "grails";
version = "5.1.4";
version = "5.1.6";
src = fetchurl {
url = "https://github.com/grails/grails-core/releases/download/v${version}/grails-${version}.zip";
sha256 = "sha256-EoMSnT1MmYGeF82XC7Ed9woe8t+xzYJaylLBVpdFvoI=";
sha256 = "sha256-H4c/Nu6iOgaRLl/uV51nYnNQg5p9cjl/taexZnl4t+I=";
};
nativeBuildInputs = [ unzip ];

View file

@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
moveToOutput bin/nsupdate $dnsutils
for f in "$lib/lib/"*.la "$dev/bin/"bind*-config; do
sed -i "$f" -e 's|-L${openssl.dev}|-L${openssl.out}|g'
sed -i "$f" -e 's|-L${openssl.dev}|-L${lib.getLib openssl}|g'
done
'';

View file

@ -53,7 +53,7 @@ in stdenv.mkDerivation rec {
postInstall = ''
for f in "$lib/lib/"*.la $bin/bin/net-snmp-config $bin/bin/net-snmp-create-v3-user; do
sed 's|-L${openssl.dev}|-L${openssl.out}|g' -i $f
sed 's|-L${openssl.dev}|-L${lib.getLib openssl}|g' -i $f
done
mkdir $dev/bin
mv $bin/bin/net-snmp-config $dev/bin

View file

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "wireguard-exporter";
version = "3.6.2";
version = "3.6.3";
src = fetchFromGitHub {
owner = "MindFlavor";
repo = "prometheus_wireguard_exporter";
rev = version;
sha256 = "sha256-eVGyBynKZLGlsaLwUOx7cJWdRHl65S0Wk1K5c9T8ysQ=";
sha256 = "sha256-m29/whlmhIkLin84NOWs2NVZcXNpVsyyHZ1CLp4FXd0=";
};
cargoSha256 = "sha256-JbFoaMTs6TPYq2qgBkT7WX1itMXohgcWbC1UvaXOi8o=";
cargoSha256 = "sha256-XK4hjBIcOx6JMv61gOpIXaZy7Unw+Bk84TEb+8Fib6Q=";
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];

View file

@ -53,7 +53,7 @@ perlPackages.buildPerlPackage {
preConfigure = ''
substituteInPlace core/server/Makefile.PL \
--replace "my \$openssl_inc_dir = ''';" "my \$openssl_inc_dir = '${openssl.dev}/include';" \
--replace "my \$openssl_lib_dir = ''';" "my \$openssl_lib_dir = '${openssl.out}/lib';" \
--replace "my \$openssl_lib_dir = ''';" "my \$openssl_lib_dir = '${lib.getLib openssl}/lib';" \
--replace "my \$openssl_binary = ''';" "my \$openssl_binary = '${openssl.bin}/bin/openssl';"
substituteInPlace tools/vergen --replace "#!/usr/bin/perl" "#!${perl}/bin/perl"
cp ${./vergen_revision_state} .vergen_revision_state

View file

@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec {
# As of version 0.10.35 rust-openssl looks for openssl on darwin
# with a hardcoded path to /usr/lib/libssl.x.x.x.dylib
# https://github.com/sfackler/rust-openssl/blob/master/openssl-sys/build/find_normal.rs#L115
OPENSSL_LIB_DIR = "${openssl.out}/lib";
OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib";
OPENSSL_INCLUDE_DIR = "${openssl.dev}/include";
PROTOC = "${protobuf}/bin/protoc";

View file

@ -80,7 +80,7 @@ in rec {
cp ${curl_.bin}/bin/curl $out/bin
cp -d ${curl_.out}/lib/libcurl*.dylib $out/lib
cp -d ${libssh2.out}/lib/libssh*.dylib $out/lib
cp -d ${openssl.out}/lib/*.dylib $out/lib
cp -d ${lib.getLib openssl}/lib/*.dylib $out/lib
cp -d ${gnugrep.pcre.out}/lib/libpcre*.dylib $out/lib
cp -d ${lib.getLib libiconv}/lib/lib*.dylib $out/lib

View file

@ -46,7 +46,7 @@ py.pkgs.buildPythonApplication rec {
postPatch = ''
substituteInPlace "salt/utils/rsax931.py" \
--subst-var-by "libcrypto" "${openssl.out}/lib/libcrypto.so"
--subst-var-by "libcrypto" "${lib.getLib openssl}/lib/libcrypto.so"
substituteInPlace requirements/base.txt \
--replace contextvars ""
'';

View file

@ -3,13 +3,13 @@
buildGoModule rec {
pname = "restic";
version = "0.12.1";
version = "0.13.0";
src = fetchFromGitHub {
owner = "restic";
repo = "restic";
rev = "v${version}";
sha256 = "19lzccipbpxdkay60zdqfq8dgah0sbxzjcfcx285c28js2zpp85m";
sha256 = "sha256-pbCN262gyS5BSUTN9QU+x2Nnrc8mmCSQH6Inng4OS8c=";
};
patches = [
@ -17,7 +17,7 @@ buildGoModule rec {
./0001-Skip-testing-restore-with-permission-failure.patch
];
vendorSha256 = "0sdswihiy4r3lw9a87xj2qm3nf28cw56yfm56mva6b8lr3vk93l6";
vendorSha256 = "sha256-DWfCjGXjZnZa2mXPmXQmvGDtXb0H1wJqCgVsDjdVy9U=";
subPackages = [ "cmd/restic" ];

View file

@ -5,13 +5,13 @@ let
in
stdenv.mkDerivation rec {
pname = "lrzip";
version = "0.641";
version = "0.650";
src = fetchFromGitHub {
owner = "ckolivas";
repo = pname;
rev = "v${version}";
sha256 = "sha256-253CH6TiHWyr13C76y9PXjyB7gj2Bhd2VRgJ5r+cm/g=";
sha256 = "sha256-rHjaTgNVGfnGio4geuWRfPds5BqcXJu7p8XJh83rRTs=";
};
postPatch = lib.optionalString stdenv.isDarwin ''

View file

@ -31,7 +31,7 @@ stdenv.mkDerivation {
export BOOST_INCLUDEDIR=${boost.dev}/include
export BOOST_LIBRARYDIR=${boost.out}/lib
export CMAKE_INCLUDE_PATH=${openssl.dev}/include
export CMAKE_LIBRARY_PATH=${openssl.out}/lib
export CMAKE_LIBRARY_PATH=${lib.getLib openssl}/lib
substituteInPlace cpp/cmake/FindValgrind.cmake \
--replace "/usr/local" "${valgrind}"

View file

@ -13,13 +13,13 @@
stdenv.mkDerivation rec {
pname = "gummy";
version = "0.1";
version = "0.2";
src = fetchFromGitHub {
owner = "fushko";
repo = "gummy";
rev = version;
sha256 = "sha256-CbZFuvFMmbFVX8k3duhhsg0fd9kVmhsj0VeFYil9YiE=";
sha256 = "sha256-nX5wEJ4HmgFHIgJP2MstBzQjU/9lrXOXoIl1vlolqak=";
};
nativeBuildInputs = [

View file

@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec {
pkg-config
];
OPENSSL_LIB_DIR = "${openssl.out}/lib";
OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib";
OPENSSL_DIR="${lib.getDev openssl}";
buildInputs = lib.optionals stdenv.isLinux [

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-openssl-libdir=${openssl.out}/lib"
"--with-openssl-libdir=${lib.getLib openssl}/lib"
"--with-openssl-incdir=${openssl.dev}/include"
"--enable-ignore-dns-errors"
"--with-yielding-select=yes"

View file

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
src = ./nix-purity.patch;
glibc = stdenv.cc.libc.dev or stdenv.cc.libc;
openssl_dev = openssl.dev;
openssl_out = openssl.out;
openssl_lib = lib.getLib openssl;
})
# Without nonpriv.patch, pppd --version doesn't work when not run as root.
./nonpriv.patch

View file

@ -9,7 +9,7 @@ index 22837c5..6f6fff5 100644
-CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
-LIBS += -lsrp -L/usr/local/ssl/lib
+CFLAGS += -DUSE_SRP -DOPENSSL -I@openssl_dev@/include/openssl
+LIBS += -lsrp -L@openssl_out@/lib
+LIBS += -lsrp -L@openssl_lib@/lib
NEEDCRYPTOLIB = y
TARGETS += srp-entry
EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry

View file

@ -34,7 +34,7 @@
, withDNSTAP ? false
, withTFO ? false
, withRedis ? false
# Avoid .lib depending on openssl.out
# Avoid .lib depending on lib.getLib openssl
# The build gets a little hacky, so in some cases we disable this approach.
, withSlimLib ? stdenv.isLinux && !stdenv.hostPlatform.isMusl && !withDNSTAP
, withPythonModule ? false
@ -126,7 +126,7 @@ stdenv.mkDerivation rec {
preFixup = lib.optionalString withSlimLib
# Build libunbound again, but only against nettle instead of openssl.
# This avoids gnutls.out -> unbound.lib -> openssl.out.
# This avoids gnutls.out -> unbound.lib -> lib.getLib openssl.
''
configureFlags="$configureFlags --with-nettle=${nettle.dev} --with-libunbound-only"
configurePhase

View file

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
postPatch = ''
sed -i src/osdep/unix/Makefile -e 's,/usr/local/ssl,${openssl.dev},'
sed -i src/osdep/unix/Makefile -e 's,^SSLCERTS=.*,SSLCERTS=/etc/ssl/certs,'
sed -i src/osdep/unix/Makefile -e 's,^SSLLIB=.*,SSLLIB=${openssl.out}/lib,'
sed -i src/osdep/unix/Makefile -e 's,^SSLLIB=.*,SSLLIB=${lib.getLib openssl}/lib,'
'';
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin

View file

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
buildInputs = [ curl gtk3 libassuan libbsd libproxy libxml2 openssl p11-kit pcsclite ];
preConfigure = ''
mkdir openssl
ln -s ${openssl.out}/lib openssl
ln -s ${lib.getLib openssl}/lib openssl
ln -s ${openssl.bin}/bin openssl
ln -s ${openssl.dev}/include openssl
export SSL_PREFIX=$(realpath openssl)

View file

@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
ln -sf libAksIfdh.so.10.0 libAksIfdh.so
ln -sf libAksIfdh.so.10.0 libAksIfdh.so.10
ln -sf ${openssl.out}/lib/libcrypto.so $out/lib/libcrypto.so.1.0.0
ln -sf ${lib.getLib openssl}/lib/libcrypto.so $out/lib/libcrypto.so.1.0.0
'';
dontAutoPatchelf = true;

View file

@ -27,7 +27,7 @@ rustPlatform.buildRustPackage rec {
export IC_NNS_COMMON_PROTO_INCLUDES=${ic}/rs/nns/common/proto
export PROTOC=${buildPackages.protobuf}/bin/protoc
export OPENSSL_DIR=${openssl.dev}
export OPENSSL_LIB_DIR=${openssl.out}/lib
export OPENSSL_LIB_DIR=${lib.getLib openssl}/lib
'';
cargoSha256 = "sha256-YxuBABGaZ+ti31seEYR6bB+OMgrSvl1lZyu4bqdxPIk=";

View file

@ -66,7 +66,7 @@ rustPlatform.buildRustPackage rec {
preConfigure = ''
export OPENSSL_INCLUDE_DIR="${openssl.dev}/include"
export OPENSSL_LIB_DIR="${openssl.out}/lib"
export OPENSSL_LIB_DIR="${lib.getLib openssl}/lib"
'';
postInstall = ''

View file

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
(lib.withFeature usePAM "pam")
] ++ (if useSSL then [
"--with-ssl-incl-dir=${openssl.dev}/include"
"--with-ssl-lib-dir=${openssl.out}/lib"
"--with-ssl-lib-dir=${lib.getLib openssl}/lib"
] else [
"--without-ssl"
]) ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [

View file

@ -336,6 +336,8 @@ with pkgs;
crow-translate = libsForQt5.callPackage ../applications/misc/crow-translate { };
cryptowatch-desktop = callPackage ../applications/finance/cryptowatch { };
dhallDirectoryToNix = callPackage ../build-support/dhall/directory-to-nix.nix { };
dhallPackageToNix = callPackage ../build-support/dhall/package-to-nix.nix { };
@ -15021,6 +15023,8 @@ with pkgs;
dfeet = callPackage ../development/tools/misc/d-feet { };
d-spy = callPackage ../development/tools/misc/d-spy { };
dfu-programmer = callPackage ../development/tools/misc/dfu-programmer { };
dfu-util = callPackage ../development/tools/misc/dfu-util { };

View file

@ -4722,7 +4722,7 @@ let
sha256 = "b66fab514edf97fc32f58da257582704a210c2b35e297d5c31b7fa2ffd08e908";
};
NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include";
NIX_CFLAGS_LINK = "-L${pkgs.openssl.out}/lib -lcrypto";
NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl}/lib -lcrypto";
meta = with lib; {
description = "Perl wrapper around OpenSSL's AES library";
license = with licenses; [ artistic1 gpl1Plus ];
@ -4737,7 +4737,7 @@ let
sha256 = "1p22znbajq91lbk2k3yg12ig7hy5b4vy8igxwqkmbm4nhgxp4ki3";
};
NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include";
NIX_CFLAGS_LINK = "-L${pkgs.openssl.out}/lib -lcrypto";
NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl}/lib -lcrypto";
};
CryptOpenSSLGuess = buildPerlPackage {
@ -4762,7 +4762,7 @@ let
sha256 = "1x6ffps8q7mnawmcfq740llzy7i10g3319vap0wiw4d33fm6z1zh";
};
NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include";
NIX_CFLAGS_LINK = "-L${pkgs.openssl.out}/lib -lcrypto";
NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl}/lib -lcrypto";
buildInputs = [ CryptOpenSSLGuess ];
};
@ -4775,7 +4775,7 @@ let
};
propagatedBuildInputs = [ CryptOpenSSLRandom ];
NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include";
NIX_CFLAGS_LINK = "-L${pkgs.openssl.out}/lib -lcrypto";
NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl}/lib -lcrypto";
buildInputs = [ CryptOpenSSLGuess ];
};
@ -4787,7 +4787,7 @@ let
sha256 = "684bd888d2ed4c748f8f6dd8e87c14afa2974b12ee01faa082ad9cfa1e321e62";
};
NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include";
NIX_CFLAGS_LINK = "-L${pkgs.openssl.out}/lib -lcrypto";
NIX_CFLAGS_LINK = "-L${lib.getLib pkgs.openssl}/lib -lcrypto";
meta = {
homepage = "https://github.com/dsully/perl-crypt-openssl-x509";
description = "Perl extension to OpenSSL's X509 API";
@ -4856,7 +4856,7 @@ let
sha256 = "0b159lw3ia5r87qsgff3qhdnz3l09xcz04rbk4ji7fbyr12wmv7q";
};
makeMakerFlags = "--libpath=${pkgs.openssl.out}/lib --incpath=${pkgs.openssl.dev}/include";
makeMakerFlags = "--libpath=${lib.getLib pkgs.openssl}/lib --incpath=${pkgs.openssl.dev}/include";
buildInputs = [ PathClass ];
propagatedBuildInputs = [ BytesRandomSecure LWPProtocolHttps ];
};
@ -6894,6 +6894,20 @@ let
};
};
DigestSRI = buildPerlPackage {
pname = "Digest-SRI";
version = "0.02";
src = fetchurl {
url = "mirror://cpan/authors/id/H/HA/HAUKEX/Digest-SRI-0.02.tar.gz";
sha256 = "sha256-VITN/m68OYwkZfeBx3w++1OKOULNSyDWiBjG//kHT8c=";
};
meta = {
homepage = "https://github.com/haukex/Digest-SRI";
description = "Calculate and verify Subresource Integrity hashes (SRI)";
license = lib.licenses.gpl3Plus;
};
};
DirManifest = buildPerlModule {
pname = "Dir-Manifest";
version = "0.6.1";
@ -16752,7 +16766,7 @@ let
doCheck = false; # Test performs network access.
preConfigure = ''
mkdir openssl
ln -s ${pkgs.openssl.out}/lib openssl
ln -s ${lib.getLib pkgs.openssl}/lib openssl
ln -s ${pkgs.openssl.bin}/bin openssl
ln -s ${pkgs.openssl.dev}/include openssl
export OPENSSL_PREFIX=$(realpath openssl)