2022-01-01 17:55:14 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, ncurses, openssl, pkg-config, stdenv, Security, fetchpatch }:
|
2021-10-10 02:50:44 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wiki-tui";
|
2022-01-01 17:55:14 +00:00
|
|
|
version = "0.4.3";
|
2021-10-10 02:50:44 +01:00
|
|
|
|
2021-11-05 20:10:43 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Builditluc";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-01-01 17:55:14 +00:00
|
|
|
sha256 = "sha256-maN/0lJx6/lj3Zn+IZcPJFPPFVLbnpwxeMSTyzKYX6s=";
|
2021-10-10 02:50:44 +01:00
|
|
|
};
|
|
|
|
|
2022-01-01 17:55:14 +00:00
|
|
|
# latest update forgot to include cargo.lock update
|
|
|
|
cargoPatches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Builditluc/wiki-tui/commit/87993eaca35a14afc1fb557482b099a6dd2da911.patch";
|
|
|
|
sha256 = "sha256-n04FCZwQ9pPanz9QQY/7Apyoy6lG0t/23S40p4c/TXw=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-11-05 20:30:48 +00:00
|
|
|
buildInputs = [ ncurses openssl ] ++ lib.optional stdenv.isDarwin Security;
|
2021-10-10 02:50:44 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2022-01-01 17:55:14 +00:00
|
|
|
cargoSha256 = "sha256-x4oS9IBF2GMcilv9Oi/IeFaCM3sxWn7PpkKcaeSqIog=";
|
2021-10-10 02:50:44 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple and easy to use Wikipedia Text User Interface";
|
|
|
|
homepage = "https://github.com/builditluc/wiki-tui";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ legendofmiracles ];
|
|
|
|
mainProgram = "wiki-tui";
|
|
|
|
};
|
|
|
|
}
|