[Nix-dev] customizing the profile and environment

Ben Franksen ben.franksen at online.de
Sun Apr 6 18:24:20 CEST 2014


Hi

my goal is to write nix expressions / packages for EPICS [1]. EPICS is quite 
non-standard w.r.t. building and configuration. The build system was 
designed 20 years ago to make cross-compilation to lots of embedded target 
architectures easy for end users. That was at a time when cross-builds where 
very poorly, if at all, supported by standard tool-chains.

EPICS has no separate configure or install step. Configuration is done by 
editing files like e.g. configure/os/CONFIG_SITE.<host_arch>.<target_arch>. 
I have managed to create a minimal Nix-conformant configuration with a few 
lines in the builder script. The EPICS install step is integrally mixed with 
building, one says

  make INSTALL_LOCATION=$out

and then it installs things like

bin/linux-x86_64
bin/linux-x86_64/ex
bin/RTEMS-mvme5500
bin/RTEMS-mvme5500/ex.obj
bin/RTEMS-mvme2100
bin/RTEMS-mvme2100/ex.obj

into $out (and similar for lib and some other EPICS specific directories).

So far this is exactly what I want to happen.

But when I look at my user- environment after installing, I see

ben at sarun[1]: .../epics/base > ls ~/.nix-profile
bin  configure  db  dbd  html  include  lib  manifest.nix  templates
ben at sarun[1]: .../epics/base > ls ~/.nix-profile/bin
linux-x86_64
ben at sarun[1]: .../epics/base > ls ~/.nix-profile/lib
linux-x86_64  perl

and e.g. bin/linux-x86_64 is not in my PATH, nor lib/linux-x86_64 in the 
library search path. Nor should the db, dbd, etc directories be there.

Which gets me to the main QUESTION:


  How do I customize what gets put in my profile and environment?


For reference, I have attached my default.nix and builder.sh.

[1] http://www.aps.anl.gov/epics/

Cheers
Ben
-- 
"Make it so they have to reboot after every typo." -- Scott Adams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: builder.sh
Type: application/x-shellscript
Size: 668 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140406/b38aa81c/attachment.bin 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: default.nix
Url: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140406/b38aa81c/attachment.pl 


More information about the nix-dev mailing list