nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 autoreconfHook,
6 cxxtest,
7}:
8
9stdenv.mkDerivation {
10 pname = "sta";
11 version = "0-unstable-2021-11-30";
12
13 src = fetchFromGitHub {
14 owner = "simonccarter";
15 repo = "sta";
16 rev = "94559e3dfa97d415e3f37b1180b57c17c7222b4f";
17 sha256 = "sha256-AiygCfBze7J1Emy6mc27Dim34eLR7VId9wodUZapIL4=";
18 };
19
20 strictDeps = true;
21
22 nativeBuildInputs = [ autoreconfHook ];
23
24 doCheck = true;
25 nativeCheckInputs = [ cxxtest ];
26 checkInputs = [ cxxtest ];
27
28 checkPhase = ''
29 runHook preCheck
30
31 pushd test
32
33 cxxtestgen --error-printer --have-std -o tests.cpp sta_test_1.h sta_test_2.h
34 ${stdenv.cc.targetPrefix}c++ -o tester tests.cpp
35 ./tester
36
37 popd
38
39 runHook postCheck
40 '';
41
42 meta = {
43 description = "Simple statistics from the command line interface (CLI), fast";
44 longDescription = ''
45 This is a lightweight, fast tool for calculating basic descriptive
46 statistics from the command line. Inspired by
47 https://github.com/nferraz/st, this project differs in that it is written
48 in C++, allowing for faster computation of statistics given larger
49 non-trivial data sets.
50 '';
51 license = lib.licenses.mit;
52 homepage = "https://github.com/simonccarter/sta";
53 maintainers = [ ];
54 platforms = lib.platforms.all;
55 mainProgram = "sta";
56 };
57}