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,19 @@
{ lib, pkgs }:
lib.makeScope pkgs.newScope (
final:
let
inherit (final) callPackage;
in
{
makeGaugePlugin = callPackage ./make-gauge-plugin.nix { };
testGaugePlugins = callPackage ./test-gauge-plugins.nix { };
dotnet = callPackage ./dotnet { };
html-report = callPackage ./html-report { };
java = callPackage ./java { };
js = callPackage ./js { };
ruby = callPackage ./ruby { };
go = callPackage ./go { };
screenshot = callPackage ./screenshot { };
xml-report = callPackage ./xml-report { };
}
)

View File

@@ -0,0 +1,5 @@
{
"version": "0.7.5",
"url": "https://github.com/getgauge/gauge-dotnet/releases/download/v0.7.5/gauge-dotnet-0.7.5.zip",
"hash": "sha256-h9dBgtSZ6W6O4VdWEl0y2kOEcSOoXMiBDmEl2VYdT3E="
}

View File

@@ -0,0 +1,26 @@
{
lib,
makeGaugePlugin,
gauge-unwrapped,
stdenv,
}:
makeGaugePlugin {
pname = "dotnet";
data = lib.importJSON ./data.json;
repo = "getgauge/gauge-dotnet";
releasePrefix = "gauge-dotnet-";
isCrossArch = true;
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
meta = {
description = "Gauge plugin that lets you write tests in C#";
homepage = "https://github.com/getgauge/gauge-dotnet/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ marie ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
inherit (gauge-unwrapped.meta) platforms;
};
}

View File

@@ -0,0 +1,15 @@
{
"version": "0.4.0",
"aarch64-darwin": {
"url": "https://github.com/getgauge-contrib/gauge-go/releases/download/v0.4.0/gauge-go-0.4.0-darwin.arm64.zip",
"hash": "sha256-tMo3+gQPnldCARm0WB7UYSMwaVpz90N2BiTzmvIFTg0="
},
"x86_64-darwin": {
"url": "https://github.com/getgauge-contrib/gauge-go/releases/download/v0.4.0/gauge-go-0.4.0-darwin.x86_64.zip",
"hash": "sha256-zfrEDRyflvvp4Hf2+42RL+5ooY0iBU0bkO2caOAGp74="
},
"x86_64-linux": {
"url": "https://github.com/getgauge-contrib/gauge-go/releases/download/v0.4.0/gauge-go-0.4.0-linux.x86_64.zip",
"hash": "sha256-JEHjk51vYCFAcj9xant2vBU3BZI0krYbfZk9ALjdIs0="
}
}

View File

@@ -0,0 +1,24 @@
{
lib,
makeGaugePlugin,
}:
makeGaugePlugin {
pname = "go";
data = lib.importJSON ./data.json;
repo = "getgauge-contrib/gauge-go";
releasePrefix = "gauge-go-";
meta = {
description = "Gauge plugin that lets you write tests in Go";
homepage = "https://github.com/getgauge-contrib/gauge-go";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ marie ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
};
}

View File

@@ -0,0 +1,19 @@
{
"version": "4.3.2",
"aarch64-darwin": {
"url": "https://github.com/getgauge/html-report/releases/download/v4.3.2/html-report-4.3.2-darwin.arm64.zip",
"hash": "sha256-30RW9I9QTGncnwNTj0/rLlVCQ1wo8oJ2Q0gchHk+ioM="
},
"x86_64-darwin": {
"url": "https://github.com/getgauge/html-report/releases/download/v4.3.2/html-report-4.3.2-darwin.x86_64.zip",
"hash": "sha256-6dC1gObS4msHr+KyKZufDpDQ9MgAIfqUPSIW7jWewtU="
},
"aarch64-linux": {
"url": "https://github.com/getgauge/html-report/releases/download/v4.3.2/html-report-4.3.2-linux.arm64.zip",
"hash": "sha256-sayeQCuoJbeDWK7s/86ApMhzxHhxsyBB4D9QCMxJ/p8="
},
"x86_64-linux": {
"url": "https://github.com/getgauge/html-report/releases/download/v4.3.2/html-report-4.3.2-linux.x86_64.zip",
"hash": "sha256-Dq/GubhDB1RsuK2Rp5T8L+evmImNPN/d5n29ET9n0MI="
}
}

View File

