2021-06-01 00:28:25 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
2023-04-15 22:16:19 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gmp
|
|
|
|
, mpfr
|
|
|
|
, libmpc
|
2021-06-01 00:28:25 +00:00
|
|
|
}:
|
2023-04-15 22:16:19 +00:00
|
|
|
|
2021-06-01 00:28:25 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2021-06-03 19:29:19 +00:00
|
|
|
pname = "kalker";
|
2024-10-04 02:48:53 +00:00
|
|
|
version = "2.2.1";
|
2021-06-01 00:28:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PaddiM8";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-10-04 02:48:53 +00:00
|
|
|
hash = "sha256-fFeHL+Q1Y0J3rOgbFA952rjae/OQgHTznDI0Kya1KMQ=";
|
2021-06-01 00:28:25 +00:00
|
|
|
};
|
|
|
|
|
2024-10-04 02:48:53 +00:00
|
|
|
cargoHash = "sha256-hgtSDPQRrqhQALqzVW8z9xXqIv+v5/Sbs6McrUCKiaU=";
|
2021-06-01 00:28:25 +00:00
|
|
|
|
2021-09-22 19:25:52 +00:00
|
|
|
buildInputs = [ gmp mpfr libmpc ];
|
2021-06-01 00:28:25 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "lib" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
moveToOutput "lib" "$lib"
|
|
|
|
'';
|
|
|
|
|
2023-07-20 20:35:54 +00:00
|
|
|
env.CARGO_FEATURE_USE_SYSTEM_LIBS = "1";
|
2021-09-22 19:25:52 +00:00
|
|
|
|
2021-06-01 00:28:25 +00:00
|
|
|
meta = with lib; {
|
2021-06-03 19:29:19 +00:00
|
|
|
homepage = "https://kalker.strct.net";
|
|
|
|
changelog = "https://github.com/PaddiM8/kalker/releases/tag/v${version}";
|
2021-06-01 00:28:25 +00:00
|
|
|
description = "Command line calculator";
|
|
|
|
longDescription = ''
|
|
|
|
A command line calculator that supports math-like syntax with user-defined
|
|
|
|
variables, functions, derivation, integration, and complex numbers
|
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
2023-04-15 22:16:19 +00:00
|
|
|
maintainers = with maintainers; [ figsoda lovesegfault ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "kalker";
|
2021-06-01 00:28:25 +00:00
|
|
|
};
|
|
|
|
}
|