nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub, fetchpatch
2, autoreconfHook, intltool
3, gtk, pkg-config, flex }:
4
5stdenv.mkDerivation rec {
6 pname = "galculator";
7 version = "2.1.4";
8
9 src = fetchFromGitHub {
10 owner = "galculator";
11 repo = "galculator";
12 rev = "v${version}";
13 sha256 = "0q0hb62f266709ncyq96bpx4a40a1i6dc5869byvd7x285sx1c2w";
14 };
15
16 patches = [
17 # Pul patch pending upstream inclusion for -fno-common toolchain support:
18 # https://github.com/galculator/galculator/pull/45
19 (fetchpatch {
20 name = "fno-common.patch";
21 url = "https://github.com/galculator/galculator/commit/501a9e3feeb2e56889c0ff98ab6d0ab20348ccd6.patch";
22 sha256 = "08c9d2b49a1mizgk7v37dp8r96x389zc13mzv4dcy16x448lhp67";
23 })
24 ];
25
26 nativeBuildInputs = [ autoreconfHook intltool pkg-config ];
27 buildInputs = [ gtk flex ];
28
29 meta = with lib; {
30 description = "A GTK 2/3 algebraic and RPN calculator";
31 longDescription = ''
32 galculator is a GTK 2 / GTK 3 based calculator. Its main features include:
33
34 - Algebraic, RPN (Reverse Polish Notation), Formula Entry and Paper modes;
35 - Basic and Scientific Modes
36 - Decimal, hexadecimal, octal and binary number base
37 - Radiant, degree and grad support
38 - User defined constants and functions
39 - A bunch of common functions
40 - Binary arithmetic of configurable bit length and signedness
41 - Quad-precision floating point arithmetic, and 112-bit binary arithmetic
42 '';
43 homepage = "http://galculator.sourceforge.net/";
44 license = licenses.gpl2Plus;
45 maintainers = [ maintainers.AndersonTorres ];
46 platforms = platforms.linux;
47 };
48}