From f9cb5d3ec13e7742f3491253ff7fcefb1c212cfb Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 23 Dec 2024 16:44:24 +0000 Subject: [PATCH] lv: 4.51 -> 4.51-unstable-2020-08-03, fix gcc-14 build Without the change the build fails against `gcc-14` due to outdated `./configure` script as https://hydra.nixos.org/build/281834372/nixlog/3: configure: error: installation or configuration problem: C compiler cannot create executables. configure:678:1: error: return type defaults to 'int' [-Wimplicit-int] configure: failed program was: main(){return(0);} Fix the build by generating newer `./configure`. While at it switched to the latest home page for `lv`. --- pkgs/by-name/lv/lv/package.nix | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/lv/lv/package.nix b/pkgs/by-name/lv/lv/package.nix index bb901a29b84f..18d25c1ab89e 100644 --- a/pkgs/by-name/lv/lv/package.nix +++ b/pkgs/by-name/lv/lv/package.nix @@ -1,23 +1,31 @@ { lib, stdenv, - fetchurl, + fetchFromGitHub, ncurses, + unstableGitUpdater, + autoreconfHook, }: stdenv.mkDerivation rec { pname = "lv"; - version = "4.51"; + version = "4.51-unstable-2020-08-03"; - src = fetchurl { - url = "mirror://debian/pool/main/l/${pname}/${pname}_${version}.orig.tar.gz"; - sha256 = "0yf3idz1qspyff1if41xjpqqcaqa8q8icslqlnz0p9dj36gmm5l3"; + src = fetchFromGitHub { + owner = "ttdoda"; + repo = "lv"; + rev = "1fb214d4136334a1f6cd932b99f85c74609e1f23"; + hash = "sha256-mUFiWzTTM6nAKQgXA0sYIUm1MwN7HBHD8LWBgzu3ZUk="; }; makeFlags = [ "prefix=${placeholder "out"}" ]; + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ ncurses ]; + preAutoreconf = "cd src"; + postAutoreconf = "cd .."; + configurePhase = '' mkdir -p build cd build @@ -28,9 +36,13 @@ stdenv.mkDerivation rec { mkdir -p $out/bin ''; + passthru.updateScript = unstableGitUpdater { + tagPrefix = "v"; + }; + meta = with lib; { description = "Powerful multi-lingual file viewer / grep"; - homepage = "https://web.archive.org/web/20160310122517/www.ff.iij4u.or.jp/~nrt/lv/"; + homepage = "https://github.com/ttdoda/lv"; license = licenses.gpl2Plus; platforms = with platforms; linux ++ darwin; maintainers = with maintainers; [ kayhide ];