2021-06-04 09:07:49 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
2023-04-29 16:46:19 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gmp
|
|
|
|
, mpfr
|
|
|
|
, libmpc
|
2021-06-04 09:07:49 +00:00
|
|
|
}:
|
2023-04-29 16:46:19 +00:00
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "kalker";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.2.0";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PaddiM8";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Ri0Os+/AqGWgf/2V5D7xvelOC3JTOMjNzjq56mhA3G4=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
cargoHash = "sha256-0+NYbVMIUarLppBZu6mtyGd+2fvkjEUq0TX7urBq3XI=";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
buildInputs = [ gmp mpfr libmpc ];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "lib" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
moveToOutput "lib" "$lib"
|
|
|
|
'';
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
env.CARGO_FEATURE_USE_SYSTEM_LIBS = "1";
|
2021-09-23 15:35:13 +00:00
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://kalker.strct.net";
|
|
|
|
changelog = "https://github.com/PaddiM8/kalker/releases/tag/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Command line calculator";
|
2021-06-04 09:07:49 +00:00
|
|
|
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-29 16:46:19 +00:00
|
|
|
maintainers = with maintainers; [ figsoda lovesegfault ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "kalker";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
}
|