Unverified Commit be8ffc17 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #231562 from figsoda/chit

chit: update Cargo.lock, unpin openssl, add figsoda as a maintainer
parents b985bb86 f6e1f980
Loading
Loading
Loading
Loading
+1872 −0

File added.

Preview size limit exceeded, changes collapsed.

+21 −7
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, stdenv
, openssl
, darwin
}:

@@ -13,13 +18,22 @@ rustPlatform.buildRustPackage rec {
    sha256 = "0iixczy3cad44j2d7zzj8f3lnmp4jwnb0snmwfgiq3vj9wrn28pz";
  };

  cargoSha256 = "1y6k24p4m67v5773rzid2r0jwxp9piggrp0462z446hbcam2r4gd";
  cargoLock = {
    lockFile = ./Cargo.lock;
  };

  nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
  buildInputs = []
  ++ lib.optionals stdenv.isLinux [ openssl ]
  ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices Security ])
  ;

  buildInputs = lib.optionals stdenv.isLinux [
    openssl
  ] ++ lib.optionals stdenv.isDarwin [
    darwin.apple_sdk.frameworks.Security
  ];

  # update Carg.lock to work with openssl 3
  postPatch = ''
    ln -sf ${./Cargo.lock} Cargo.lock
  '';

  meta = with lib; {
    description = "Crate help in terminal: A tool for looking up details about rust crates without going to crates.io";
@@ -36,6 +50,6 @@ rustPlatform.buildRustPackage rec {
    '';
    homepage = "https://github.com/peterheesterman/chit";
    license = licenses.mit;
    maintainers = [ maintainers.lilyball ];
    maintainers = with maintainers; [ figsoda lilyball ];
  };
}