python312Packages.mandown: 1.10.0 -> 1.10.1 (#370595)
[NixPkgs.git] / pkgs / by-name / ro / roadrunner / package.nix
blob772e636cd55f422d36cd3e8783b15ecf4b70ff5d
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   installShellFiles,
6 }:
8 buildGoModule rec {
9   pname = "roadrunner";
10   version = "2024.3.1";
12   src = fetchFromGitHub {
13     repo = "roadrunner";
14     owner = "roadrunner-server";
15     tag = "v${version}";
16     hash = "sha256-S5QDooao0PJkpu85xcHLhg/s3wyJUwhg/DSD4KITHyw=";
17   };
19   nativeBuildInputs = [
20     installShellFiles
21   ];
23   # Flags as provided by the build automation of the project:
24   # https://github.com/roadrunner-server/roadrunner/blob/fe572d0eceae8fd05225fbd99ba50a9eb10c4393/.github/workflows/release.yml#L89
25   ldflags = [
26     "-s"
27     "-X=github.com/roadrunner-server/roadrunner/v2023/internal/meta.version=${version}"
28     "-X=github.com/roadrunner-server/roadrunner/v2023/internal/meta.buildTime=1970-01-01T00:00:00Z"
29   ];
31   postInstall = ''
32     installShellCompletion --cmd rr \
33       --bash <($out/bin/rr completion bash) \
34       --zsh <($out/bin/rr completion zsh) \
35       --fish <($out/bin/rr completion fish)
36   '';
38   postPatch = ''
39     substituteInPlace internal/rpc/client_test.go \
40       --replace "127.0.0.1:55555" "127.0.0.1:55554"
42     substituteInPlace internal/rpc/test/config_rpc_ok.yaml \
43       --replace "127.0.0.1:55555" "127.0.0.1:55554"
45     substituteInPlace internal/rpc/test/config_rpc_conn_err.yaml \
46       --replace "127.0.0.1:0" "127.0.0.1:55554"
47   '';
49   vendorHash = "sha256-xd2iJqONpjwHV0Zp8k6iXnDXdpaluMIE9o9E3MLFkrQ=";
51   meta = {
52     changelog = "https://github.com/roadrunner-server/roadrunner/blob/v${version}/CHANGELOG.md";
53     description = "High-performance PHP application server, process manager written in Go and powered with plugins";
54     homepage = "https://roadrunner.dev";
55     license = lib.licenses.mit;
56     mainProgram = "rr";
57     maintainers = with lib.maintainers; [ shyim ];
58   };