Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions pkgs/applications/networking/browsers/links2/default.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{ lib, stdenv, fetchurl
, gpm, openssl, pkg-config, libev # Misc.
, libpng, libjpeg, libtiff, librsvg # graphic formats
, libpng, libjpeg, libtiff, librsvg, libavif # graphic formats
, bzip2, zlib, xz # Transfer encodings
, enableFB ? true
, enableFB ? (!stdenv.isDarwin)
, enableDirectFB ? false, directfb
, enableX11 ? true, libX11, libXt, libXau # GUI support
, enableX11 ? (!stdenv.isDarwin), libX11, libXt, libXau # GUI support
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
version = "2.29";
pname = "links2";

src = fetchurl {
url = "${meta.homepage}/download/links-${version}.tar.bz2";
sha256 = "sha256-IqqWwLOOGm+PftnXpBZ6R/w3JGCXdZ72BZ7Pj56teZg=";
url = "${finalAttrs.meta.homepage}/download/links-${finalAttrs.version}.tar.bz2";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
url = "${finalAttrs.meta.homepage}/download/links-${finalAttrs.version}.tar.bz2";
url = "http://links.twibright.com/download/links-${finalAttrs.version}.tar.bz2";

using meta.homepage here is not very correct or future proof. If meta.homepage gets changed in the future this will likely be forgotten

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, @SuperSandro, is this important enough to you, that you'd accept a PR for it or it is something that should rather be addressed with the next update to the package?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to make PR now, me or @SuperSandro2000 happy to have a look at it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, @kirillrdy, here's the PR: #289130

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If meta.homepage gets changed in the future this will likely be forgotten

Note that if the domain changes in the future, the URL 100% needs changing, but there is a chance that the URL structure is the same, so I am not sure how this cleanup can ever be useful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is similar to #277994

for links2 its most likely that url and homepage will go in sync, but that's not the case for a lot of other derivations

eg homepage can change to be different domain but src remains on github, or sometimes they go backwards

hash = "sha256-IqqWwLOOGm+PftnXpBZ6R/w3JGCXdZ72BZ7Pj56teZg=";
};

buildInputs = with lib;
[ libev librsvg libpng libjpeg libtiff openssl xz bzip2 zlib ]
[ libev librsvg libpng libjpeg libtiff libavif openssl xz bzip2 zlib ]
++ optionals stdenv.isLinux [ gpm ]
++ optionals enableX11 [ libX11 libXau libXt ]
++ optionals enableDirectFB [ directfb ];
Expand All @@ -30,6 +30,10 @@ stdenv.mkDerivation rec {
++ 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 = "A small browser with some graphics support";
Expand All @@ -38,4 +42,4 @@ stdenv.mkDerivation rec {
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}
})