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

gildas: init at jul17a #27138

Closed
wants to merge 1 commit into from
Closed

gildas: init at jul17a #27138

wants to merge 1 commit into from

Conversation

bzizou
Copy link
Contributor

@bzizou bzizou commented Jul 5, 2017

Motivation for this change

Gildas is a radio-astronomy code that is used into my HPC center.
This package has been successfully tested by our users and is now in production since a few weeks into our local channel.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

{ stdenv, fetchurl, gtk2 , pkgconfig , python27 , gfortran , python27Packages , lesstif , cfitsio , getopt , perl , groff }:

stdenv.mkDerivation rec {
version = "feb17d";
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure the version doesn't break version sorting?

I would like to see a version like 20170217_d (for the exact format, grep the repository to see other examples with dates in the version), if this assumption is invalid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that this can break version sorting, but I'm not responsible for the versioning of Gildas... I'll propose a different version number for the nix package so...

Copy link
Contributor

Choose a reason for hiding this comment

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

@bzizou In order to make your life (and that of everyone else) easier, you could e-mail the author of Gildas. Alternatively, you could parse the format they are using and compute the version based on their version. This way, if you ever automate the update process, there is no manual work required anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, already suggested to my contact in the Gildas team. I think that I'll do something simple for now and see if they changed the thing for the next release

Copy link
Member

Choose a reason for hiding this comment

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

Note that versions in Nix must start with a digit. Otherwise nix-env will consider it part of the package name. So e.g. nix-env -i gildas won't work.

Copy link
Contributor

Choose a reason for hiding this comment

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

If versions must start with a digit, then we should have an assertion somewhere.

cp admin/wrapper.sh $out/bin/gildas-wrapper.sh
chmod 755 $out/bin/gildas-wrapper.sh
for i in $out/libexec/bin/* ; do
ln -s $out/bin/gildas-wrapper.sh $out/bin/`basename $i`
Copy link
Contributor

Choose a reason for hiding this comment

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

Please replace with "$(basename "$i")"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

meta = {
description = "Radioastronomy data analysis software";
longDescription = ''
GILDAS is a collection of state-of-the-art softwares
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace softwares with software.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

+ sprintf( exec_argv[i++], "%s", app_name);
exec_argv[i++] = NULL;
if (i >= MAX_ARGC) {
gcore_c_message(seve_e, "SIC", "Too much arguments, exiting");
Copy link
Contributor

Choose a reason for hiding this comment

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

much -> many

Also please output how many arguments were given and how many was the maximum expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, this comes from the upstream code. I can also patch this, and I4ll suggest the patch to the upstream

Copy link
Contributor

Choose a reason for hiding this comment

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

If it's upstream code, please suggest it to upstream and don't spend the time to make the change here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done: made the suggestion to my private contact in the team (and by the way, submitted the original patch...)

Copy link
Contributor

@0xABAB 0xABAB left a comment

Choose a reason for hiding this comment

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

The attribute nativeBuildInputs is not used for pkgconfig and perhaps others, so that's an improvement you could still make.

The most important value however is that you already tested the package for a few weeks before sharing it.

Thanks for your contribution.

@0xABAB
Copy link
Contributor

0xABAB commented Jul 9, 2017

@bzizou The version issue still needs to be resolved before this can be merged.

@bzizou
Copy link
Contributor Author

bzizou commented Jul 9, 2017

@0xABAB Sure, I'll amend my commit very soon. I just wanted one of my users to test the new package, as I upgraded gildas by the way...

@bzizou bzizou changed the title gildas: init at feb17d gildas: init at jul17a Jul 10, 2017
@bzizou
Copy link
Contributor Author

bzizou commented Jul 10, 2017

Fixes:

  • typos
  • moved some deps into nativeBuildinputs
  • version of the package is more nix-compatible
  • feb17d -> jul17a

Re-tested by a real user on a real hpc cluster

@@ -0,0 +1,18 @@
diff --new-file -r -u gildas-src-feb17d.orig/admin/wrapper.sh gildas-src-feb17d/admin/wrapper.sh
--- gildas-src-feb17d.orig/admin/wrapper.sh 1970-01-01 01:00:00.000000000 +0100
+++ gildas-src-feb17d/admin/wrapper.sh 2017-05-18 21:00:01.660778782 +0200
Copy link
Member

@Mic92 Mic92 Jul 13, 2017

Choose a reason for hiding this comment

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

Will this wrapper part in future versions of the software? Just asking because of the git-like hash in the patch path name.


enableParallelBuilding = false;

nativeBuildInputs = [ pkgconfig groff perl getopt gfortran python27 python27Packages.numpy ];
Copy link
Member

Choose a reason for hiding this comment

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

Is numpy a runtime dependency of this application?

Copy link
Member

Choose a reason for hiding this comment

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

Is numpy a runtime dependency of this application?

Yes, it is.

@bzizou
Copy link
Contributor Author

bzizou commented Oct 19, 2017

FYI I'm currently in the process of upgrading to the latest version as the source for this PR is no more available

@obadz
Copy link
Contributor

obadz commented Mar 18, 2018

Ok, please reopen as a separate PR when you're ready then. Thanks.

@obadz obadz closed this Mar 18, 2018
@smaret smaret mentioned this pull request Jun 13, 2018
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants