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@sarun[1]: .../epics/base > ls ~/.nix-profile bin configure db dbd html include lib manifest.nix templates ben@sarun[1]: .../epics/base > ls ~/.nix-profile/bin linux-x86_64 ben@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
builder.sh
Description: application/shellscript
{ stdenv, binutils, fetchurl, perl, readline, version ? "3.14.12.4" }:
let md5s = {
"3.14.12.4" = "4e71c07053c4458eece4d492eb85fca8";
"3.14.12.3" = "67f0021d270d8fa142c9d978b4599b32";
}; in
stdenv.mkDerivation {
inherit version;
name = "epics-base-" + version;
builder = ./builder.sh;
src = fetchurl {
url = http://www.aps.anl.gov/epics/download/base/baseR + version +
".tar.gz";
md5 = builtins.getAttr version md5s;
};
inherit perl readline binutils;
inherit (stdenv) gcc;
propagatedBuildInputs = [ perl readline ];
}
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
