nixpkgs/pkgs/tools/misc/kalker/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.1 KiB
Nix
Raw Normal View History

2021-06-01 00:28:25 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, gmp
, mpfr
, libmpc
2021-06-01 00:28:25 +00:00
}:
2021-06-01 00:28:25 +00:00
rustPlatform.buildRustPackage rec {
2021-06-03 19:29:19 +00:00
pname = "kalker";
version = "2.0.4";
2021-06-01 00:28:25 +00:00
src = fetchFromGitHub {
owner = "PaddiM8";
repo = pname;
rev = "v${version}";
hash = "sha256-8tJi4PRGhNCndiMRdZUvCSdx/+p9OhJyJ3AbD+PucSo=";
2021-06-01 00:28:25 +00:00
};
cargoHash = "sha256-rGy4tkjjPiV2lpdOtfqjsXgBgi/x+45K4KeUDhyfQoA=";
2021-06-01 00:28:25 +00:00
buildInputs = [ gmp mpfr libmpc ];
2021-06-01 00:28:25 +00:00
outputs = [ "out" "lib" ];
# Cargo.lock is outdated
preConfigure = ''
cargo metadata --offline
'';
2021-06-01 00:28:25 +00:00
postInstall = ''
moveToOutput "lib" "$lib"
'';
env.CARGO_FEATURE_USE_SYSTEM_LIBS = "1";
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 = "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;
maintainers = with maintainers; [ figsoda lovesegfault ];
2021-06-01 00:28:25 +00:00
};
}