Unverified Commit 95500858 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

rq: cleanup (#399615)

parents 6a04e6a8 05967b72
Loading
Loading
Loading
Loading
+22 −10
Original line number Diff line number Diff line
@@ -2,17 +2,19 @@
  lib,
  rustPlatform,
  fetchFromGitHub,
  versionCheckHook,
  nix-update-script,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "rq";
  version = "1.0.4";

  src = fetchFromGitHub {
    owner = "dflemstr";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-QyYTbMXikLSe3eYJRUALQJxUJjA6VlvaLMwGrxIKfZI=";
    repo = "rq";
    tag = "v${finalAttrs.version}";
    hash = "sha256-QyYTbMXikLSe3eYJRUALQJxUJjA6VlvaLMwGrxIKfZI=";
  };

  useFetchCargoVendor = true;
@@ -22,24 +24,34 @@ rustPlatform.buildRustPackage rec {
    # Remove #[deny(warnings)] which is equivalent to -Werror in C.
    # Prevents build failures when upgrading rustc, which may give more warnings.
    substituteInPlace src/lib.rs \
      --replace "#![deny(warnings)]" ""
      --replace-fail "#![deny(warnings)]" ""

    # build script tries to get version information from git
    # this fixes the --version output
    rm build.rs
  '';

  VERGEN_SEMVER = version;
  VERGEN_SEMVER = finalAttrs.version;

  meta = with lib; {
  nativeInstallCheckInputs = [
    versionCheckHook
  ];
  versionCheckProgramArg = "--version";
  doInstallCheck = true;

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

  meta = {
    description = "Tool for doing record analysis and transformation";
    mainProgram = "rq";
    homepage = "https://github.com/dflemstr/rq";
    license = with licenses; [ asl20 ];
    maintainers = with maintainers; [
    license = with lib.licenses; [ asl20 ];
    maintainers = with lib.maintainers; [
      aristid
      Br1ght0ne
      figsoda
    ];
  };
}
})