Unverified Commit 1d1bfea9 authored by nixpkgs-ci[bot]'s avatar nixpkgs-ci[bot] Committed by GitHub
Browse files

somo: 1.1.0 -> 1.3.0 (#439590)

parents 9f9c49a1 9d52e9b8
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -5,21 +5,23 @@
  fetchFromGitHub,
  installShellFiles,
  versionCheckHook,
  libredirect,
  iana-etc,
  nix-update-script,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "somo";
  version = "1.1.0";
  version = "1.3.0";

  src = fetchFromGitHub {
    owner = "theopfr";
    repo = "somo";
    tag = "v${finalAttrs.version}";
    hash = "sha256-HUTaBSy3FemAQH1aKZYTJnUWiq0bU/H6c5Gz3yamPiA=";
    hash = "sha256-k7PDCylA6KR/S1dQDSMIoOELPYwJ25dz1u+PM6ITGKg=";
  };

  cargoHash = "sha256-e3NrEfbWz6h9q4TJnn8jnRmMJbeaEc4Yo3hFlaRLzzQ=";
  cargoHash = "sha256-i3GmdBqCWPeslpr2zzOR4r8PgMP7EkC1mNFI7jSWO34=";

  nativeBuildInputs = [
    installShellFiles
@@ -29,6 +31,14 @@ rustPlatform.buildRustPackage (finalAttrs: {
    rustPlatform.bindgenHook
  ];

  nativeCheckInputs = [
    libredirect.hook
  ];

  preCheck = ''
    export NIX_REDIRECTS=/etc/services=${iana-etc}/etc/services
  '';

  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    installShellCompletion --cmd somo \
      --bash <("$out/bin/somo" generate-completions bash) \