Skip to content

Commit

Permalink
roadrunner: init at 2023.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Aug 16, 2023
1 parent 4ed9856 commit 2375c0f
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
57 changes: 57 additions & 0 deletions pkgs/servers/roadrunner/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:

buildGoModule rec {
pname = "roadrunner";
version = "2023.2.2";
src = fetchFromGitHub {
repo = "roadrunner";
owner = "roadrunner-server";
rev = "v${version}";
hash = "sha256-tkJ7MDFHWps6bCppFJXMFYQl7+i8OhuDVrk1n78rrUc";
};

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"
'';

vendorHash = "sha256-pRZaJ1PBtshhna71V86IJ0VKs0u9wCFG27mghcE/8xY";

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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40719,6 +40719,8 @@ with pkgs;

rivalcfg = callPackage ../misc/rivalcfg { };

roadrunner = callPackage ../servers/roadrunner { };

rmfakecloud = callPackage ../servers/rmfakecloud { };

rmfuse = callPackage ../tools/filesystems/rmfuse { };
Expand Down

0 comments on commit 2375c0f

Please sign in to comment.