[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nix-dev
Subject:    Re: [Nix-dev] Fwd: Re: Displaying package parameters
From:       Jonn Mostovoy <jm () memorici ! de>
Date:       2016-02-29 10:24:32
Message-ID: CANZXW7+Ueqsvo1YwkRrrwhnuKW9yQoeAn+sNGUecjq9tOoSK9w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@lists.science.uu.nl
>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev

[Attachment #5 (text/html)]

<p dir="ltr">Wow, very nice!<br>
Maybe people reporting that it doesn&#39;t work weren&#39;t patient enough to wait \
for it to load the entirety of packages ;)</p> <p dir="ltr">Regarding feature \
wishlist — this is good enough for package exploration, I&#39;m not sure that for \
developers using this during expression development anything but a link to the \
expression (which you already have) is required.<br> —<br>
Kindest regards,<br>
 ¬Î£<br></p>
<p dir="ltr">On Mon, Feb 29, 2016 at 5:27 AM, Fabian Schmitthenner &lt;<a \
href="mailto:nix-dev@schmitthenner.eu">nix-dev@schmitthenner.eu</a>&gt; wrote:<br> \
&gt; huh? what&#39;s the problem?<br> &gt;<br>
&gt; To be clear, when clicking on a package, some parameters will be shown,<br>
&gt; e. g. asciidoc, qtbase.base have quite some parameters.<br>
&gt; For some packages, &quot;error&quot; &quot;some error happened&quot; is \
displayed, that<br> &gt; means that the parameters couldn&#39;t be determined because \
callPackage<br> &gt; wasn&#39;t used in the normal way. Also, currently packages that \
don&#39;t<br> &gt; succeed are currently shown and the error is displayed in the \
long<br> &gt; description.<br>
&gt;<br>
&gt; On 02/29/2016 04:14 AM, Roger Qiu wrote:<br>
&gt;&gt; Demo doesn&#39;t seem to be working atm.<br>
&gt;&gt;<br>
&gt;&gt; On 29/02/2016 2:59 PM, Fabian Schmitthenner wrote:<br>
&gt;&gt;&gt; Hi!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I just wanted to share that I tried displaying package parameters on \
the<br> &gt;&gt;&gt; nixos homepage and the current result can be seen here:<br>
&gt;&gt;&gt; <a href="http://schmitthenner.eu/nixos-homepage/nixos/packages.html">http://schmitthenner.eu/nixos-homepage/nixos/packages.html</a>.<br>
 &gt;&gt;&gt;<br>
&gt;&gt;&gt; When you click on a package, you hopefully see its parameter. This \
uses<br> &gt;&gt;&gt; a heruristic to try to figure out which parameters are packages \
(and<br> &gt;&gt;&gt; thus not displayed) and which are not (and thus displayed) that \
goes<br> &gt;&gt;&gt; roughly as follows:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; - If the parameter is instantiated - either implicitly or explicitly \
-<br> &gt;&gt;&gt; by callPackage, we look at the value and if it&#39;s a derivation, \
or a list<br> &gt;&gt;&gt; or attrset set of derivations, or a function it&#39;s not \
displayed<br> &gt;&gt;&gt; - Otherwise, it&#39;s displayed<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I think there was a discussion about this a short while ago, but I<br>
&gt;&gt;&gt; couldn&#39;t find it.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Please let me know what you think and if we might want a (more \
elaborate<br> &gt;&gt;&gt; version, e. g. also displaying the value of default \
arguments that<br> &gt;&gt;&gt; aren&#39;t changed by callPackage, which requires an \
other change to nix<br> &gt;&gt;&gt; because this info is currently not available, we \
only know if the<br> &gt;&gt;&gt; argument is optional or not afaik) of this on our \
official website.<br> &gt;&gt;&gt;<br>
&gt;&gt;&gt; Source code can be found on<br>
&gt;&gt;&gt; <a href="https://github.com/NixOS/nixos-homepage/compare/master...fkz:master">https://github.com/NixOS/nixos-homepage/compare/master...fkz:master</a><br>
 &gt;&gt;&gt; Technically, I patched nixpkgs customization, so we not only get \
the<br> &gt;&gt;&gt; override... functions, but also the original parameters and the \
original<br> &gt;&gt;&gt; function.<br>
&gt;&gt;&gt; Furthermore, this uses a patched version of nix which allows \
catching<br> &gt;&gt;&gt; errors inside nix (added a primop __catch) that also seems \
useful more<br> &gt;&gt;&gt; generally (when polished) (see<br>
&gt;&gt;&gt; <a href="https://github.com/fkz/nix/tree/catch-throw">https://github.com/fkz/nix/tree/catch-throw</a>).<br>
 &gt;&gt;&gt;<br>
&gt;&gt;&gt; Fabian<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; nix-dev mailing list<br>
&gt;&gt;&gt; <a href="mailto:nix-dev@lists.science.uu.nl">nix-dev@lists.science.uu.nl</a><br>
 &gt;&gt;&gt; <a href="http://lists.science.uu.nl/mailman/listinfo/nix-dev">http://lists.science.uu.nl/mailman/listinfo/nix-dev</a><br>
 &gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; nix-dev mailing list<br>
&gt; <a href="mailto:nix-dev@lists.science.uu.nl">nix-dev@lists.science.uu.nl</a><br>
&gt; <a href="http://lists.science.uu.nl/mailman/listinfo/nix-dev">http://lists.science.uu.nl/mailman/listinfo/nix-dev</a><br>
 </p>



_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic