1 { lib, stdenv, fetchFromGitHub, ncurses, hdate, lua5_2 }:
3 stdenv.mkDerivation rec {
6 src = fetchFromGitHub {
10 sha256 = "1ic63gpdda762x6ks3al71dwgmsy2isicqyr2935bd245jx8s209";
13 # author do not use configure and prefix directly using $prefix
15 # graphical version of dozdc requires xforms, which is not i nixpkgs so I turned it down
16 "XFORMS_FLAGS=-UXFORMS"
18 "bindir=$(prefix)/bin/"
20 # some include hardcodes the lua libraries path. This is a patch for that
21 patches = [ ./lua-header.patch ];
22 preBuild = "cd dozenal";
23 buildInputs = [ ncurses hdate lua5_2 ];
25 # Parallel builds fail due to no dependencies between subdirs.
26 # As a result some subdirs are atempted to build twice:
27 # ../dec/dec.c:39:10: fatal error: conv.h: No such file or directory
28 # Let's disable parallelism until it's fixed upstream:
29 # https://gitlab.com/dgoodmaniii/dozenal/-/issues/8
30 enableParallelBuilding = false;
32 # I remove gdozdc, as I didn't figure all it's dependency yet.
33 postInstall = "rm $out/bin/gdozdc";
36 description = "Complete suite of dozenal (base twelve) programs";
40 doz --- a converter; converts decimal numbers into dozenal. Accepts
41 input in standard or exponential notation (i.e., "1492.2" or "1.4922e3").
42 dec --- a converter; converts dozenal numbers into decimal. Accepts input
43 in standard or exponential notation (i.e., "X44;4" or "X;444e2").
44 dozword --- converts a dozenal number (integers only) into words,
45 according to the Pendlebury system.
46 dozdc --- a full-featured scientific calculator which works in the
47 dozenal base. RPN command line.
48 tgmconv --- a converter for all standard measurements; converts to and
49 from TGM, Imperial, customary, and SI metric.
50 dozpret --- a pretty-printer for dozenal numbers; inserts spacing (or
51 other characters) as desired, and can also transform transdecimal digits
52 from 'X' to 'E' into any character or sequence of characters desired.
53 dozdate --- a more-or-less drop-in replacement for GNU and BSD date, it
54 outputs the date and time in dozenal, as well as containing some TGM
56 dozstring --- a simple byte converter; absorbs a string either from
57 standard input or a command line argument, leaving it identical but
58 for the numbers, which it converts into dozenal. Options for padding
59 and for not converting specific numbers.
60 doman --- a converter which takes a dozenal integer and
61 emits its equivalent in a non-place-value system, such as
62 Roman numerals. Arbitrary ranks and symbols may be used.
63 Defaults to dozenal Roman numerals.
65 homepage = "https://github.com/dgoodmaniii/dozenal/";
66 maintainers = with lib.maintainers; [ CharlesHD ];
67 license = lib.licenses.gpl3;