[Nix-dev] Fwd: Re: Displaying package parameters

Jonn Mostovoy jm at memorici.de
Mon Feb 29 11:24:32 CET 2016


Wow, very nice!
Maybe people reporting that it doesn't work weren't patient enough to wait
for it to load the entirety of packages ;)

Regarding feature wishlist — this is good enough for package exploration,
I'm not sure that for developers using this during expression development
anything but a link to the expression (which you already have) is required.
—
Kindest regards,
¬Σ

On Mon, Feb 29, 2016 at 5:27 AM, Fabian Schmitthenner <
nix-dev at schmitthenner.eu> wrote:
> huh? what's the problem?
>
> To be clear, when clicking on a package, some parameters will be shown,
> e. g. asciidoc, qtbase.base have quite some parameters.
> For some packages, "error" "some error happened" is displayed, that
> means that the parameters couldn't be determined because callPackage
> wasn't used in the normal way. Also, currently packages that don't
> succeed are currently shown and the error is displayed in the long
> description.
>
> On 02/29/2016 04:14 AM, Roger Qiu wrote:
>> Demo doesn't seem to be working atm.
>>
>> On 29/02/2016 2:59 PM, Fabian Schmitthenner wrote:
>>> Hi!
>>>
>>> I just wanted to share that I tried displaying package parameters on the
>>> nixos homepage and the current result can be seen here:
>>> http://schmitthenner.eu/nixos-homepage/nixos/packages.html.
>>>
>>> When you click on a package, you hopefully see its parameter. This uses
>>> a heruristic to try to figure out which parameters are packages (and
>>> thus not displayed) and which are not (and thus displayed) that goes
>>> roughly as follows:
>>>
>>> - If the parameter is instantiated - either implicitly or explicitly -
>>> by callPackage, we look at the value and if it's a derivation, or a list
>>> or attrset set of derivations, or a function it's not displayed
>>> - Otherwise, it's displayed
>>>
>>> I think there was a discussion about this a short while ago, but I
>>> couldn't find it.
>>>
>>> Please let me know what you think and if we might want a (more elaborate
>>> version, e. g. also displaying the value of default arguments that
>>> aren't changed by callPackage, which requires an other change to nix
>>> because this info is currently not available, we only know if the
>>> argument is optional or not afaik) of this on our official website.
>>>
>>> Source code can be found on
>>> https://github.com/NixOS/nixos-homepage/compare/master...fkz:master
>>> Technically, I patched nixpkgs customization, so we not only get the
>>> override... functions, but also the original parameters and the original
>>> function.
>>> Furthermore, this uses a patched version of nix which allows catching
>>> errors inside nix (added a primop __catch) that also seems useful more
>>> generally (when polished) (see
>>> https://github.com/fkz/nix/tree/catch-throw).
>>>
>>> Fabian
>>> _______________________________________________
>>> nix-dev mailing list
>>> nix-dev at lists.science.uu.nl
>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>
>
>
> _______________________________________________
> 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/20160229/44052b1a/attachment.html 


More information about the nix-dev mailing list