Unverified Commit 267461da authored by Donovan Glover's avatar Donovan Glover Committed by GitHub
Browse files

rails-new: init at 0.5.0 (#384913)

parents 4335e240 50696930
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4529,6 +4529,12 @@
    github = "CnTeng";
    githubId = 56501688;
  };
  coat = {
    email = "kentsmith@gmail.com";
    name = "Kent Smith";
    github = "coat";
    githubId = 1661;
  };
  cobalt = {
    email = "cobalt@cobalt.rocks";
    github = "Chaostheorie";
+36 −0
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  rustPlatform,
  nix-update-script,
  versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
  pname = "rails-new";
  version = "0.5.0";

  src = fetchFromGitHub {
    owner = "rails";
    repo = "rails-new";
    tag = "v${version}";
    hash = "sha256-7hEdLu9Koi2K2EFIl530yA+BGZmATFCcBMe3htYb0rs=";
  };

  useFetchCargoVendor = true;

  cargoHash = "sha256-FrndtE9hjP1WswfOYJM4LW1UsE8S9QXthYO7P3nzs2I=";

  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgramArg = "--version";
  doInstallCheck = true;

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Generate new Rails applications without having to install Ruby";
    homepage = "https://github.com/rails/rails-new";
    license = lib.licenses.mit;
    mainProgram = "rails-new";
    maintainers = with lib.maintainers; [ coat ];
  };
}