Unverified Commit 3f41fb02 authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

wcslib: refactor and fix noBrokenSymlinks (#380492)

parents 32a564c6 914f4e54
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -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 ];
@@ -23,7 +23,16 @@ 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
  postInstall = ''
    rm $out/share/doc/wcslib/wcslib
  '';

  meta = {
    homepage = "https://www.atnf.csiro.au/people/mcalabre/WCS/";
    description = "World Coordinate System library for astronomy";
    longDescription = ''
@@ -31,8 +40,8 @@ stdenv.mkDerivation rec {
      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;
  };
}