1{ lib
2, stdenv
3, fetchFromGitHub
4, autoreconfHook
5, bison
6, expat
7, file
8, flex
9, texinfo
10}:
11
12stdenv.mkDerivation rec {
13 pname = "udunits";
14 version = "unstable-2021-03-17";
15
16 src = fetchFromGitHub {
17 owner = "Unidata";
18 repo = "UDUNITS-2";
19 rev = "c83da987387db1174cd2266b73dd5dd556f4476b";
20 hash = "sha256-+HW21+r65OroCxMK2/B5fe7zHs4hD4xyoJK2bhdJGyQ=";
21 };
22
23 nativeBuildInputs = [
24 autoreconfHook
25 texinfo
26 bison
27 flex
28 file
29 ];
30 buildInputs = [
31 expat
32 ];
33
34 meta = with lib; {
35 homepage = "https://www.unidata.ucar.edu/software/udunits/";
36 description = "A C-based package for the programatic handling of units of physical quantities";
37 longDescription = ''
38 The UDUNITS package supports units of physical quantities. Its C library
39 provides for arithmetic manipulation of units and for conversion of
40 numeric values between compatible units. The package contains an extensive
41 unit database, which is in XML format and user-extendable. The package
42 also contains a command-line utility for investigating units and
43 converting values.
44 '';
45 license = licenses.asl20;
46 maintainers = with maintainers; [ AndersonTorres pSub ];
47 platforms = platforms.all;
48 mainProgram = "udunits2";
49 };
50}