summary refs log tree commit diff
path: root/pkgs/applications/science/misc/rink/default.nix
blob: 0dfcbfda00245ee70e917cc68f5aaa96164d31be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ stdenv, fetchFromGitHub, rustPlatform, openssl, pkgconfig, gmp, ncurses }:

rustPlatform.buildRustPackage rec {
  version = "0.4.4";
  pname = "rink";

  src = fetchFromGitHub {
    owner = "tiffany352";
    repo = "rink-rs";
    rev = "v${version}";
    sha256 = "0rvck5ahg7s51fdlr2ch698cwnyc6qp84zhfgs3wkszj9r5j470k";
  };
  cargoPatches = [ ./cargo-lock.patch ];

  cargoSha256 = "1ijfvfhgjgzlpi1hjhy435m7vq568grh84bmkdlj3m83jxjcz874";

  buildInputs = [ pkgconfig ];
  propagatedBuildInputs = [ openssl gmp ncurses ];

  # Some tests fail and/or attempt to use internet servers.
  doCheck = false;

  meta = with stdenv.lib; {
    description = "Unit-aware calculator";
    homepage = http://rink.tiffnix.com;
    license = with licenses; [ mpl20 gpl3 ];
    maintainers = [ maintainers.sb0 ];
  };
}