Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 65 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPackages, 5 fetchurl, 6 pkg-config, 7 ncurses, 8 gzip, 9 sslSupport ? true, 10 openssl, 11 nukeReferences, 12}: 13 14stdenv.mkDerivation rec { 15 pname = "lynx"; 16 version = "2.9.2"; 17 18 src = fetchurl { 19 urls = [ 20 "ftp://ftp.invisible-island.net/lynx/tarballs/lynx${version}.tar.bz2" 21 "https://invisible-mirror.net/archives/lynx/tarballs/lynx${version}.tar.bz2" 22 ]; 23 hash = "sha256-c3S4mTbZkWaeEB9Ol/LJWSA24ejNqnuvwlmnerb7B84="; 24 }; 25 26 enableParallelBuilding = true; 27 28 hardeningEnable = [ "pie" ]; 29 30 configureFlags = [ 31 "--enable-default-colors" 32 "--enable-widec" 33 "--enable-ipv6" 34 ] 35 ++ lib.optional sslSupport "--with-ssl"; 36 37 depsBuildBuild = [ buildPackages.stdenv.cc ]; 38 nativeBuildInputs = [ nukeReferences ] ++ lib.optional sslSupport pkg-config; 39 40 buildInputs = [ 41 ncurses 42 gzip 43 ] 44 ++ lib.optional sslSupport openssl; 45 46 # cfg_defs.h captures lots of references to build-only dependencies, derived 47 # from config.cache. 48 postConfigure = '' 49 make cfg_defs.h 50 nuke-refs cfg_defs.h 51 ''; 52 53 env = lib.optionalAttrs stdenv.cc.isGNU { 54 NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; 55 }; 56 57 meta = with lib; { 58 description = "Text-mode web browser"; 59 homepage = "https://lynx.invisible-island.net/"; 60 mainProgram = "lynx"; 61 maintainers = [ ]; 62 license = licenses.gpl2Plus; 63 platforms = platforms.unix; 64 }; 65}