@@ -0,0 +1,25 @@
{
lib,
makeGaugePlugin,
}:
makeGaugePlugin {
pname = "html-report";
data = lib.importJSON ./data.json;
repo = "getgauge/html-report";
releasePrefix = "html-report-";
meta = {
description = "HTML report generation plugin for Gauge";
homepage = "https://github.com/getgauge/html-report/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ marie ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
"aarch64-linux"
"x86_64-linux"
];
};
}

View File

@@ -0,0 +1,19 @@
{
"version": "0.12.0",
"aarch64-darwin": {
"url": "https://github.com/getgauge/gauge-java/releases/download/v0.12.0/gauge-java-0.12.0-darwin.arm64.zip",
"hash": "sha256-vN0FqYT/73+OPGIYEsPwB+eSQ6n5SrFwlHfFybBDpEo="
},
"x86_64-darwin": {
"url": "https://github.com/getgauge/gauge-java/releases/download/v0.12.0/gauge-java-0.12.0-darwin.x86_64.zip",
"hash": "sha256-loKFJzvFshMY206t1z01d4q5jTxKtB0o7nmN4qFWDDQ="
},
"aarch64-linux": {
"url": "https://github.com/getgauge/gauge-java/releases/download/v0.12.0/gauge-java-0.12.0-linux.arm64.zip",
"hash": "sha256-z6nclV/gUDR/jTA4DKaP1HVwuM3U3IVljbYzrlGF15A="
},
"x86_64-linux": {
"url": "https://github.com/getgauge/gauge-java/releases/download/v0.12.0/gauge-java-0.12.0-linux.x86_64.zip",
"hash": "sha256-raJK4VslnzF53JsywITcBOpCN6dKgctqF3oDwNt9lsI="
}
}

View File

@@ -0,0 +1,30 @@
{
lib,
makeGaugePlugin,
}:
makeGaugePlugin {
pname = "java";
data = lib.importJSON ./data.json;
repo = "getgauge/gauge-java";
releasePrefix = "gauge-java-";
meta = {
description = "Gauge plugin that lets you write tests in Java";
homepage = "https://github.com/getgauge/gauge-java/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ marie ];
sourceProvenance = with lib.sourceTypes; [
# Native binary written in go
binaryNativeCode
# Jar files
binaryBytecode
];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
"aarch64-linux"
"x86_64-linux"
];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
nodejs,
buildNpmPackage,
fetchFromGitHub,
unzip,
gauge-unwrapped,
}:
buildNpmPackage rec {
pname = "gauge-plugin-js";
version = "5.0.1";
src = fetchFromGitHub {
owner = "getgauge";
repo = "gauge-js";
rev = "v${version}";
hash = "sha256-eFXWed/2NQphSPuGIdnpq77ZiYPEGx5bS7g5LAZhkME=";
fetchSubmodules = true;
};
npmDepsHash = "sha256-LUwnue1kFxtifRrV8U+IQ74A2/ari75MVyZT0xLaez4=";
npmBuildScript = "package";
buildInputs = [ nodejs ];
nativeBuildInputs = [ unzip ];
postPatch = ''
patchShebangs index.js
'';
installPhase = ''
mkdir -p $out/share/gauge-plugins/js/${version}
unzip deploy/gauge-js-${version}.zip -d $out/share/gauge-plugins/js/${version}
'';
meta = {
description = "Gauge plugin that lets you write tests in JavaScript";
homepage = "https://github.com/getgauge/gauge-js/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ marie ];
inherit (gauge-unwrapped.meta) platforms;
};
}

View File

