Vladimír Čunát wrote:
On 04/08/2014 02:29 PM, Roelof Wobben wrote:
but when I do nix-build -A cinnamon-settings-daeemon in the directory
which contains the nix file I get a message that default.nix cannot be
found.
Normally, you should call nix-build in the root of the nixpkgs tree,
or supply the root by -f parameter. Also, you need -A
cinnamon.cinnamon-settings-daemon to specify the attribute path.
I must say I find this part of the CLI a bit unfriendly. In everything I did
with Nix until now I always used the same top-level Nix expression,
currently this is ~/.nix-defexpr/channels/nixos-13.10/nixpkgs (which gets
automatically created by nix-channel). I should probably make myself a shell
alias
alias nix-build='nix-build ~/.nix-defexpr/channels/nixos-13.10/nixpkgs'
The reason I always use the same top-level expression is that I do not (yet)
want to make changes in the nixpkgs themselves. I do all my work under
.nixpkgs (which I made a symlink to my real working dir where I keep my
stuff under version control) (ab-)using .nixpkgs/config.nix to merge in my
own packages:
ben@sarun[1]: ~ ls .nixpkgs/
config.nix epics
ben@sarun[1]: ~ cat .nixpkgs/config.nix
{
packageOverrides = pkgs: with pkgs; rec {
epics_base = callPackage epics/base/full.nix { version = 3.14.12.4; };
...
}
(If there is a simpler or more idiomatic way to achieve this, please tell
me.)
Cheers
--
Make it so they have to reboot after every typo. -- Scott Adams
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev