-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
xephem: init at 4.2.0 #294622
base: master
Are you sure you want to change the base?
xephem: init at 4.2.0 #294622
Conversation
Please squash your commits: https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#commit-conventions |
e5a8549
to
67c6024
Compare
pkgs/by-name/xe/xephem/package.nix
Outdated
meta = with lib; { | ||
description = "The Serious Interactive Astronomical Software Ephemeris"; | ||
mainProgram = "xephem"; | ||
homepage = "https://xephem.github.io/XEphem/Site/xephem.html"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ EstebanMacanek ]; | ||
platforms = platforms.unix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meta = with lib; { | |
description = "The Serious Interactive Astronomical Software Ephemeris"; | |
mainProgram = "xephem"; | |
homepage = "https://xephem.github.io/XEphem/Site/xephem.html"; | |
license = licenses.mit; | |
maintainers = with maintainers; [ EstebanMacanek ]; | |
platforms = platforms.unix; | |
meta = { | |
description = "The Serious Interactive Astronomical Software Ephemeris"; | |
mainProgram = "xephem"; | |
homepage = "https://xephem.github.io/XEphem/Site/xephem.html"; | |
license = lib.licenses.mit; | |
maintainers = with lib.maintainers; [ EstebanMacanek ]; | |
platforms = lib.platforms.unix; |
pkgs/top-level/all-packages.nix
Outdated
@@ -39617,6 +39617,7 @@ with pkgs; | |||
vite = libsForQt5.callPackage ../applications/science/misc/vite { }; | |||
|
|||
xearth = callPackage ../applications/science/astronomy/xearth { }; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
49ccb55
to
8b23aab
Compare
8b23aab
to
b86a1d5
Compare
pkgs/by-name/xe/xephem/package.nix
Outdated
hash = "sha256-TuzXrWoJOAHg31DrJObPcHBXgtqR/KWKFRsqddPzL4c="; | ||
}; | ||
|
||
sourceRoot = "${src.name}/GUI/xephem"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to cause errors when building
Assembler messages:
Fatal error: can't create aa_hadec.o: Permission denied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know where the source code for sourceRoot
is? I tried searching for it in NixOS/nix but couldn't find the definition. I think the error might be that sourceRoot
changes the mode bits of the parents directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sourceRoot
is not a formal parameter. It is set as environment variable and used in pkgs/stdenv/generic/setup.sh
(line 1300+).
Probably the problem is that the mode bit of parent directories is not changed to allow writing, when using sourceRoot.
pkgs/by-name/xe/xephem/package.nix
Outdated
|
||
sourceRoot = "${src.name}/GUI/xephem"; | ||
postPatch = '' | ||
sed -i "s|/etc/XEphem|$out/etc/XEphem|" xephem.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sed -i "s|/etc/XEphem|$out/etc/XEphem|" xephem.c | |
substituteInPlace xephem.c --replace-fail '/etc/XEphem' '${placeholder "out"}/etc/XEphem' |
fb0b9d6
to
2d446b1
Compare
c107ce7
to
1f4537c
Compare
f41063b
to
c80eaa3
Compare
pkgs/by-name/xe/xephem/package.nix
Outdated
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "xephen"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pname = "xephen"; | |
pname = "xephem"; |
pkgs/by-name/xe/xephem/package.nix
Outdated
nativeBuildInputs = [ | ||
motif | ||
openssl | ||
groff | ||
xorg.libXmu | ||
xorg.libXext | ||
xorg.libXt | ||
copyDesktopItems | ||
installShellFiles | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nativeBuildInputs = [ | |
motif | |
openssl | |
groff | |
xorg.libXmu | |
xorg.libXext | |
xorg.libXt | |
copyDesktopItems | |
installShellFiles | |
]; | |
nativeBuildInputs = [ | |
copyDesktopItems | |
installShellFiles | |
groff # nroff | |
]; | |
buildInputs = [ | |
motif | |
openssl | |
xorg.libXmu | |
xorg.libXext | |
xorg.libXt | |
]; |
Runtime dependencies go in buildInputs.
homepage = "https://xephem.github.io/XEphem/Site/xephem.html"; | ||
license = lib.licenses.mit; | ||
maintainers = with lib.maintainers; [ EstebanMacanek ]; | ||
platforms = lib.platforms.unix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
platforms = lib.platforms.unix; | |
platforms = lib.platforms.unix; | |
# Makefiles hardcode unprefixed tools everywhere | |
broken = stdenv.buildPlatform != stdenv.hostPlatform; |
Currently the package does not cross-compile, so we should mark it as such.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any way i can patch this?
would this help: https://nixos.org/manual/nixpkgs/stable/#cross-qa-fails-to-find-binutils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, you would need to replace all occurences of cc
/ ar
/ ranlib
manually, since some Makefiles do not use the CC
variables etc.
pkgs/by-name/xe/xephem/package.nix
Outdated
]; | ||
|
||
meta = { | ||
description = "The Serious Interactive Astronomical Software Ephemeris"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "The Serious Interactive Astronomical Software Ephemeris"; | |
description = "Serious Interactive Astronomical Software Ephemeris"; |
Usually description
does not start with an article
Will merge after you take care of my last round of suggestions. |
6ed8efc
to
3264898
Compare
3264898
to
ffa6f77
Compare
checkTarget = "run-test"; | ||
|
||
makeFlags = [ | ||
"GCC=${stdenv.gcc.targetPrefix}gcc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"GCC=${stdenv.gcc.targetPrefix}gcc" | |
"GCC=${stdenv.cc.targetPrefix}gcc" |
The targetPrefix is actually the same for all tools and accessed via cc
"CC=${stdenv.cc.targetPrefix}cc" | ||
"XLC=${stdenv.xlc.targetPrefix}xlc" | ||
"NROFF=${stdenv.nroff.targetPrefix}nroff" | ||
"CD=${stdenv.cd.targetPrefix}cd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would guess you can drop CD and RM, these do not have cross versions.
"RM=${stdenv.rm.targetPrefix}rm" | ||
"AR=${stdenv.ar.targetPrefix}ar" | ||
"RANLIB=${stdenv.ranlib.targetPrefix}ranlib" | ||
"TOUCH=${stdenv.touch.targetPrefix}touch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And touch too, I think.
Description of changes
Add xephem to nixpkgs.
The Serious Interactive Astronomical Software Ephemeris
https://xephem.github.io/XEphem/Site/xephem.html
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.