Merge origin/master into haskell-updates.

This commit is contained in:
Peter Simons
2021-04-12 10:30:16 +02:00
223 changed files with 5295 additions and 1269 deletions

View File

@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "air";
version = "1.15.1";
version = "1.25";
src = fetchFromGitHub {
owner = "cosmtrek";
repo = "air";
rev = "v${version}";
sha256 = "0d34k8hyag84j24bhax4gvg8mkzqyhdqd16rfirpfjiqvqh0vdkz";
sha256 = "sha256-on9Rb+QGFWx7/k9xD+tcaPu6YNaBBkFBHHMSWJbZpWM=";
};
vendorSha256 = "0k28rxnd0vyb6ljbi83bm1gl7j4r660a3ckjxnzc2qzwvfj69g53";
vendorSha256 = "sha256-B7AgUFjiW3P1dU88u3kswbCQJ7Qq7rgPlX+b+3Pq1L4=";
subPackages = [ "." ];

View File

@@ -11,13 +11,13 @@
mkDerivation rec {
pname = "cutter";
version = "2.0.0";
version = "2.0.1";
src = fetchFromGitHub {
owner = "rizinorg";
repo = "cutter";
rev = "v${version}";
sha256 = "sha256-uIN/NR+swu9Ie0wP2aBhw5WBvTe9NDmzSs+lQMCeavc=";
sha256 = "sha256-IQCJOUgefSdMSa27E6I/CL35Kx5pHq/u+5Q0FHUAR1E=";
fetchSubmodules = true;
};

View File

@@ -18,29 +18,42 @@
, ninja
, capstone
, tree-sitter
, python3
}:
stdenv.mkDerivation rec {
pname = "rizin";
version = "0.1.2";
version = "0.2.0";
src = fetchurl {
url = "https://github.com/rizinorg/rizin/releases/download/v${version}/rizin-src-${version}.tar.xz";
sha256 = "sha256-npUp8wJiKAaQKSigXtndhJLTJ4+pyFqa0FwDLBqR/sE=";
url = "https://github.com/rizinorg/rizin/releases/download/v${version}/rizin-src-v${version}.tar.xz";
sha256 = "sha256-CGHeo247syha+rVtiAQz0XkEYK9p4DHTnLK2FhBOvE8=";
};
mesonFlags = [
"-Duse_sys_capstone=true"
"-Duse_sys_magic=true"
"-Duse_sys_libzip=true"
"-Duse_sys_zlib=true"
"-Duse_sys_xxhash=true"
"-Duse_sys_lz4=true"
"-Duse_sys_openssl=true"
"-Duse_sys_tree_sitter=true"
"-Duse_sys_capstone=enabled"
"-Duse_sys_magic=enabled"
"-Duse_sys_libzip=enabled"
"-Duse_sys_zlib=enabled"
"-Duse_sys_xxhash=enabled"
"-Duse_sys_lz4=enabled"
"-Duse_sys_openssl=enabled"
"-Duse_sys_tree_sitter=enabled"
];
nativeBuildInputs = [ pkg-config meson ninja cmake ];
nativeBuildInputs = [ pkg-config meson ninja cmake (python3.withPackages (ps: [ ps.setuptools ])) ];
# meson's find_library seems to not use our compiler wrapper if static paraemter
# is either true/false... We work around by also providing LIBRARY_PATH
preConfigure = ''
LIBRARY_PATH=""
for b in ${toString (map lib.getLib buildInputs)}; do
if [[ -d "$b/lib" ]]; then
LIBRARY_PATH="$b/lib''${LIBRARY_PATH:+:}$LIBRARY_PATH"
fi
done
export LIBRARY_PATH
'';
buildInputs = [
file

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "async-profiler";
version = "1.8.4";
version = "1.8.5";
src = fetchFromGitHub {
owner = "jvm-profiling-tools";
repo = "async-profiler";
rev = "v${version}";
sha256 = "sha256-R/TFElytq3mBG+jKjb7XlFUqpXBpSZGfbscUdg2vevE=";
sha256 = "sha256-vSBueRNraMgLcaprPsBUriX3WZ7N0UrllnSVLL2F738=";
};
buildInputs = [ jdk8 ];

View File

@@ -2,13 +2,13 @@
buildGoModule rec {
pname = "bazel-kazel";
version = "0.2.1";
version = "0.2.2";
src = fetchFromGitHub {
owner = "kubernetes";
repo = "repo-infra";
rev = "v${version}";
sha256 = "sha256-g7jfuWe4UeAbNf+kOa0Y9BamUnGEbOGxZ+KdQWdWl48=";
sha256 = "sha256-EfK8uJQvZkB5V/SGOLRznAFGsgVGwFv6MWkLPWePYvM=";
};
vendorSha256 = "sha256-1+7Mx1Zh1WolqTpWNe560PRzRYaWVUVLvNvUOysaW5I=";

View File

@@ -1,19 +1,23 @@
{ lib, buildGoPackage, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub }:
buildGoPackage rec {
buildGoModule rec {
pname = "bazel-buildtools";
version = "3.5.0";
goPackagePath = "github.com/bazelbuild/buildtools";
version = "4.0.1";
src = fetchFromGitHub {
owner = "bazelbuild";
repo = "buildtools";
rev = version;
sha256 = "179k0kwh7i2azkhk8dw7ac50a05q7n3i29pqaf69yw7jrpbf8k85";
sha256 = "0q7b9zh38vblqs5lwhjk28km89p706aky4wv6bwz2vg9gl6bfclq";
};
goDeps = ./deps.nix;
vendorSha256 = "1w6i1lb72mfdyb901gpl9yc6ql73j5kik6li0j5jv5ab2m3j9qvf";
preBuild = ''
rm -r warn/docs
'';
doCheck = false;
excludedPackages = [ "generatetables" ];

View File

@@ -1,20 +0,0 @@
[
{
goPackagePath = "github.com/golang/protobuf";
fetch = {
type = "git";
url = "https://github.com/golang/protobuf";
rev = "84668698ea25b64748563aa20726db66a6b8d299";
sha256 = "1gkd1942vk9n8kfzdwy1iil6wgvlwjq7a3y5jc49ck4lz9rhmgkq";
};
}
{
goPackagePath = "go.starlark.net";
fetch = {
type = "git";
url = "https://github.com/google/starlark-go";
rev = "6677ee5c7211380ec7e6a1b50dc45287e40ca9e1";
sha256 = "1dl8q1lwvmm38w2lzfwray2djdcq40z89yy6vzy387w0xrax0jj0";
};
}
]

View File

@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "cloud-nuke";
version = "0.1.27";
version = "0.1.28";
src = fetchFromGitHub {
owner = "gruntwork-io";
repo = pname;
rev = "v${version}";
sha256 = "1708g8msv5cw0b4gljyjqns328wbci3p3avwysms4aknm4vky0g0";
sha256 = "sha256-UssjIix2sFLqau5PMFNDP9XPCSNUdRO6aBixIQNtSy8=";
};
vendorSha256 = "0m7k6k790i06i8a5r8y7787mmikfibbvl7s8xqxygq1f5cpdspd6";
vendorSha256 = "sha256-pl3dLisu4Oc77kgfuteKbsZaDzrHo1wUigZEkM4081Q=";
buildFlagsArray = [ "-ldflags=-s -w -X main.VERSION=${version}" ];

View File

@@ -2,7 +2,7 @@
, stdenv
, fetchgit
, wrapLisp
, sbcl
, sbcl_2_0_9
, openssl
}:
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [
(wrapLisp sbcl)
(wrapLisp sbcl_2_0_9)
openssl
];

View File

@@ -0,0 +1,265 @@
{ autoPatchelfHook
, coreutils
, curl
, dotnetCorePackages
, dotnetPackages
, fetchFromGitHub
, fetchurl
, git
, glibc
, icu
, libkrb5
, lib
, linkFarm
, lttng-ust
, makeWrapper
, nodejs-12_x
, openssl
, stdenv
, zlib
}:
let
pname = "github-actions-runner";
version = "2.277.1";
deps = (import ./deps.nix { inherit fetchurl; });
nugetPackages = map
(x: {
name = "${x.name}.nupkg";
path = "${x}";
})
deps;
nugetSource = linkFarm "${pname}-${version}-packages" nugetPackages;
dotnetSdk = dotnetCorePackages.sdk_3_1;
runtimeId = "linux-x64";
disabledTest = [
# Self-updating is patched out, hence this test will fail
"FullyQualifiedName!=GitHub.Runner.Common.Tests.Listener.RunnerL0.TestRunOnceHandleUpdateMessage"
] ++ map
# Online tests
(x: "FullyQualifiedName!=GitHub.Runner.Common.Tests.Worker.ActionManagerL0.PrepareActions_${x}")
[
"DownloadActionFromGraph"
"DownloadActionFromGraph_Legacy"
"NotPullOrBuildImagesMultipleTimes"
"NotPullOrBuildImagesMultipleTimes_Legacy"
"RepositoryActionWithActionYamlFile_DockerHubImage"
"RepositoryActionWithActionYamlFile_DockerHubImage_Legacy"
"RepositoryActionWithActionfileAndDockerfile"
"RepositoryActionWithActionfileAndDockerfile_Legacy"
"RepositoryActionWithActionfile_DockerHubImage"
"RepositoryActionWithActionfile_DockerHubImage_Legacy"
"RepositoryActionWithActionfile_Dockerfile"
"RepositoryActionWithActionfile_Dockerfile_Legacy"
"RepositoryActionWithActionfile_DockerfileRelativePath"
"RepositoryActionWithActionfile_DockerfileRelativePath_Legacy"
"RepositoryActionWithActionfile_Node"
"RepositoryActionWithActionfile_Node_Legacy"
"RepositoryActionWithDockerfile"
"RepositoryActionWithDockerfile_Legacy"
"RepositoryActionWithDockerfileInRelativePath"
"RepositoryActionWithDockerfileInRelativePath_Legacy"
"RepositoryActionWithDockerfilePrepareActions_Repository"
"RepositoryActionWithInvalidWrapperActionfile_Node"
"RepositoryActionWithInvalidWrapperActionfile_Node_Legacy"
"RepositoryActionWithWrapperActionfile_PreSteps"
"RepositoryActionWithWrapperActionfile_PreSteps_Legacy"
] ++ map
(x: "FullyQualifiedName!=GitHub.Runner.Common.Tests.DotnetsdkDownloadScriptL0.${x}")
[
"EnsureDotnetsdkBashDownloadScriptUpToDate"
"EnsureDotnetsdkPowershellDownloadScriptUpToDate"
];
testFilterXml = lib.concatStringsSep "&" disabledTest;
in
stdenv.mkDerivation rec {
inherit pname version;
src = fetchFromGitHub {
owner = "actions";
repo = "runner";
rev = "183a3dd9a0d4d51feddc5fe9fa6c3b5f8b08343d"; # v${version}
sha256 = "sha256-fQH4QwdR8E76ckUjMCaKOsDjNoVBIWAw2YcFRrVucX8=";
};
nativeBuildInputs = [
dotnetSdk
dotnetPackages.Nuget
makeWrapper
autoPatchelfHook
];
buildInputs = [
curl # libcurl.so.4
libkrb5 # libgssapi_krb5.so.2
lttng-ust # liblttng-ust.so.0
stdenv.cc.cc.lib # libstdc++.so.6
zlib # libz.so.1
icu
];
patches = [
# Don't run Git, no restore on build/test
./patches/dir-proj.patch
# Replace some paths that originally point to Nix's read-only store
./patches/host-context-dirs.patch
# Use GetDirectory() to obtain "diag" dir
./patches/use-get-directory-for-diag.patch
# Don't try to install systemd service
./patches/dont-install-systemd-service.patch
# Don't try to self-update runner (cannot be disabled, see https://github.com/actions/runner/issues/485)
./patches/ignore-self-update.patch
];
postPatch = ''
# Relax the version requirement
substituteInPlace src/global.json \
--replace '3.1.302' '${dotnetSdk.version}'
# Disable specific tests
substituteInPlace src/dir.proj \
--replace 'dotnet test Test/Test.csproj' \
"dotnet test Test/Test.csproj --filter '${testFilterXml}'"
# Fix FHS path
substituteInPlace src/Test/L0/Util/IOUtilL0.cs \
--replace '/bin/ln' '${coreutils}/bin/ln'
'';
configurePhase = ''
runHook preConfigure
# Set up Nuget dependencies
export HOME=$(mktemp -d)
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DOTNET_NOLOGO=1
# Never use nuget.org
nuget sources Disable -Name "nuget.org"
# Restore the dependencies
dotnet restore src/ActionsRunner.sln \
--runtime "${runtimeId}" \
--source "${nugetSource}"
runHook postConfigure
'';
postConfigure = ''
# `crossgen` dependency is called during build
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}" \
$HOME/.nuget/packages/microsoft.netcore.app.runtime.${runtimeId}/*/tools/crossgen
'';
buildPhase = ''
runHook preBuild
dotnet msbuild \
-t:Build \
-p:PackageRuntime="${runtimeId}" \
-p:BUILDCONFIG="Release" \
-p:RunnerVersion="${version}" \
-p:GitInfoCommitHash="${src.rev}" \
src/dir.proj
runHook postBuild
'';
doCheck = true;
checkInputs = [ git ];
checkPhase = ''
runHook preCheck
mkdir -p _layout/externals
ln -s ${nodejs-12_x} _layout/externals/node12
# BUILDCONFIG needs to be "Debug"
dotnet msbuild \
-t:test \
-p:PackageRuntime="${runtimeId}" \
-p:BUILDCONFIG="Debug" \
-p:RunnerVersion="${version}" \
-p:GitInfoCommitHash="${src.rev}" \
src/dir.proj
runHook postCheck
'';
installPhase = ''
runHook preInstall
# Copy the built binaries to lib/ instead of bin/ as they
# have to be wrapped in the fixup phase to work
mkdir -p $out/lib
cp -r _layout/bin/. $out/lib/
# Delete debugging files
find "$out/lib" -type f -name '*.pdb' -delete
# Install the helper scripts to bin/ to resemble the upstream package
mkdir -p $out/bin
install -m755 src/Misc/layoutbin/runsvc.sh $out/bin/
install -m755 src/Misc/layoutbin/RunnerService.js $out/lib/
install -m755 src/Misc/layoutroot/run.sh $out/lib/
install -m755 src/Misc/layoutroot/config.sh $out/lib/
install -m755 src/Misc/layoutroot/env.sh $out/lib/
# Rewrite reference in helper scripts from bin/ to lib/
substituteInPlace $out/lib/run.sh --replace '"$DIR"/bin' "$out/lib"
substituteInPlace $out/lib/config.sh --replace './bin' "$out/lib"
# Make paths absolute
substituteInPlace $out/bin/runsvc.sh \
--replace './externals' "$out/externals" \
--replace './bin' "$out/lib"
# The upstream package includes Node 12 and expects it at the path
# externals/node12. As opposed to the official releases, we don't
# link the Alpine Node flavor.
mkdir -p $out/externals
ln -s ${nodejs-12_x} $out/externals/node12
runHook postInstall
'';
# Stripping breaks the binaries
dontStrip = true;
postFixup = ''
fix_rpath() {
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/lib/$1
}
wrap() {
makeWrapper $out/lib/$1 $out/bin/$1 \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (buildInputs ++ [ openssl ])} \
''${@:2}
}
fix_rpath Runner.Listener
fix_rpath Runner.PluginHost
fix_rpath Runner.Worker
wrap Runner.Listener
wrap Runner.PluginHost
wrap Runner.Worker
wrap run.sh
wrap env.sh
wrap config.sh --prefix PATH : ${lib.makeBinPath [ glibc.bin ]}
'';
meta = with lib; {
description = "Self-hosted runner for GitHub Actions";
homepage = "https://github.com/actions/runner";
license = licenses.mit;
maintainers = with maintainers; [ veehaitch ];
platforms = [ "x86_64-linux" ];
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,53 @@
From 4267ee7fa5169b4fd5ce732118769e559806a390 Mon Sep 17 00:00:00 2001
From: Vincent Haupert <mail@vincent-haupert.de>
Date: Sat, 13 Mar 2021 21:52:03 +0100
Subject: [PATCH] Patch dir.proj
Don't execute Git for GitInfoCommitHash property
Don't restore for build target
Don't restore for test target
---
src/dir.proj | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/dir.proj b/src/dir.proj
index 1c91e0c..8b27d3f 100644
--- a/src/dir.proj
+++ b/src/dir.proj
@@ -2,9 +2,6 @@
<Project ToolsVersion="14.0" DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="GenerateConstant">
- <Exec Command="git rev-parse HEAD" ConsoleToMSBuild="true">
- <Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitHash" />
- </Exec>
<Message Text="Building $(Product): $(GitInfoCommitHash) --- $(PackageRuntime)" Importance="high"/>
<ItemGroup>
@@ -39,14 +36,13 @@
</ItemGroup>
<Target Name="Build" DependsOnTargets="GenerateConstant">
- <MSBuild Targets="Restore" Projects="@(ProjectFiles)" StopOnFirstFailure="true" />
<MSBuild Targets="Publish" Projects="@(ProjectFiles)" BuildInParallel="false" StopOnFirstFailure="true" Properties="Configuration=$(BUILDCONFIG);PackageRuntime=$(PackageRuntime);Version=$(RunnerVersion);RuntimeIdentifier=$(PackageRuntime);PublishDir=$(MSBuildProjectDirectory)/../_layout/bin" />
<Exec Command="%22$(DesktopMSBuild)%22 Runner.Service/Windows/RunnerService.csproj /p:Configuration=$(BUILDCONFIG) /p:OutputPath=%22$(MSBuildProjectDirectory)/../_layout/bin%22" ConsoleToMSBuild="true" Condition="'$(PackageRuntime)' == 'win-x64' Or '$(PackageRuntime)' == 'win-x86'" />
</Target>
<Target Name="Test" DependsOnTargets="GenerateConstant">
- <Exec Command="dotnet build Test/Test.csproj -c $(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime)" ConsoleToMSBuild="true" />
- <Exec Command="dotnet test Test/Test.csproj --no-build --logger:trx" ConsoleToMSBuild="true" />
+ <Exec Command="dotnet build Test/Test.csproj --no-restore -c $(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime)" ConsoleToMSBuild="true" />
+ <Exec Command="dotnet test Test/Test.csproj --no-restore --no-build --logger:trx" ConsoleToMSBuild="true" />
</Target>
<Target Name="Layout" DependsOnTargets="Clean;Build">
@@ -84,4 +80,4 @@
<RemoveDir Directories="Test/bin" />
<RemoveDir Directories="Test/obj" />
</Target>
-</Project>
\ No newline at end of file
+</Project>
--
2.30.1

View File

@@ -0,0 +1,15 @@
diff --git a/src/Runner.Listener/Configuration/ConfigurationManager.cs b/src/Runner.Listener/Configuration/ConfigurationManager.cs
index 8d08b06..bdfa3a2 100644
--- a/src/Runner.Listener/Configuration/ConfigurationManager.cs
+++ b/src/Runner.Listener/Configuration/ConfigurationManager.cs
@@ -320,10 +320,6 @@ namespace GitHub.Runner.Listener.Configuration
serviceControlManager.ConfigureService(runnerSettings, command);
}
-#elif OS_LINUX || OS_OSX
- // generate service config script for OSX and Linux, GenerateScripts() will no-opt on windows.
- var serviceControlManager = HostContext.GetService<ILinuxServiceControlManager>();
- serviceControlManager.GenerateScripts(runnerSettings);
#endif
}

View File

@@ -0,0 +1,20 @@
diff --git a/src/Runner.Common/HostContext.cs b/src/Runner.Common/HostContext.cs
index d4ea48c..2ec8455 100644
--- a/src/Runner.Common/HostContext.cs
+++ b/src/Runner.Common/HostContext.cs
@@ -220,12 +220,13 @@ namespace GitHub.Runner.Common
case WellKnownDirectory.Externals:
path = Path.Combine(
- GetDirectory(WellKnownDirectory.Root),
+ new DirectoryInfo(GetDirectory(WellKnownDirectory.Bin)).Parent.FullName,
Constants.Path.ExternalsDirectory);
break;
case WellKnownDirectory.Root:
- path = new DirectoryInfo(GetDirectory(WellKnownDirectory.Bin)).Parent.FullName;
+ path = Environment.GetEnvironmentVariable("RUNNER_ROOT")
+ ?? new DirectoryInfo(GetDirectory(WellKnownDirectory.Bin)).Parent.FullName;
break;
case WellKnownDirectory.Temp:

View File

@@ -0,0 +1,24 @@
diff --git a/src/Runner.Listener/Runner.cs b/src/Runner.Listener/Runner.cs
index 68b0b4e..5da21fe 100644
--- a/src/Runner.Listener/Runner.cs
+++ b/src/Runner.Listener/Runner.cs
@@ -391,18 +391,7 @@ namespace GitHub.Runner.Listener
HostContext.WritePerfCounter($"MessageReceived_{message.MessageType}");
if (string.Equals(message.MessageType, AgentRefreshMessage.MessageType, StringComparison.OrdinalIgnoreCase))
{
- if (autoUpdateInProgress == false)
- {
- autoUpdateInProgress = true;
- var runnerUpdateMessage = JsonUtility.FromString<AgentRefreshMessage>(message.Body);
- var selfUpdater = HostContext.GetService<ISelfUpdater>();
- selfUpdateTask = selfUpdater.SelfUpdate(runnerUpdateMessage, jobDispatcher, !runOnce && HostContext.StartupType != StartupType.Service, HostContext.RunnerShutdownToken);
- Trace.Info("Refresh message received, kick-off selfupdate background process.");
- }
- else
- {
- Trace.Info("Refresh message received, skip autoupdate since a previous autoupdate is already running.");
- }
+ Trace.Info("Ignoring received refresh message (would trigger self-update).");
}
else if (string.Equals(message.MessageType, JobRequestMessageTypes.PipelineAgentJobRequest, StringComparison.OrdinalIgnoreCase))
{

View File

@@ -0,0 +1,25 @@
diff --git a/src/Runner.Common/HostContext.cs b/src/Runner.Common/HostContext.cs
index d4ea48c..15c1800 100644
--- a/src/Runner.Common/HostContext.cs
+++ b/src/Runner.Common/HostContext.cs
@@ -109,7 +109,7 @@ namespace GitHub.Runner.Common
}
// this should give us _diag folder under runner root directory
- string diagLogDirectory = Path.Combine(new DirectoryInfo(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)).Parent.FullName, Constants.Path.DiagDirectory);
+ string diagLogDirectory = GetDirectory(WellKnownDirectory.Diag);
_traceManager = new TraceManager(new HostTraceListener(diagLogDirectory, hostType, logPageSize, logRetentionDays), this.SecretMasker);
}
else
@@ -272,7 +272,10 @@ namespace GitHub.Runner.Common
throw new NotSupportedException($"Unexpected well known directory: '{directory}'");
}
- _trace.Info($"Well known directory '{directory}': '{path}'");
+ if (_trace != null)
+ {
+ _trace.Info($"Well known directory '{directory}': '{path}'");
+ }
return path;
}

