nixpkgs/pkgs/by-name/li/links2/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

46 lines
1.5 KiB
Nix

{ lib, stdenv, fetchurl
, gpm, openssl, pkg-config, libev # Misc.
, libpng, libjpeg, libtiff, librsvg, libavif # graphic formats
, bzip2, zlib, xz # Transfer encodings
, enableFB ? (!stdenv.hostPlatform.isDarwin)
, enableDirectFB ? false, directfb
, enableX11 ? (!stdenv.hostPlatform.isDarwin), libX11, libXt, libXau # GUI support
}:
stdenv.mkDerivation (finalAttrs: {
version = "2.30";
pname = "links2";
src = fetchurl {
url = "http://links.twibright.com/download/links-${finalAttrs.version}.tar.bz2";
hash = "sha256-xGMca1oRUnzcPLeHL8I7fyslwrAh1Za+QQ2ttAMV8WY=";
};
buildInputs =
[ libev librsvg libpng libjpeg libtiff libavif openssl xz bzip2 zlib ]
++ lib.optionals stdenv.hostPlatform.isLinux [ gpm ]
++ lib.optionals enableX11 [ libX11 libXau libXt ]
++ lib.optionals enableDirectFB [ directfb ];
nativeBuildInputs = [ pkg-config bzip2 ];
configureFlags = [ "--with-ssl" ]
++ lib.optional (enableX11 || enableFB || enableDirectFB) "--enable-graphics"
++ lib.optional enableX11 "--with-x"
++ lib.optional enableFB "--with-fb"
++ lib.optional enableDirectFB "--with-directfb";
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-int";
};
meta = with lib; {
homepage = "http://links.twibright.com/";
description = "Small browser with some graphics support";
maintainers = with maintainers; [ raskin ];
mainProgram = "links";
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
})