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";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "2.0.3";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PaddiM8";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-Pj3rcjEbUt+pnmbOZlv2JIvUhVdeiXYDKc5FED6qO7E=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
};
|
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" ];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
ln -s ${./Cargo.lock} Cargo.lock
|
|
|
|
'';
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
postInstall = ''
|
|
|
|
moveToOutput "lib" "$lib"
|
|
|
|
'';
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
CARGO_FEATURE_USE_SYSTEM_LIBS = "1";
|
|
|
|
|
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}";
|
|
|
|
description = "A 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-29 16:46:19 +00:00
|
|
|
maintainers = with maintainers; [ figsoda lovesegfault ];
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
}
|