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

geant4: v10.0.2 -> v10.4.1, define datasets seperately, add dependencies for enableInventor #39514

Merged
merged 2 commits into from May 12, 2018

Conversation

tmplt
Copy link
Member

@tmplt tmplt commented Apr 26, 2018

Motivation for this change

Add another version of geant4 sources and define all related datasets in a seperate set of derivations.
Dependencies for geant4's enableInventor flag has been added (soxt).

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
    • other Linux distributions
  • 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.

@tmplt tmplt changed the title geant4: v10.0.2 -> v10.4.1, download all non-optional data files geant4: v10.0.2 -> v10.4.1, define datasets seperately, add dependencies for enableInventor May 8, 2018
@tmplt
Copy link
Member Author

tmplt commented May 8, 2018

I've never seen the usage of dependency ? null before. I left them in because I was unsure: since most of them hint at libraries with the same name, shouldn't the ? null just be omitted? After all, libraries can be overridden, right?

meta = {
homepage = http://www.coin3d.org/;
license = stdenv.lib.licenses.bsd3;
description = "High-level, retained-mode toolkit for effective 3D graphics development";
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps "A GUI binding for using Open Inventor with Xt/Motif"

Copy link
Member Author

Choose a reason for hiding this comment

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

That sounds good to me.

@veprbl
Copy link
Member

veprbl commented May 8, 2018

This is coming together well. Could you please squash the geant4 changes after you are done with it?

'';

inherit envvar;
setupHook = writeTextFile {
Copy link
Member

Choose a reason for hiding this comment

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

I have my doubts about this. I see that writeTextFile is not used for static files in pkgs/, I wonder if it would be better to stick with regular file here as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

I figured since the setup hooks were to small they could just be inlined. Is writeTextFile meant to be used in another way?

Copy link
Member

Choose a reason for hiding this comment

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

I would not be surprised if there is some nasty corner case with it. I suppose I know one relatively harmless side-effect: if I'm not mistaken, the writeTextFile is a derivation and will "build" a new file for each architecture.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, it does make sense to store the hook within the actual derivation. I'll revert back to regular files.

Copy link
Member

Choose a reason for hiding this comment

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

I kind of agree with you, but that discussion goes beyond the scope of this PR.


setupHook = ./setup-hook.sh;
setupHook = writeTextFile {
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@tmplt
Copy link
Member Author

tmplt commented May 8, 2018

I'll squash the geant4 changes when I figure out how to do it around the merges with master.

@tmplt
Copy link
Member Author

tmplt commented May 9, 2018

That should do it.

@@ -0,0 +1,103 @@
{ stdenv, fetchurl, writeTextFile }:
Copy link
Member

Choose a reason for hiding this comment

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

don't need writeTextFile

@@ -8,7 +8,7 @@
, enableRaytracerX11 ? false

# Standard build environment with cmake.
, stdenv, fetchurl, cmake
, stdenv, fetchurl, writeTextFile, cmake
Copy link
Member

Choose a reason for hiding this comment

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

ditto

setupHook = ./geant4-hook.sh;

passthru = {
data = import ./datasets.nix { inherit stdenv fetchurl writeTextFile; };
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@tmplt
Copy link
Member Author

tmplt commented May 9, 2018

Thanks; fixed.

@veprbl
Copy link
Member

veprbl commented May 9, 2018

@GrahamcOfBorg build geant4.v10_0_2 geant4.v10_4_1

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: geant4.v10_0_2, geant4.v10_4_1

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: geant4.v10_0_2, geant4.v10_4_1

Partial log (click to expand)

shrinking /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/lib/libG4vis_management.so
shrinking /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/lib/libG4modeling.so
shrinking /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/lib/libG4OpenGL.so
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/lib  /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/bin
patching script interpreter paths in /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1
/nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/share/Geant4-10.4.1/geant4make/geant4make.sh: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
/nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/bin/geant4.sh: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
/nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/bin/geant4-config: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: geant4.v10_0_2, geant4.v10_4_1

Partial log (click to expand)

shrinking /nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1/lib/libG4analysis.so
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1/lib  /nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1/bin
patching script interpreter paths in /nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1
/nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1/bin/geant4-config: interpreter directive changed from "/bin/sh" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/sh"
/nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1/bin/geant4.sh: interpreter directive changed from "/bin/sh" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/sh"
/nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1/share/Geant4-10.4.1/geant4make/geant4make.sh: interpreter directive changed from "/bin/sh" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1...
/nix/store/6aba07kryfcwk0pz3m2yv5fr0is998df-geant4-10.0.2
/nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1

Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

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

Checked against examples/basic/B1, was able to simulate events using data files. X11/OpenGl visual would not work for me, but thats probably due to my setup.

I will address some remaining issues with geant4 in a separate PR after this gets merged.

homepage = http://www.coin3d.org/;
license = stdenv.lib.licenses.bsd3;
description = "A GUI binding for using Open Inventor with Xt/Motif";
maintainers = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you like to add yourself as a maintainer here as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Might as well.

tmplt added 2 commits May 12, 2018 21:58
…enableInventor

By seperating the datasets, geant4 now builds in a sandbox.

Resolves NixOS#39766
@xeji
Copy link
Contributor

xeji commented May 12, 2018

@GrahamcOfBorg build geant4.v10_0_2 geant4.v10_4_1 soxt

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: geant4.v10_0_2, geant4.v10_4_1, soxt

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: geant4.v10_0_2, geant4.v10_4_1, soxt

Partial log (click to expand)

shrinking /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/lib/libG4vis_management.so
shrinking /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/lib/libG4modeling.so
shrinking /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/lib/libG4OpenGL.so
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/lib  /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/bin
patching script interpreter paths in /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1
/nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/share/Geant4-10.4.1/geant4make/geant4make.sh: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
/nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/bin/geant4.sh: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
/nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1/bin/geant4-config: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/ddihxip4cpjkacn5cdpfd89s6plfrmai-geant4-10.4.1...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: geant4.v10_0_2, geant4.v10_4_1, soxt

Partial log (click to expand)

strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1/lib  /nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1/bin
patching script interpreter paths in /nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1
/nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1/bin/geant4-config: interpreter directive changed from "/bin/sh" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/sh"
/nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1/bin/geant4.sh: interpreter directive changed from "/bin/sh" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/sh"
/nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1/share/Geant4-10.4.1/geant4make/geant4make.sh: interpreter directive changed from "/bin/sh" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1...
/nix/store/6aba07kryfcwk0pz3m2yv5fr0is998df-geant4-10.0.2
/nix/store/jwzialwhz8yxnm9123psrzk0ynyd6kyg-geant4-10.4.1
/nix/store/wdjhfxqhg5hs5g24p8vg99a1qvs7sx0g-soxt-1.3.0

@xeji xeji merged commit ef102bd into NixOS:master May 12, 2018
@tmplt tmplt deleted the update-geant4 branch August 16, 2018 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants