On 17-03-17 06:04pm, Volth wrote:
> "nix-shell" would be a super option here if it could handle
> "installPhase" (this seems easy to fix) and .nix files less trivial
> than "hello.nix" (this seems not easy to fix; for example "nix-shell
> '<nixpkgs>' -A linux_4_4" has no "configurePhase", and there are
> similar problems with almost every of the big projects; nix-shell
> launches "make" when "nix-build" launches "cmake" or vice-versa, etc)

That’s a pretty common stumbling block.

If someone defines his own `installPhase` for example,
the `installPhase` shell function is just the standard
stdenv `installPhase`. What you want to call is rather
the contents of `$installPhase` (the variable), since
that contains the phase you defined in `mkDerivation`.

nix-shell
$ unpackPhase
unpacking …
$ configurePhase
configuring …
$ buildPhase
…
$ $installPhase
running your installPhase


There is not much abstraction. Every nix attribute within
`derivation` (and by extension `mkDerivation`) will end up
as a bash shell variable in your shell (and your build env).

-- 
Proudly written in Mutt with Vim on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
May take up to five days to read your message. If it’s urgent, call me.
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to