nixpkgs/pkgs/by-name/cf/cfitsio/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

60 lines
1.5 KiB
Nix

{ stdenv
, lib
, fetchurl
, bzip2
, curl
, zlib
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cfitsio";
version = "4.4.1";
src = fetchurl {
url = "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-${finalAttrs.version}.tar.gz";
hash = "sha256-ZqHcPyGAD57qvZ6sV3uR/N2aq7pnj7ujuFJzGRENHSU=";
};
patches = [
./darwin-rpath-universal.patch
];
buildInputs = [
bzip2
curl
zlib
];
configureFlags = [
"--with-bzip2=${bzip2.out}"
"--enable-reentrant"
];
hardeningDisable = [ "format" ];
# Shared-only build
buildFlags = [ "shared" ];
postPatch = ''
sed -e '/^install:/s/libcfitsio.a //' -e 's@/bin/@@g' -i Makefile.in
'';
meta = {
homepage = "https://heasarc.gsfc.nasa.gov/fitsio/";
description = "Library for reading and writing FITS data files";
longDescription = ''
CFITSIO is a library of C and Fortran subroutines for reading and
writing data files in FITS (Flexible Image Transport System) data
format. CFITSIO provides simple high-level routines for reading and
writing FITS files that insulate the programmer from the internal
complexities of the FITS format. CFITSIO also provides many
advanced features for manipulating and filtering the information in
FITS files.
'';
changelog = "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/docs/changes.txt";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ xbreak hjones2199 ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
})