diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-11-01 18:01:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-01 18:01:02 +0000 |
commit | bd0051cd54a18cbb4e3c7af4715a9a936818c0ef (patch) | |
tree | 9c40fff997f3479ce3c4b9cb2142c61dcb11fa97 /pkgs/tools/text | |
parent | cc41bb585179fca8d8443e0ffb58c3a24458564d (diff) | |
parent | 404254c829ff2e2e87acd5943ce178ec7d753ceb (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r-- | pkgs/tools/text/ucg/default.nix | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/pkgs/tools/text/ucg/default.nix b/pkgs/tools/text/ucg/default.nix index d81b5a14f0914..d19379477d6ca 100644 --- a/pkgs/tools/text/ucg/default.nix +++ b/pkgs/tools/text/ucg/default.nix @@ -3,14 +3,11 @@ , pkg-config , autoreconfHook , pcre -, nixosTests }: -let +stdenv.mkDerivation rec { pname = "ucg"; - version = "20190225"; -in stdenv.mkDerivation { - inherit pname version; + version = "0.3.3+date=2019-02-25"; src = fetchFromGitHub { owner = "gvansickle"; @@ -19,8 +16,29 @@ in stdenv.mkDerivation { sha256 = "sha256-/wU1PmI4ejlv7gZzZNasgROYXFiDiIxE9BFoCo6+G5Y="; }; - nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ pcre ]; + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; + + buildInputs = [ + pcre + ]; + + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + + testFile=$(mktemp /tmp/ucg-test.XXXX) + echo -ne 'Lorem ipsum dolor sit amet\n2.7182818284590' > $testFile + $out/bin/ucg 'dolor' $testFile || { rm $testFile; exit -1; } + $out/bin/ucg --ignore-case 'lorem' $testFile || { rm $testFile; exit -1; } + $out/bin/ucg --word-regexp '2718' $testFile && { rm $testFile; exit -1; } + $out/bin/ucg 'pisum' $testFile && { rm $testFile; exit -1; } + rm $testFile + + runHook postInstallCheck + ''; meta = with lib; { homepage = "https://github.com/gvansickle/ucg/"; @@ -34,7 +52,7 @@ in stdenv.mkDerivation { license = licenses.gpl3Plus; maintainers = with maintainers; [ AndersonTorres ]; platforms = with platforms; unix; + broken = stdenv.isAarch64; # cpuid.h: no such file or directory }; - - passthru.tests = { inherit (nixosTests) ucg; }; } +# TODO: report upstream |