Skip to content

Commit 3f41fb0

Browse files
wcslib: refactor and fix noBrokenSymlinks (#380492)
2 parents 32a564c + 914f4e5 commit 3f41fb0

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

pkgs/by-name/wc/wcslib/package.nix

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
1111

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

1717
nativeBuildInputs = [ flex ];
@@ -23,16 +23,25 @@ stdenv.mkDerivation rec {
2323
"man"
2424
];
2525

26-
meta = with lib; {
26+
# DOCDIR is set to the path $out/share/doc/wcslib, and DOCLINK points
27+
# to the same location.
28+
# `$(LN_S) $(notdir $(DOCDIR)) $(DOCLINK)` effectively running:
29+
# `ln -s wcslib $out/share/doc/wcslib`
30+
# This produces a broken link because the target location already exists
31+
postInstall = ''
32+
rm $out/share/doc/wcslib/wcslib
33+
'';
34+
35+
meta = {
2736
homepage = "https://www.atnf.csiro.au/people/mcalabre/WCS/";
2837
description = "World Coordinate System library for astronomy";
2938
longDescription = ''
3039
Library for world coordinate systems for spherical geometries
3140
and their conversion to image coordinate systems. This is the
3241
standard library for this purpose in astronomy.
3342
'';
34-
maintainers = with maintainers; [ hjones2199 ];
35-
license = licenses.lgpl3Plus;
36-
platforms = platforms.unix;
43+
maintainers = with lib.maintainers; [ hjones2199 ];
44+
license = lib.licenses.lgpl3Plus;
45+
platforms = lib.platforms.unix;
3746
};
3847
}

0 commit comments

Comments
 (0)