View File

@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "dbmate";
version = "1.11.0";
version = "1.12.0";
src = fetchFromGitHub {
owner = "amacneil";
repo = "dbmate";
rev = "v${version}";
sha256 = "1q1hyrd1zlynyb0720fd1lwg22l3bwjbcak2aplh259p698gwyf5";
sha256 = "sha256-Kk8CtGw1lGNky2CUjaedh0IcDooaxWkeEnaYl/5jSTc=";
};
vendorSha256 = "197zpjvvv9xpfbw443kbxvhjmjqmx1h2bj1xl2vwgf0w64mkk84z";
vendorSha256 = "sha256-Qe3fwyEf/NiGmUSha/zZHRBR1okw2vE97u7tybqiWNI=";
doCheck = false;

View File

@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "github-commenter";
version = "0.8.0";
version = "0.9.0";
src = fetchFromGitHub {
owner = "cloudposse";
repo = pname;
rev = version;
sha256 = "HgiCgyig+49g275G6zZ0kGTxt1TSfFK8kt+SOf4ei74=";
sha256 = "sha256-IBo4FAoYX1FmrmQ9mlyyu1TGLY7dlH7pWalBoRb2puE=";
};
vendorSha256 = "Gw+cR5sA5MGuclcvur8olmRtK04LDP5vKJ5k7yZO3B0=";
vendorSha256 = "sha256-H1SnNG+/ALYs7h/oT8zWBhAXOuCFY0Sto2ATBBZg2ek=";
meta = with lib; {
description = "Command line utility for creating GitHub comments on Commits, Pull Request Reviews or Issues";

View File

@@ -2,13 +2,13 @@
buildGoPackage rec {
pname = "go-toml";
version = "1.8.1";
version = "1.9.0";
src = fetchFromGitHub {
owner = "pelletier";
repo = pname;
rev = "v${version}";
sha256 = "1pi1r9ds0vxjza4qrbk52y98wxrzh1ghwzc9c2v1w6i02pdwdcz9";
sha256 = "sha256-m8VgjfNDxSX6fRG2/gEJlVc9hCnua+o79ttrd8P20kU=";
};
goPackagePath = "github.com/pelletier/go-toml";

View File

@@ -1,12 +1,12 @@
{ stdenv, lib, fetchzip, jdk, makeWrapper, coreutils, curl }:
stdenv.mkDerivation rec {
version = "0.69.2";
version = "0.70.0";
pname = "jbang";
src = fetchzip {
url = "https://github.com/jbangdev/jbang/releases/download/v${version}/${pname}-${version}.tar";
sha256 = "sha256-MsVmsZOupkJWGyoTxxQavcO78X4MMuIqJXaPSbd/Tgg=";
sha256 = "sha256-Fy7TvWJVRJI5fhfZzMuW+KBLaVLWKjk/I3Kx60Wazyo=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@@ -2,13 +2,13 @@
buildGoModule rec {
pname = "lazygit";
version = "0.26.1";
version = "0.27.3";
src = fetchFromGitHub {
owner = "jesseduffield";
repo = pname;
rev = "v${version}";
sha256 = "sha256-naTO5cckUfs32z7bm5jGGEuo8db11fnTnQdUDKK2W/I=";
sha256 = "sha256-giHAeD7hhda9YV+NQuZ6w0eow79egGhUCIX0dPvhrWk=";
};
vendorSha256 = null;

View File

@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
pname = "metals";
version = "0.10.0";
version = "0.10.1";
deps = stdenv.mkDerivation {
name = "${pname}-deps-${version}";
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
'';
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "1v9br6nad6yhq9y1z4b9z6xdsjrgqh7wlxww7vp7ws28cg85mqyg";
outputHash = "0z4ddnwx510hnx6w72fxmksmnwxg8p2nqxg7i7xix24gykgmgj5a";
};
nativeBuildInputs = [ makeWrapper ];

View File

@@ -13,19 +13,29 @@
let ccache = stdenv.mkDerivation rec {
pname = "ccache";
version = "4.2";
version = "4.2.1";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "1lr9804xyzbs72f9jbbzy1fjqxwrwpb4rp431wqialvms4251d8f";
hash = "sha256-AmgJpW7AGCSggbHp1fLO5yhXS9LIm7O77nQdDERJYAA=";
};
patches = lib.optional stdenv.isDarwin (substituteAll {
src = ./force-objdump-on-darwin.patch;
objdump = "${binutils.bintools}/bin/objdump";
});
patches = [
# test/run use compgen to get environment variable names, but
# compgen isn't available in non-interactive bash.
./env-instead-of-compgen.patch
# When building for Darwin, test/run uses dwarfdump, whereas on
# Linux it uses objdump. We don't have dwarfdump packaged for
# Darwin, so this patch updates the test to also use objdump on
# Darwin.
(substituteAll {
src = ./force-objdump-on-darwin.patch;
objdump = "${binutils.bintools}/bin/objdump";
})
];
nativeBuildInputs = [ asciidoc cmake perl ];
@@ -38,7 +48,7 @@ let ccache = stdenv.mkDerivation rec {
checkPhase = ''
export HOME=$(mktemp -d)
ctest --output-on-failure ${lib.optionalString stdenv.isDarwin ''
-E '^(test.nocpp2|test.modules)$'
-E '^(test.nocpp2|test.basedir|test.multi_arch)$'
''}
'';

View File

@@ -0,0 +1,18 @@
diff --git a/test/run b/test/run
index cbdd98f0..bc930200 100755
--- a/test/run
+++ b/test/run
@@ -346,11 +346,11 @@ expect_perm() {
}
reset_environment() {
- while IFS= read -r name; do
+ while IFS='=' read -r name value; do
if [[ $name =~ ^CCACHE_[A-Z0-9_]*$ ]]; then
unset $name
fi
- done < <(compgen -e)
+ done < <(env)
unset GCC_COLORS
unset TERM

View File

@@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "openfpgaloader";
version = "0.2.5";
version = "0.2.6";
src = fetchFromGitHub {
owner = "trabucayre";
repo = "openFPGALoader";
rev = "v${version}";
sha256 = "sha256-Qbw+vmpxiZXTGM0JwpS5mGzcsSJNegsvmncm+cOVrVE=";
sha256 = "sha256-OWRMWNOPm6flgeTKYWYE+LcG3HW6i8s2NQ1dr/oeOEw=";
};
nativeBuildInputs = [ cmake pkg-config ];

View File

@@ -2,13 +2,16 @@
python3Packages.buildPythonApplication rec {
pname = "usbsdmux";
version = "0.1.8";
version = "0.2.0";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "0m3d0rs9s5v5hnsjkfybmd8v54gn7rc1dbg5vc48rryhc969pr9f";
sha256 = "sha256-ydDUSqBTY62iOtWdgrFh2qrO9LMi+OCYIw5reh6uoIA=";
};
# usbsdmux is not meant to be used as an importable module and has no tests
doCheck = false;
meta = with lib; {
description = "Control software for the LXA USB-SD-Mux";
homepage = "https://github.com/linux-automation/usbsdmux";

View File

@@ -4,6 +4,8 @@ buildDunePackage rec {
version = "1.8.2";
pname = "ocp-indent";
useDune2 = true;
src = fetchzip {
url = "https://github.com/OCamlPro/ocp-indent/archive/${version}.tar.gz";
sha256 = "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3";

View File

@@ -2,13 +2,13 @@
buildGoPackage rec {
pname = "protoc-gen-twirp";
version = "7.1.1";
version = "7.2.0";
src = fetchFromGitHub {
owner = "twitchtv";
repo = "twirp";
rev = "v${version}";
sha256 = "sha256-GN7akAp0zzS8wVhgXlT1ceFUFKH4Sz74XQ8ofIE8T/k=";
sha256 = "sha256-W7t36F1St0YLPowHaZSboVNnvX7E2Lg5tPWeyeUSabA=";
};
goPackagePath = "github.com/twitchtv/twirp";
@@ -18,6 +18,8 @@ buildGoPackage rec {
"protoc-gen-twirp_python"
];
doCheck = true;
meta = with lib; {
description = "A simple RPC framework with protobuf service definitions";
homepage = "https://github.com/twitchtv/twirp";

View File

@@ -7,16 +7,16 @@
rustPlatform.buildRustPackage rec {
pname = "cargo-deny";
version = "0.9.0";
version = "0.9.1";
src = fetchFromGitHub {
owner = "EmbarkStudios";
repo = pname;
rev = version;
sha256 = "sha256-ZjXAZN93ij42WVYSOgvKAzFZ/cZ2RTFKT2sr44j7TVc=";
sha256 = "sha256-v7Gdemn0IeO6lOg/kT6VKuL5ZSOqA9A721Wv5QStO2Q=";
};
cargoSha256 = "sha256-eQv9pFegHTjjjFURiD/yN/srtONAwAH3vwfrSY/LM/Q=";
cargoSha256 = "sha256-SF7LfxmUMX7f+9BmYTzdjTFplXj5j0e181yRVTIEGH4=";
doCheck = false;

View File

@@ -1,16 +1,58 @@
{ pkgs, callPackage, CoreServices }:
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, cmake
, libiconv
, useMimalloc ? false
, doCheck ? true
}:
{
rust-analyzer-unwrapped = callPackage ./generic.nix rec {
rev = "2021-03-22";
version = "unstable-${rev}";
sha256 = "sha256-Q8yr5x4+R9UCk5kw/nJgBtGVBeZTDwyuwpyNJUKSPzA=";
cargoSha256 = "sha256-cJ5KPNrX1H4IfHENDGyU2rgxl5TTqvoeXk7558oqwuA=";
let
rev = "2021-04-05";
in
inherit CoreServices;
rustPlatform.buildRustPackage {
pname = "rust-analyzer-unwrapped";
version = "unstable-${rev}";
cargoSha256 = "sha256-kDwdKa08E0h24lOOa7ALeNqHlMjMry/ru1qwCIyKmuE=";
src = fetchFromGitHub {
owner = "rust-analyzer";
repo = "rust-analyzer";
inherit rev;
sha256 = "sha256-ZDxy87F3uz8bTF1/2LIy5r4Nv/M3xe97F7mwJNEFcUs=";
};
rust-analyzer = callPackage ./wrapper.nix {} {
unwrapped = pkgs.rust-analyzer-unwrapped;
buildAndTestSubdir = "crates/rust-analyzer";
cargoBuildFlags = lib.optional useMimalloc "--features=mimalloc";
nativeBuildInputs = lib.optional useMimalloc cmake;
buildInputs = lib.optionals stdenv.isDarwin [
CoreServices
libiconv
];
RUST_ANALYZER_REV = rev;
inherit doCheck;
preCheck = lib.optionalString doCheck ''
export RUST_SRC_PATH=${rustPlatform.rustLibSrc}
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
versionOutput="$($out/bin/rust-analyzer --version)"
echo "'rust-analyzer --version' returns: $versionOutput"
[[ "$versionOutput" == "rust-analyzer ${rev}" ]]
runHook postInstallCheck
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "An experimental modular compiler frontend for the Rust language";
homepage = "https://github.com/rust-analyzer/rust-analyzer";
license = with licenses; [ mit asl20 ];
maintainers = with maintainers; [ oxalica ];
};
}

View File

@@ -1,57 +0,0 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, cmake
, libiconv
, useMimalloc ? false
, doCheck ? true
# Version specific args
, rev, version, sha256, cargoSha256
}:
rustPlatform.buildRustPackage {
pname = "rust-analyzer-unwrapped";
inherit version cargoSha256;
src = fetchFromGitHub {
owner = "rust-analyzer";
repo = "rust-analyzer";
inherit rev sha256;
};
buildAndTestSubdir = "crates/rust-analyzer";
cargoBuildFlags = lib.optional useMimalloc "--features=mimalloc";
nativeBuildInputs = lib.optional useMimalloc cmake;
buildInputs = lib.optionals stdenv.isDarwin [
CoreServices
libiconv
];
RUST_ANALYZER_REV = rev;
inherit doCheck;
preCheck = lib.optionalString doCheck ''
export RUST_SRC_PATH=${rustPlatform.rustLibSrc}
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
versionOutput="$($out/bin/rust-analyzer --version)"
echo "'rust-analyzer --version' returns: $versionOutput"
[[ "$versionOutput" == "rust-analyzer ${rev}" ]]
runHook postInstallCheck
'';
passthru.updateScript = ./update.sh;
patches = [ ./rust_1_49.patch ];
meta = with lib; {
description = "An experimental modular compiler frontend for the Rust language";
homepage = "https://github.com/rust-analyzer/rust-analyzer";
license = with licenses; [ mit asl20 ];
maintainers = with maintainers; [ oxalica ];
};
}

View File

@@ -1,13 +0,0 @@
diff --git a/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs b/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs
index 4e75a7b14..91f51a1a7 100644
--- a/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs
+++ b/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs
@@ -93,7 +93,7 @@ fn validate_method_call_expr(
let krate = module.krate();
let iter_trait = FamousDefs(sema, Some(krate)).core_iter_Iterator()?;
- it_type.impls_trait(sema.db, iter_trait, &[]).then(|| (expr, receiver))
+ if it_type.impls_trait(sema.db, iter_trait, &[]) { Some((expr, receiver)) } else { None }
}
#[cfg(test)]

View File

@@ -25,7 +25,7 @@ echo "$old_rev -> $rev"
sha256=$(nix-prefetch -f "$nixpkgs" rust-analyzer-unwrapped.src --rev "$rev")
# Clear cargoSha256 to avoid inconsistency.
sed -e "s#rev = \".*\"#rev = \"$rev\"#" \
-e "s#sha256 = \".*\"#sha256 = \"$sha256\"#" \
-e "/fetchFromGitHub/,/}/ s#sha256 = \".*\"#sha256 = \"$sha256\"#" \
-e "s#cargoSha256 = \".*\"#cargoSha256 = \"sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\"#" \
--in-place ./default.nix
node_src="$(nix-build "$nixpkgs" -A rust-analyzer.src --no-out-link)/editors/code"

View File

@@ -1,17 +1,15 @@
{ lib, rustPlatform, runCommandNoCC, makeWrapper }:
lib.makeOverridable ({
unwrapped,
pname ? "rust-analyzer",
version ? unwrapped.version,
{ lib, rustPlatform, runCommand, makeWrapper, rust-analyzer-unwrapped
, pname ? "rust-analyzer"
, version ? rust-analyzer-unwrapped.version
# Use name from `RUST_SRC_PATH`
rustSrc ? rustPlatform.rustLibSrc,
}: runCommandNoCC "${pname}-${version}" {
, rustSrc ? rustPlatform.rustLibSrc
}:
runCommand "${pname}-${version}" {
inherit pname version;
inherit (unwrapped) src meta;
inherit (rust-analyzer-unwrapped) src meta;
nativeBuildInputs = [ makeWrapper ];
} ''
mkdir -p $out/bin
makeWrapper ${unwrapped}/bin/rust-analyzer $out/bin/rust-analyzer \
makeWrapper ${rust-analyzer-unwrapped}/bin/rust-analyzer $out/bin/rust-analyzer \
--set-default RUST_SRC_PATH "${rustSrc}"
'')
''

View File

@@ -0,0 +1,28 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "tf2pulumi";
version = "0.10.0";
src = fetchFromGitHub {
owner = "pulumi";
repo = "tf2pulumi";
rev = "v${version}";
sha256 = "199c4hd236mfz9c44rpzpbr3w3fjj8pbw656jd9k3v2igzw942c7";
};
vendorSha256 = "1cwyag67q0361szfjv1cyi51cg1bbmkpy34y33hn53aa55pkm1fw";
buildFlagsArray = ''
-ldflags=-s -w -X=github.com/pulumi/tf2pulumi/version.Version=${src.rev}
'';
subPackages = [ "." ];
meta = with lib; {
description = "Convert Terraform projects to Pulumi TypeScript programs";
homepage = "https://www.pulumi.com/tf2pulumi/";
license = licenses.asl20;
maintainers = with maintainers; [ mausch ];
};
}