@@ -0,0 +1,126 @@
{
stdenvNoCC,
fetchzip,
lib,
writeScript,
autoPatchelfHook,
testGaugePlugins,
}:
{
pname,
data,
repo,
releasePrefix,
isCrossArch ? false,
meta,
...
}@args:
let
otherArgs = lib.attrsets.removeAttrs args [
"pname"
"data"
"repo"
"releasePrefix"
"isMultiArch"
];
inherit (stdenvNoCC.hostPlatform) system;
inherit
(
if isCrossArch then
data
else
data.${system} or (throw "gaugePlugins.${pname}: No source for system: ${system}")
)
url
hash
;
# Upstream uses a different naming scheme for platforms
systemMap = {
"x86_64-darwin" = "darwin.x86_64";
"aarch64-darwin" = "darwin.arm64";
"aarch64-linux" = "linux.arm64";
"x86_64-linux" = "linux.x86_64";
};
in
stdenvNoCC.mkDerivation (
finalAttrs:
(lib.recursiveUpdate {
pname = "gauge-plugin-${pname}";
inherit (data) version;
src = fetchzip {
inherit url hash;
stripRoot = false;
};
nativeBuildInputs = lib.optional stdenvNoCC.hostPlatform.isLinux autoPatchelfHook;
installPhase = ''
mkdir -p "$out/share/gauge-plugins/${pname}/${finalAttrs.version}"
cp -r . "$out/share/gauge-plugins/${pname}/${finalAttrs.version}"
'';
passthru = {
tests.loadPlugin = testGaugePlugins { plugins = [ finalAttrs.finalPackage ]; };
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl nix-prefetch yq-go
set -e
dirname="pkgs/development/tools/gauge/plugins/${pname}"
currentVersion=$(nix eval --raw -f default.nix gaugePlugins.${pname}.version)
latestTag=$(curl -s ''${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} https://api.github.com/repos/${repo}/releases/latest | yq ".tag_name")
latestVersion="$(expr $latestTag : 'v\(.*\)')"
tempfile=$(mktemp)
if [[ "$FORCE_UPDATE" != "true" && "$currentVersion" == "$latestVersion" ]]; then
echo "gauge-${pname} is up-to-date: ''${currentVersion}"
exit 0
fi
yq -iPoj "{ \"version\": \"$latestVersion\" }" "$tempfile"
updateSystem() {
system=$1
url=$2
echo "Fetching hash for $system"
hash=$(nix-prefetch-url --type sha256 $url --unpack)
sriHash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $hash)"
yq -iPoj ". + { \"$system\": { \"url\": \"$url\", \"hash\": \"$sriHash\" } }" "$tempfile"
}
updateSingle() {
url=$1
echo "Fetching hash"
hash=$(nix-prefetch-url --type sha256 $url --unpack)
sriHash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $hash)"
yq -iPoj ". + { \"url\": \"$url\", \"hash\": \"$sriHash\" }" "$tempfile"
}
baseUrl="https://github.com/${repo}/releases/download/$latestTag/${releasePrefix}$latestVersion"
${
if isCrossArch then
"updateSingle \${baseUrl}.zip"
else
lib.concatStringsSep "\n" (
map (
platform: ''updateSystem "${platform}" "''${baseUrl}-${systemMap.${platform}}.zip"''
) meta.platforms
)
}
mv "$tempfile" "$dirname/data.json"
'';
};
} otherArgs)
)

View File

@@ -0,0 +1,19 @@
{
"version": "0.9.3",
"aarch64-darwin": {
"url": "https://github.com/getgauge/gauge-ruby/releases/download/v0.9.3/gauge-ruby-0.9.3-darwin.arm64.zip",
"hash": "sha256-s0/hTqVP4Pa1yk474TYUF1dbXy+NbrtJjwBxRXShXqQ="
},
"x86_64-darwin": {
"url": "https://github.com/getgauge/gauge-ruby/releases/download/v0.9.3/gauge-ruby-0.9.3-darwin.x86_64.zip",
"hash": "sha256-NNPIR6ZueZ3coavMM9AeqC+O/I/xcfnEo8KTiQivvQs="
},
"aarch64-linux": {
"url": "https://github.com/getgauge/gauge-ruby/releases/download/v0.9.3/gauge-ruby-0.9.3-linux.arm64.zip",
"hash": "sha256-vd3KZ1Lc2F81xknc6+tPNxLjZWD8oCMBsCAuw2iJURw="
},
"x86_64-linux": {
"url": "https://github.com/getgauge/gauge-ruby/releases/download/v0.9.3/gauge-ruby-0.9.3-linux.x86_64.zip",
"hash": "sha256-Jk9lB+b8Fef+DB/HNgzzKS30wbc2tx3OJTWfGuYCSDk="
}
}

View File

@@ -0,0 +1,25 @@
{
lib,
makeGaugePlugin,
}:
makeGaugePlugin {
pname = "ruby";
data = lib.importJSON ./data.json;
repo = "getgauge/gauge-ruby";
releasePrefix = "gauge-ruby-";
meta = {
description = "Gauge plugin that lets you write tests in Ruby";
homepage = "https://github.com/getgauge/gauge-ruby/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ marie ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
"aarch64-linux"
"x86_64-linux"
];
};
}

View File

