push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
{
version = "1.75.0";
hashes = {
linux-aarch_64 = "sha256-fkWjH5rq+rmirorx+SgjgabYw8DZKbUVt5o2poxfAGg=";
linux-ppcle_64 = "sha256-FC0NgeMZuj1KfSyiqffZyK6/dzvmrZLoI5vz4q8IdlE=";
linux-s390_64 = "sha256-+oXkS7B9o07k1k+J3/fkwVrMhji4R8lLdUcdStP6PK0=";
linux-x86_32 = "sha256-givjTIdi/vJtLgitkUW9IxbS5jb7qh42fhFS9drudo0=";
linux-x86_64 = "sha256-WTZvtYoZ79TjZ0wVaOlO8WeBYVGs+q0C+k7wS7yrKT0=";
osx-aarch_64 = "sha256-kzfvzNrQHdj0tO8n+mcMHKZ5QVgAaXkJf6qsDAvCuJY=";
osx-x86_64 = "sha256-kzfvzNrQHdj0tO8n+mcMHKZ5QVgAaXkJf6qsDAvCuJY=";
windows-x86_32 = "sha256-fOa2fuO+q/DTg0Om79mGlUN39Dhr/IvzM8j42/DG7KI=";
windows-x86_64 = "sha256-yaiM0ILXQfMZBBX9IwtpEkO6qqz7h7KurH56mKT+NbA=";
};
}

View File

@@ -0,0 +1,90 @@
{
lib,
stdenv,
fetchurl,
makeWrapper,
autoPatchelfHook,
}:
let
hostArch =
let
platform = stdenv.hostPlatform;
os =
if platform.isLinux then
"linux"
else if platform.isDarwin then
"osx"
else if platform.isWindows then
"windows"
else
throw "Unsupoprted OS \"${platform.parsed.kernel.name}\"";
arch =
if platform.isx86_32 then
"x86_32"
else if platform.isx86_64 then
"x86_64"
else if platform.isAarch64 then
"aarch_64"
else if platform.isPower64 && platform.isLittleEndian then
"ppcle_64"
else if platform.isS390x then
"s390_64"
else
throw "Unsupported CPU \"${platform.parsed.cpu.name}\"";
in
"${os}-${arch}";
data = import ./data.nix;
in
stdenv.mkDerivation (finalAttrs: {
pname = "protoc-gen-grpc-java";
inherit (data) version;
src = fetchurl {
url = "https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/${finalAttrs.version}/protoc-gen-grpc-java-${finalAttrs.version}-${hostArch}.exe";
hash = data.hashes.${hostArch} or (throw "Unsuported host arch ${hostArch}");
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = (lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]) ++ [
makeWrapper
];
buildInputs = [ stdenv.cc.cc ];
installPhase = ''
runHook preInstall
install -D $src $out/bin/protoc-gen-grpc-java
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = {
description = "gRPC Java Codegen Plugin for Protobuf Compiler";
longDescription = ''
This generates the Java interfaces out of the service definition from a `.proto` file.
It works with the Protobuf Compiler (`protoc`).
'';
changelog = "https://github.com/grpc/grpc-java/releases/tag/v${finalAttrs.version}";
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.progrm_jarvis ];
homepage = "https://grpc.io/docs/languages/java/generated-code/";
platforms = [
# Linux
"x86_64-linux"
"i686-linux"
"aarch64-linux"
"powerpc64le-linux"
"s390x-linux"
# Darwin
"x86_64-darwin"
"aarch64-darwin"
# Windows
"x86_64-windows"
"i686-windows"
];
};
})

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq gnused nix
set -euo pipefail
ARCHS=(
'linux-aarch_64'
'linux-ppcle_64'
'linux-s390_64'
'linux-x86_32'
'linux-x86_64'
'osx-aarch_64'
'osx-x86_64'
'windows-x86_32'
'windows-x86_64'
)
DATA_FILE=pkgs/by-name/pr/protoc-gen-grpc-java/data.nix
version="$(
curl --silent --location --fail \
${GITHUB_TOKEN:+-u ":${GITHUB_TOKEN}"} \
https://api.github.com/repos/grpc/grpc-java/releases/latest |
jq -r '.tag_name' |
sed 's/^v//'
)"
echo '{' >"${DATA_FILE}"
echo " version = \"${version}\";" >>"${DATA_FILE}"
echo ' hashes = {' >>"${DATA_FILE}"
for arch in "${ARCHS[@]}"; do
url="https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/${version}/protoc-gen-grpc-java-${version}-${arch}.exe"
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri "$(nix-prefetch-url "${url}")")
echo " ${arch} = \"${hash}\";" >>"${DATA_FILE}"
done
echo ' };' >>"${DATA_FILE}"
echo '}' >>"${DATA_FILE}"