Re: [Nix-dev] Clear all
Stewart Mackenzie setor...@gmail.com writes: Mathijs Kwik math...@bluescreen303.nl wrote: You can go a step further and define multiple sub-profiles. For example 1 you typically use during c development. And another for haskell development, and yet another for an experimental python3 environment. Then you can jump between those environments on a per-terminal basis (no interferance, do many different things at once). Like this, you keep the default packageset (and thus commands available in your shell path) to a minimum. Look for myEnvFun in nixpkgs if you want to try this. Yes this is exactly where I want to go. I need a C++ and Mozart/oz environment, now does one have this default.nix committed to the mozart/oz project's repo? No you just keep it somewhere in your own repo or somewhere in your HOME. Should one use nix-shell to change to this environment? No, the myEnvFun environments create their own scripts for this. If you have an environment called foo, you will have a ~/.nix-profile/dev-envs/foo file containing most stuff that needs to be set. And a load-env-foo script in your path that sources this and does some additional things. You can use that or build your own wrapper. I personally do a little more, like setting the PS1 so I can visually identify in which environment one terminal is. So portablility is ensured by committing the new environment to some folder branch in nixpkgs, or just ship default.nix? I compile the mozart2 compiler (which is dependent on boost) as soon as I try execute the development environment it blowsup because it can't see boost deps. So I obviously need a hybrid C++/mozart-oz solution. I think we are getting things mixed up here :) The stuff I mentioned up to now is for creating custom environments, which is useful if you need to work with local projects that you have no desire to turn into a full nix expression, or at least not yet. Or if you have a bunch of similar projects with similar dependencies. So a c++ environment with a set of libraries available, a ruby environment (specific version) with a set of gems, nodejs with a bunch of npms. This resembles a typical environment you would have on other systems and is very useful for working on local projects (ones you share with non-nixos users). nix-shell (and predecessors) is used if you want to work on nix expressions to get an environment that is very similar to what builders would use if you install them normally (systemPackages or nix-env, doesn't matter). Most of the time this is for working on a package that you maintain for nixpkgs (or want to in the near future), or for local (outside of nixpkgs) projects that you want to deploy to nixos machines, for example through nixops. So this is more than just dependencies, but for specifying the full build instructions for a package. (full nix expression / derivation). Of course there is an overlap between these methods. If you want to use the nix-shell way, it depends on whether your package is supposed to become part of nixpkgs or if it's just a personal/proprietary thing. If you want it in nixpkgs, just put it in your local nixpkgs copy and submit it when it's ready (through a pull request). If it's personal you can store the expression anywhere you like (point nix-build/nix-env/nix-shell to it) or plug it into nixpkgs externally through packageOverrides. See http://nixos.org/wiki/Howto_develop_software_on_nixos My dependencies are Boost, Tcl, Tk, xlibs, xproto, Java, clang, llvm, gtest, gcc, I also have a load of environmental variables. I noticed there is a build.sh which allows me to abstract away Mozart's build. Kind regards Stewart ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Clear all
Should one use nix-shell to change to this environment? No, the myEnvFun environments create their own scripts for this. If you have an environment called foo, you will have a ~/.nix-profile/dev-envs/foo file containing most stuff that needs to be set. I'm afraid all I have in my ~/.nix-profile is a manifest.nix and pkgs/misc/my-env/default.nix just says # Add this to your ~/.nixpkgs/config.nix Which I don't have. Have I configured my system incorrectly? I think we are getting things mixed up here :) The stuff I mentioned up to now is for creating custom environments, which is useful if you need to work with local projects that you have no desire to turn into a full nix expression, or at least not yet. Or if you have a bunch of similar projects with similar dependencies. So a c++ environment with a set of libraries available, a ruby environment (specific version) with a set of gems, nodejs with a bunch of npms. This resembles a typical environment you would have on other systems and is very useful for working on local projects (ones you share with non-nixos users). Yes the above is what I want to accomplish first off. By getting a C++/Mozart environment running. Then I want to create a nix expression to share mozart2 with the nix community. First of all I'd like to understand exactly why using nix-env -i pkg is an incorrect approach? Why is it considered dirty? regards Stewart ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Clear all
Actually I just want to make this message go away. After compiling and running oz I try run the emulator. $ ./ozemulator ./ozemulator: error while loading shared libraries: libboost_program_options.so.1.54.0: cannot open shared object file: No such file or directory Thanks kindly Stewart ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Clear all
On 21 September 2013 19:18, Stewart Mackenzie setor...@gmail.com wrote: Hi all, I've only recently found out about nix-shell or what was nix-env --run-env. Though i've completely polluted my user space by installing everything with nix-env -i pkgs . I'd like to clear it up and start from scratch properly. How do i do that? Delete the profiles directory? Maybe there are shortcuts, but I use nix-env -qsP \* to get a list of installed stuff in my profile and then copy paste that into a line like this: nix-env -e package1 package2 ... Secondly, what typically should be installed with nix-env? I would imagine its the programs one would want access to in the standard terminal environment. Things like firefox etc. Correct? I think in general you can choose yourself what to install with nix-env and what to put in environment.systemPackages. I usually start by installing a package with nix-env, and if I find it useful to keep for later, I move it over to systemPackages. About the in general, I've heard about issues with some KDE programs when they are installed with nix-env and not in systemPackages. Best regards, Bjørn Forsman ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Clear all
See http://nixos.org/wiki/Howto_keep_multiple_packages_up_to_date_at_once That way, you install (and upgrade) only 1 package through nix-env and keep everything in there. To clean up: nix-env -q | xargs nix-env -e Then install your my-env package. Regarding your second question: Depends on who uses it. If your system has multiple users, you can keep stuff like firefox in systemPackages, so it's available to everyone. Of course if every user installs it for himself, it will be shared anyway, so this is not a space-saving, but just a convenience. You can go a step further and define multiple sub-profiles. For example 1 you typically use during c development. And another for haskell development, and yet another for an experimental python3 environment. Then you can jump between those environments on a per-terminal basis (no interferance, do many different things at once). Like this, you keep the default packageset (and thus commands available in your shell path) to a minimum. Look for myEnvFun in nixpkgs if you want to try this. On Sat, Sep 21, 2013 at 7:18 PM, Stewart Mackenzie setor...@gmail.com wrote: Hi all, I've only recently found out about nix-shell or what was nix-env --run-env. Though i've completely polluted my user space by installing everything with nix-env -i pkgs . I'd like to clear it up and start from scratch properly. How do i do that? Delete the profiles directory? Secondly, what typically should be installed with nix-env? I would imagine its the programs one would want access to in the standard terminal environment. Things like firefox etc. Correct? Kind regards Stewart ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Clear all
On Sat, Sep 21, 2013 at 09:04:19PM +0200, Mathijs Kwik wrote: To clean up: nix-env -q | xargs nix-env -e a shorter way to do this is nix-env -e \* a! -- aszlig signature.asc Description: Digital signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Clear all
I've heard (in Nix 1.6 release features list) that * nix-env -i has a new flag --remove-all (-r) to remove all previous packages from the profile. Though, I don't know if it works with your 2013/9/21 Stewart Mackenzie setor...@gmail.com Hi all, I've only recently found out about nix-shell or what was nix-env --run-env. Though i've completely polluted my user space by installing everything with nix-env -i pkgs . I'd like to clear it up and start from scratch properly. How do i do that? Delete the profiles directory? Secondly, what typically should be installed with nix-env? I would imagine its the programs one would want access to in the standard terminal environment. Things like firefox etc. Correct? Kind regards Stewart ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] Clear all
Mathijs Kwik math...@bluescreen303.nl wrote: You can go a step further and define multiple sub-profiles. For example 1 you typically use during c development. And another for haskell development, and yet another for an experimental python3 environment. Then you can jump between those environments on a per-terminal basis (no interferance, do many different things at once). Like this, you keep the default packageset (and thus commands available in your shell path) to a minimum. Look for myEnvFun in nixpkgs if you want to try this. Yes this is exactly where I want to go. I need a C++ and Mozart/oz environment, now does one have this default.nix committed to the mozart/oz project's repo? Should one use nix-shell to change to this environment? So portablility is ensured by committing the new environment to some folder branch in nixpkgs, or just ship default.nix? I compile the mozart2 compiler (which is dependent on boost) as soon as I try execute the development environment it blowsup because it can't see boost deps. So I obviously need a hybrid C++/mozart-oz solution. My dependencies are Boost, Tcl, Tk, xlibs, xproto, Java, clang, llvm, gtest, gcc, I also have a load of environmental variables. I noticed there is a build.sh which allows me to abstract away Mozart's build. Kind regards Stewart ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev