Re: [Nix-dev] drone and nix (sort of solved)

2017-06-18 Thread Harmen
On Sun, Jun 18, 2017 at 05:46:03AM +, Wout Mertens wrote:
> Nice! Why is it not perfect?

Idealy I would not have to do the one-time setup on every machine. But it's
good enough.

> 
> On Fri, Jun 16, 2017 at 1:21 PM Harmen  wrote:
> 
> > Hi all,
> >
> > I while ago here I asked about using nix with drone.io (a CI system which
> > uses docker), to deal with push based tests. I previously reported back
> > with a solution with gitlab, but I did end up with a workable (not perfect)
> > solution for drone.
> >
> > On the 'drone agent' machine run this once:
> >
> > # docker volume create nix
> > # docker run --rm -v nix:/newnix nixos/nix cp -a /nix/store /nix/var
> > /newnix
> >
> > in the .drone.yml files:
> >
> > pipeline:
> >   build:
> > image: nixos/nix
> > commands:
> >   ...
> > volumes:
> >   - nix:/nix/
> >
> > And whenever you want to update nixchannel:
> >
> > # docker run -v nix:/nix/ --rm -ti nixos/nix nix-channel --update
> >
> >
> > This will share the /nix directory with every build, so rebuild (and
> > downloads!) are kept to a minimum.
> >
> >
> > Maybe it helps someone.
> > Thanks!
> > Harmen
> >
> > ___
> > 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] drone and nix (sort of solved)

2017-06-17 Thread Wout Mertens
Nice! Why is it not perfect?

On Fri, Jun 16, 2017 at 1:21 PM Harmen  wrote:

> Hi all,
>
> I while ago here I asked about using nix with drone.io (a CI system which
> uses docker), to deal with push based tests. I previously reported back
> with a solution with gitlab, but I did end up with a workable (not perfect)
> solution for drone.
>
> On the 'drone agent' machine run this once:
>
> # docker volume create nix
> # docker run --rm -v nix:/newnix nixos/nix cp -a /nix/store /nix/var
> /newnix
>
> in the .drone.yml files:
>
> pipeline:
>   build:
> image: nixos/nix
> commands:
>   ...
> volumes:
>   - nix:/nix/
>
> And whenever you want to update nixchannel:
>
> # docker run -v nix:/nix/ --rm -ti nixos/nix nix-channel --update
>
>
> This will share the /nix directory with every build, so rebuild (and
> downloads!) are kept to a minimum.
>
>
> Maybe it helps someone.
> Thanks!
> Harmen
>
> ___
> 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


[Nix-dev] drone and nix (sort of solved)

2017-06-16 Thread Harmen
Hi all,

I while ago here I asked about using nix with drone.io (a CI system which uses 
docker), to deal with push based tests. I previously reported back with a 
solution with gitlab, but I did end up with a workable (not perfect) solution 
for drone.

On the 'drone agent' machine run this once:

# docker volume create nix
# docker run --rm -v nix:/newnix nixos/nix cp -a /nix/store /nix/var /newnix

in the .drone.yml files:

pipeline:
  build:
image: nixos/nix
commands:
  ...
volumes:
  - nix:/nix/

And whenever you want to update nixchannel:

# docker run -v nix:/nix/ --rm -ti nixos/nix nix-channel --update


This will share the /nix directory with every build, so rebuild (and
downloads!) are kept to a minimum.


Maybe it helps someone.
Thanks!
Harmen

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