Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wcslib: refactor and fix noBrokenSymlinks #380492

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
17 changes: 12 additions & 5 deletions pkgs/by-name/wc/wcslib/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ stdenv.mkDerivation rec {

src = fetchurl {
url = "ftp://ftp.atnf.csiro.au/pub/software/wcslib/${pname}-${version}.tar.bz2";
sha256 = "sha256-lguERCbRSotTze7XgliqkojN7ZmncywGZ8ZPpqUBJtw=";
hash = "sha256-lguERCbRSotTze7XgliqkojN7ZmncywGZ8ZPpqUBJtw=";
};

nativeBuildInputs = [ flex ];
Expand All @@ -23,16 +23,23 @@ stdenv.mkDerivation rec {
"man"
];

meta = with lib; {
# DOCDIR is set to the path $out/share/doc/wcslib, and DOCLINK points
# to the same location.
# `$(LN_S) $(notdir $(DOCDIR)) $(DOCLINK)` effectively running:
# `ln -s wcslib $out/share/doc/wcslib`
# This produces a broken link because the target location already exists
dontCheckForBrokenSymlinks = true;
Comment on lines +26 to +31
Copy link
Contributor

Choose a reason for hiding this comment

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

With this explanation, it seems like what you had previously is better: I understand why removing the broken symlink is the right thing to do, as that symlink was never intended to be created by the (broken) Makefile that way.

We should also create an issue upstream about it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think if DOCLINK is given a reasonable path it should work. Maybe dontCheckForBrokenSymlinks would be good too. I'm not interested in upstream feedback.


meta = {
homepage = "https://www.atnf.csiro.au/people/mcalabre/WCS/";
description = "World Coordinate System library for astronomy";
longDescription = ''
Library for world coordinate systems for spherical geometries
and their conversion to image coordinate systems. This is the
standard library for this purpose in astronomy.
'';
maintainers = with maintainers; [ hjones2199 ];
license = licenses.lgpl3Plus;
platforms = platforms.unix;
maintainers = with lib.maintainers; [ hjones2199 ];
license = lib.licenses.lgpl3Plus;
platforms = lib.platforms.unix;
};
}