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

astrometry.net: init at 0.94 #225856

Open
wants to merge 1 commit 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions pkgs/by-name/as/astrometry-net/package.nix
@@ -0,0 +1,32 @@
{ lib, stdenv, fetchFromGitHub, python3, cairo, netpbm, libpng, libjpeg, zlib, bzip2, swig, cfitsio, pkg-config, gsl }:

stdenv.mkDerivation (FinalAttr: {
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
stdenv.mkDerivation (FinalAttr: {
stdenv.mkDerivation (finalAttrs: {

please use the standard name

pname = "astrometry.net";
version = "0.94";
version_date = "2023-05-01";

src = fetchFromGitHub {
owner = "dstndstn";
repo = FinalAttr.pname;
rev = FinalAttr.version;
Comment on lines +4 to +11
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
pname = "astrometry.net";
version = "0.94";
version_date = "2023-05-01";
src = fetchFromGitHub {
owner = "dstndstn";
repo = FinalAttr.pname;
rev = FinalAttr.version;
pname = "astrometry.net";
version = "0.94";
src = fetchFromGitHub {
owner = "dstndstn";
repo = "astrometry.net";
rev = finalAttrs.version;

Shouldn't the package name be without .net?

hash = "sha256-/g9cqgcoxYQAmSdNrdAN/ZkQBu2xynOFYzfZnhKgKF8=";
};

nativeBuildInputs = [ pkg-config ];
buildInputs = [ python3 cairo netpbm libpng libjpeg zlib bzip2 swig cfitsio gsl ];
propagatedBuildInputs = with python3.pkgs; [ numpy ];
Copy link
Member

Choose a reason for hiding this comment

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

Please use a python wrapper instead of propagating a package


preConfigure = ''
patchShebangs .
Copy link
Member

Choose a reason for hiding this comment

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

We should limit this to some directories or files

'';

makeFlags = [ "INSTALL_DIR=$(out)" "AN_GIT_REVISION=${FinalAttr.version}" "AN_GIT_DATE=${FinalAttr.version_date}" ];
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
makeFlags = [ "INSTALL_DIR=$(out)" "AN_GIT_REVISION=${FinalAttr.version}" "AN_GIT_DATE=${FinalAttr.version_date}" ];
makeFlags = [
"INSTALL_DIR=$(out)"
"AN_GIT_REVISION=${FinalAttr.version}"
"AN_GIT_DATE=1970-01-01"
];

mocking the date is making updates a lot easier


meta = with lib; {
description = "Automatic recognition of astronomical images";
homepage = "https://astrometry.net/";
license = licenses.gpl3Plus;
maintainers = [ maintainers.bzizou ];
platforms = platforms.unix;
};
})