@@ -0,0 +1,19 @@
{
"version": "0.3.2",
"x86_64-darwin": {
"url": "https://github.com/getgauge/gauge_screenshot/releases/download/v0.3.2/screenshot-0.3.2-darwin.x86_64.zip",
"hash": "sha256-0qOdBQv6TCiwHizvbb47Sj0aUcMtID4qQ3v5D3XGkXg="
},
"aarch64-darwin": {
"url": "https://github.com/getgauge/gauge_screenshot/releases/download/v0.3.2/screenshot-0.3.2-darwin.arm64.zip",
"hash": "sha256-hsFevOBgKbUIMpNcEyv/2A/agIuInIjLTdhmg0C54pQ="
},
"aarch64-linux": {
"url": "https://github.com/getgauge/gauge_screenshot/releases/download/v0.3.2/screenshot-0.3.2-linux.arm64.zip",
"hash": "sha256-anGbQ3lMDxnPJIuyMjhHUBlcSvI8Cyi867262618AgA="
},
"x86_64-linux": {
"url": "https://github.com/getgauge/gauge_screenshot/releases/download/v0.3.2/screenshot-0.3.2-linux.x86_64.zip",
"hash": "sha256-pWNUhCtp4QUQkWYzL+osOdwjN2gfwwXyk6qpec6GA/o="
}
}

View File

@@ -0,0 +1,25 @@
{
lib,
makeGaugePlugin,
}:
makeGaugePlugin {
pname = "screenshot";
data = lib.importJSON ./data.json;
repo = "getgauge/gauge_screenshot";
releasePrefix = "screenshot-";
meta = {
description = "Gauge plugin to take screenshots";
homepage = "https://github.com/getgauge/gauge_screenshot/";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ marie ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
platforms = [
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
"x86_64-linux"
];
};
}

View File

@@ -0,0 +1,35 @@
{
runCommand,
gauge,
lib,
}:
/**
Creates a gauge install with all given plugins and makes sure every plugin is loaded.
*/
{ plugins }:
let
gaugeWithPlugins = gauge.withPlugins (_: plugins);
in
runCommand "gauge-test" { nativeBuildInputs = [ gaugeWithPlugins ]; } ''
mkdir $out
echo $(gauge install || true) > $out/output.txt
function checkPlugin() {
plugin="$1"
version="$2"
echo Checking for plugin $plugin version $version
if ! grep "$plugin ($version)" $out/output.txt
then
echo "Couldn't find plugin $plugin version $version"
exit 1
fi
}
${lib.concatMapStringsSep "\n" (
p: "checkPlugin '${lib.removePrefix "gauge-plugin-" p.pname}' '${p.version}'"
) plugins}
''

View File

@@ -0,0 +1,19 @@
{
"version": "0.5.2",
"x86_64-darwin": {
"url": "https://github.com/getgauge/xml-report/releases/download/v0.5.2/xml-report-0.5.2-darwin.x86_64.zip",
"hash": "sha256-YVH9Eh9EVDdJp8F/PXMz4egVpo8ULJmvWjWHH4iH2iI="
},
"aarch64-darwin": {
"url": "https://github.com/getgauge/xml-report/releases/download/v0.5.2/xml-report-0.5.2-darwin.arm64.zip",
"hash": "sha256-UW3Axcti8r9dEfiupj2r+mcLGpFBwYQf/7mDNyynReE="
},
"aarch64-linux": {
"url": "https://github.com/getgauge/xml-report/releases/download/v0.5.2/xml-report-0.5.2-linux.arm64.zip",
"hash": "sha256-cJ4Pfkmw0ISczvOo/ZOE0bV00gww92S3dscBZtn0G9o="
},
"x86_64-linux": {
"url": "https://github.com/getgauge/xml-report/releases/download/v0.5.2/xml-report-0.5.2-linux.x86_64.zip",
"hash": "sha256-00F4MIN9P5QL4PApFl6UG4bU3g0G7y/qGNMqJWyelR4="
}
}

View File

@@ -0,0 +1,25 @@
{
lib,
makeGaugePlugin,
}:
makeGaugePlugin {
pname = "xml-report";
data = lib.importJSON ./data.json;
repo = "getgauge/xml-report";
releasePrefix = "xml-report-";
meta = {
description = "XML report generation plugin for Gauge";
homepage = "https://github.com/getgauge/xml-report/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ marie ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
platforms = [
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
"x86_64-linux"
];
};
}