[Nix-dev] buildFHSUserEnv and matlab impure install

Ruben Astudillo ruben.astud at gmail.com
Thu Oct 20 14:20:37 CEST 2016


Hello Nix'ers

I recently got a copy of (unix) matlab. The usual method of install
includes running as root a install script, this will launch a popup
dialog which you can "next next" until the installation is
finished. Matlab assumes in various part a FHS structure, so I've meant
to not bother with patching and use buildFHSUserEnv to replicate that
hierarchy. I can launch a nix-shell such structure, yet I have doubts on
how to proceed, should I

  * Try writing a default.nix for matlab, and somehow fill the
    interactive parts on a script?
  * Try to install all the parts on a folder under $HOME, such that each
    time I want to use it, I must be in the correct nix-shell?

As I didn't care much, I wanted to follow the 2ª option, yet trying to
run with sudo gets the following error

    sudo: setuid-wrapper.c:47: main: Assertion `(st.st_mode & S_ISUID)
== 0 || (st.st_uid == geteuid())' failed

Thus I think this isn't how is supposed to be used. Anybody with an idea
on how to use the second method? Ideally I would like to this to work,
so I can `nix-build` such hierarchy and use matlab from there...

-- Ruben


More information about the nix-dev mailing list