diff --git a/pkgs/development/tools/railway/default.nix b/pkgs/development/tools/railway/default.nix index 43eb79c0e1a4a..7cac6d50d66c3 100644 --- a/pkgs/development/tools/railway/default.nix +++ b/pkgs/development/tools/railway/default.nix @@ -1,28 +1,32 @@ -{ buildGoModule, fetchFromGitHub, lib }: +{ lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, stdenv, CoreServices +, Security }: -buildGoModule rec { +rustPlatform.buildRustPackage rec { pname = "railway"; - version = "2.1.0"; + version = "3.0.12"; src = fetchFromGitHub { owner = "railwayapp"; repo = "cli"; rev = "v${version}"; - sha256 = "sha256-JpIy8u6L7yOZgTFxFft+vhcat3uPT9EvOXAQOmrpvpc="; + hash = "sha256-2RdB/X62/9HKKax+Y+RYPrLEHsWwzOwzJ1Go930bYN0="; }; - ldflags = [ "-s" "-w" ]; + cargoHash = "sha256-Aozg/Pyo7JlTEXul3MEfGLwbRo/qjogWeAUHzK8xssc="; - vendorHash = "sha256-nLuomuAScodgLUKzMTiygtFBnNHrqAojOySZgKLVGJY="; + nativeBuildInputs = [ pkg-config ]; - postInstall = '' - mv $out/bin/cli $out/bin/railway - ''; + buildInputs = [ openssl ] + ++ lib.optionals stdenv.isDarwin [ CoreServices Security ]; + + OPENSSL_NO_VENDOR = 1; meta = with lib; { - description = "Railway CLI"; - homepage = "https://railway.app"; + mainProgram = "railway"; + description = "Railway.app CLI"; + homepage = "https://github.com/railwayapp/cli"; + changelog = "https://github.com/railwayapp/cli/releases/tag/v${version}"; license = licenses.mit; - maintainers = with maintainers; [ Crafter ]; + maintainers = with maintainers; [ Crafter techknowlogick ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1fcd5e503c0b0..e0470625d16ba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11488,7 +11488,9 @@ with pkgs; raider = callPackage ../applications/misc/raider { }; - railway = callPackage ../development/tools/railway { }; + railway = callPackage ../development/tools/railway { + inherit (darwin.apple_sdk.frameworks) CoreServices Security; + }; quota = if stdenv.isLinux then linuxquota else unixtools.quota;