Re: [Nix-dev] Node example?

2017-05-31 Thread Profpatsch
On 17-05-31 08:29am, Benno Fünfstück wrote:
> the reason it works on your test machine but doesn't work on CI is probably
> because of build sandboxing (see `build-use-sandbox` nix option: that
> disables network access & access to certain FS paths for nix builders).

btw can we please finally enable sandboxing by default?
That would be nice thx.

-- 
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
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Node example?

2017-05-31 Thread Harmen
On Wed, May 31, 2017 at 08:29:03AM +, Benno Fünfstück wrote:
> Hi Harmen,
> 
> the reason it works on your test machine but doesn't work on CI is probably
> because of build sandboxing (see `build-use-sandbox` nix option: that
> disables network access & access to certain FS paths for nix builders).

That fixed it!

I'm still not happy with the nix expression, but at least I have something to
work with now.

Thanks!
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Node example?

2017-05-31 Thread Benno Fünfstück
Hi Harmen,

the reason it works on your test machine but doesn't work on CI is probably
because of build sandboxing (see `build-use-sandbox` nix option: that
disables network access & access to certain FS paths for nix builders).


Regards,

Benno

Harmen  schrieb am Di., 30. Mai 2017 um 21:33 Uhr:

>
> (I got a reply offlist, I'll just answer here hoping the sender doesn't
> mind)
>
> node2nix works fine, but I do indeed need to build some frontend, using
> webpack.
>
> Currently I have two errors:
>
> Npm can't download the precompiled node-webpack binary, but rebuilds it
> from
> source every time I run nix. Downloading works fine on my laptop, but not
> on my
> CI machine (gitlab builder, nix-daemon). The error is 'getaddrinfo
> ENOTFOUND
> github.com github.com:443'. Should not be fatal (npm will build it from
> source), but looks fishy to me.
>
> The other, final, error is:
> sh:
> /nix/store/qvrv30xb597zr1ryw9d3n700pywxz3q9-node-my-dashboard-0.0.1/lib/node_modules/my-dashboard/node_modules/.bin/webpack:
> /usr/bin/env: bad interpreter: No such file or directory
> which, again, works fine on my test machine(s). Same nix version, same
> unstable
> nixpkgs nix-channel version.
>
>
> Thanks!
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> https://mailman.science.uu.nl/mailman/listinfo/nix-dev
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Node example?

2017-05-30 Thread Harmen

(I got a reply offlist, I'll just answer here hoping the sender doesn't mind)

node2nix works fine, but I do indeed need to build some frontend, using webpack.

Currently I have two errors:

Npm can't download the precompiled node-webpack binary, but rebuilds it from
source every time I run nix. Downloading works fine on my laptop, but not on my
CI machine (gitlab builder, nix-daemon). The error is 'getaddrinfo ENOTFOUND
github.com github.com:443'. Should not be fatal (npm will build it from
source), but looks fishy to me.

The other, final, error is:
sh: 
/nix/store/qvrv30xb597zr1ryw9d3n700pywxz3q9-node-my-dashboard-0.0.1/lib/node_modules/my-dashboard/node_modules/.bin/webpack:
 /usr/bin/env: bad interpreter: No such file or directory
which, again, works fine on my test machine(s). Same nix version, same unstable
nixpkgs nix-channel version.


Thanks!
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Node example?

2017-05-30 Thread Harmen
Hi all,

does anyone have an example of a nix expression to build a (react based) nodejs
project? I'm having some problems with writing the nix expression and can't
really formulate a proper question, but maybe some good example will help me on
my way. Ideally something which uses webpack to build static html (node is only
used at build time to generate the static files, it's not needed at runtime).

Thanks!
Harmen


___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev