2023-09-14 12:54:31 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-07-23 09:49:53 +00:00
|
|
|
, fetchFromGitLab
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
2023-09-14 12:54:31 +00:00
|
|
|
, libgit2
|
2020-07-23 09:49:53 +00:00
|
|
|
, openssl
|
|
|
|
, sqlite
|
|
|
|
, libiconv
|
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "terminal-typeracer";
|
2023-09-14 12:54:31 +00:00
|
|
|
version = "2.1.3";
|
2020-07-23 09:49:53 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "ttyperacer";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-09-14 12:54:31 +00:00
|
|
|
hash = "sha256-S3OW6KihRd6ReTWUXRb1OWC7+YoxehjFRBxcnJVgImU=";
|
2020-07-23 09:49:53 +00:00
|
|
|
};
|
|
|
|
|
2023-09-14 12:54:31 +00:00
|
|
|
cargoHash = "sha256-OwbFIbKB/arj+3gq2tfEq8yTKSUPBQNYJNzrWvDv4A4=";
|
2020-07-23 09:49:53 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2023-09-14 12:54:31 +00:00
|
|
|
buildInputs = [ libgit2 openssl sqlite ] ++ lib.optionals stdenv.isDarwin [ libiconv Security ];
|
|
|
|
|
|
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
LIBGIT2_NO_VENDOR = 1;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-07-23 09:49:53 +00:00
|
|
|
description = "An open source terminal based version of Typeracer written in rust";
|
|
|
|
homepage = "https://gitlab.com/ttyperacer/terminal-typeracer";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ yoctocell ];
|
2022-04-01 19:34:55 +00:00
|
|
|
mainProgram = "typeracer";
|
2021-12-03 15:02:43 +00:00
|
|
|
platforms = platforms.unix;
|
2020-07-23 09:49:53 +00:00
|
|
|
};
|
|
|
|
}
|