[Nix-dev] monitor.nixos.org

zimbatm zimbatm at zimbatm.com
Tue Nov 29 00:50:24 CET 2016


Do we need a way to select the revision or branch maybe? I'm just thinking
of the interface that the script should have. Otherwise I would agree with
Garbas overall. Over time I would expect some sort of convention to
establish itself but we don't need to do it straight away.

On Mon, 28 Nov 2016 at 22:06 Rok Garbas <rok at garbas.si> wrote:

> On Mon, Nov 28, 2016 at 9:42 PM, Profpatsch <mail at profpatsch.de> wrote:
> > On 16-11-28 03:11pm, Rok Garbas wrote:
> >> On Mon, Nov 28, 2016 at 2:37 PM, Bjørn Forsman <bjorn.forsman at gmail.com>
> wrote:
> >> To start this we _only_ need to agree how we call this passthru
> >> attribute :) ... update, updateSrc, refresh, refreshSrc, nextVersion,
> >> ...
> >
> > Exactly.
> > And of course the interface of what the script at this point should do.
> >
> > I’m not sure how to apply the changes to the source files in a sane way.
> > No, regex replacement is definitely *not* a sane way.
> > To be fair, the lisp guys have an advantage of about half a century
> > with source code modification.
> >
>
> We don't need to define what that update script should do, since a
> maintainer of that package also makes sure that generated files
> (json/nix/...) that this update script provides will be read by the
> package expression.
>
> Now even if update script does some weird regex etc... and fails also
> the build afterwards will fail and we don't merge the updated files.
>
> I think Nix has the advantage here actually. A maintainer can write an
> update script in any language that he is most comfortable with. On the
> end they have to support it etc... BUT everybody can run the update
> without knowing that this is a ruby script since ``nix-shell``
> provides all the needed dependencies for us.
>
> here are two examples:
>  - update script stores a json and that json is passed to fetchFromGitHub
>
> https://github.com/mozilla-releng/services/blob/master/nix/tools/default.nix#L66
>  - update script generated nix files (pypi2nix, go2nix, cabal2nix, ...)
>
> https://github.com/mozilla-releng/services/blob/master/nix/tools/default.nix#L18
>
> and this is the main entry script which i use to run multiple update
> commands
> https://github.com/mozilla-releng/services/blob/master/nix/update.nix
>  - to run update on one package ->nix-shell nix/update.nix --argstr
> pkg releng_docs
>  - to run updates on all packages -> nix-shell nix/update.nix
>
> So on the end we really need to just figure out the name ;) and start
> writing update scripts. Even if they are full of regex :P
>
>
> --
> Rok Garbas
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20161128/2a7aa31a/attachment-0001.html>


More information about the nix-dev mailing list