2022-06-16 17:23:12 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, autoreconfHook, intltool
|
2021-02-05 17:12:51 +00:00
|
|
|
, gtk, pkg-config, flex }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "galculator";
|
|
|
|
version = "2.1.4";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "galculator";
|
|
|
|
repo = "galculator";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0q0hb62f266709ncyq96bpx4a40a1i6dc5869byvd7x285sx1c2w";
|
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
patches = [
|
|
|
|
# Pul patch pending upstream inclusion for -fno-common toolchain support:
|
|
|
|
# https://github.com/galculator/galculator/pull/45
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fno-common.patch";
|
|
|
|
url = "https://github.com/galculator/galculator/commit/501a9e3feeb2e56889c0ff98ab6d0ab20348ccd6.patch";
|
|
|
|
sha256 = "08c9d2b49a1mizgk7v37dp8r96x389zc13mzv4dcy16x448lhp67";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook intltool pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ gtk flex ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "GTK 2/3 algebraic and RPN calculator";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
galculator is a GTK 2 / GTK 3 based calculator. Its main features include:
|
|
|
|
|
|
|
|
- Algebraic, RPN (Reverse Polish Notation), Formula Entry and Paper modes;
|
|
|
|
- Basic and Scientific Modes
|
|
|
|
- Decimal, hexadecimal, octal and binary number base
|
|
|
|
- Radiant, degree and grad support
|
|
|
|
- User defined constants and functions
|
|
|
|
- A bunch of common functions
|
|
|
|
- Binary arithmetic of configurable bit length and signedness
|
|
|
|
- Quad-precision floating point arithmetic, and 112-bit binary arithmetic
|
|
|
|
'';
|
|
|
|
homepage = "http://galculator.sourceforge.net/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.AndersonTorres ];
|
|
|
|
platforms = platforms.linux;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "galculator";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|