nixpkgs/pkgs/servers/roadrunner/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.7 KiB
Nix
Raw Normal View History

2023-04-19 23:36:45 +02:00
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
pname = "roadrunner";
2023-11-12 14:55:17 +01:00
version = "2023.3.4";
2023-04-19 23:36:45 +02:00
src = fetchFromGitHub {
repo = "roadrunner";
owner = "roadrunner-server";
rev = "v${version}";
2023-11-12 14:55:17 +01:00
hash = "sha256-khG0T88TR7hg9OO7E9eCGTB3q3c5r94nANSZ1J6vCj0=";
2023-04-19 23:36:45 +02:00
};
nativeBuildInputs = [
installShellFiles
];
# Flags as provided by the build automation of the project:
# https://github.com/roadrunner-server/roadrunner/blob/fe572d0eceae8fd05225fbd99ba50a9eb10c4393/.github/workflows/release.yml#L89
ldflags = [
"-s"
"-X github.com/roadrunner-server/roadrunner/v2023/internal/meta.version=${version}"
"-X github.com/roadrunner-server/roadrunner/v2023/internal/meta.buildTime=1970-01-01T00:00:00Z"
];
postInstall = ''
installShellCompletion --cmd rr \
--bash <($out/bin/rr completion bash) \
--zsh <($out/bin/rr zsh) \
--fish <($out/bin/rr fish)
'';
postPatch = ''
substituteInPlace internal/rpc/client_test.go \
--replace "127.0.0.1:55555" "127.0.0.1:55554"
substituteInPlace internal/rpc/test/config_rpc_ok.yaml \
--replace "127.0.0.1:55555" "127.0.0.1:55554"
substituteInPlace internal/rpc/test/config_rpc_conn_err.yaml \
--replace "127.0.0.1:0" "127.0.0.1:55554"
'';
2023-11-12 14:55:17 +01:00
vendorHash = "sha256-UP+a47EALxFTxMl9yxinF4QiifQXAgAZ6ZOt9ebhlDc=";
2023-04-19 23:36:45 +02:00
meta = {
changelog = "https://github.com/roadrunner-server/roadrunner/blob/v${version}/CHANGELOG.md";
description = "High-performance PHP application server, process manager written in Go and powered with plugins";
homepage = "https://roadrunner.dev";
license = lib.licenses.mit;
mainProgram = "rr";
maintainers = with lib.maintainers; [ shyim ];
};
}