profile
viewpoint
Silvan Mosberger Infinisil Gossau (SG), Switzerland Studied Computer Science at ETHZ. Using NixOS, the only true distro. Fluent in Nix and Haskell

Infinisil/all-hies 196

Cached Haskell IDE Engine Nix builds for all GHC versions

Infinisil/arvy 1

Bachelor thesis on Arvy Heuristics for Distributed Mutual Exclusion

flox/example-go 0

flox nix expressions framework example Go project

flox/example-perl 0

flox nix expressions framework example Perl project

flox/example-python 0

flox nix expressions framework example Python project

flox/nixexprs 0

Nix expressions for flox open-source packages

PullRequestReviewEvent

pull request commentNixOS/nixpkgs

lib/sources.nix: fix incorrect inherit

Thanks!

deviant

comment created time in 14 hours

push eventNixOS/nixpkgs

V

commit sha 3e1652f8f07e7f0e346317a813369a44c430f008

lib/sources.nix: fix incorrect inherit split comes from builtins, not lib. error: attribute 'split' missing, at /nix/path/nixpkgs/lib/sources.nix:4:4 (use '--show-trace' to show detailed location information)

view details

Silvan Mosberger

commit sha 78782d368e91d0b2814b9bb2f343353fe8583e01

Merge pull request #102191 from deviant/fix-inherit lib/sources.nix: fix incorrect inherit

view details

push time in 14 hours

PR merged NixOS/nixpkgs

Reviewers
lib/sources.nix: fix incorrect inherit 10.rebuild-darwin: 0 10.rebuild-linux: 0

split comes from builtins, not lib.

error: attribute 'split' missing, at /nix/path/nixpkgs/lib/sources.nix:4:4
(use '--show-trace' to show detailed location information)

<!-- To help with the large amounts of pull requests, we would appreciate your reviews of other pull requests, especially simple package updates. Just leave a comment describing what you have tested in the relevant package/service. Reviewing helps to reduce the average time-to-merge for everyone. Thanks a lot if you do! List of open PRs: https://github.com/NixOS/nixpkgs/pulls Reviewing guidelines: https://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/download/1/nixpkgs/manual.html#chap-reviewing-contributions -->

Motivation for this change
Things done

<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->

  • [x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • [x] NixOS
    • [ ] macOS
    • [ ] other Linux distributions
  • [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • [ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • [ ] Tested execution of all binary files (usually in ./result/bin/)
  • [ ] Determined the impact on package closure size (by running nix path-info -S before and after)
  • [ ] Ensured that relevant documentation is up to date
  • [x] Fits CONTRIBUTING.md.
+1 -1

0 comment

1 changed file

deviant

pr closed time in 14 hours

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 47581a646d68af9853eb3442a5a3346616ca7319

Make genProjectsJson work when calling from outside PWD

view details

push time in 19 hours

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 93f6903fe8eb760b7d4d25ba7536643de46a6158

Update genProjectsJson to take a nixexprs path

view details

push time in 19 hours

push eventflox/nixexprs

Silvan Mosberger

commit sha c9a86dd20ca293b092e3075292a77dcc20cf90e8

Add flox builders

view details

push time in a day

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 4522c7f47f81a27f3ed3186aa1212bf5c1040812

Fix python version not being propagated properly

view details

Silvan Mosberger

commit sha 4780ca3b0766aae7664b402aa849c1d554695f06

Don't error when no auto sets declared

view details

push time in 2 days

push eventlimeytexan/nixexprs

Silvan Mosberger

commit sha d3d88baed996894863ff85d525414fd5db56cf63

Update for latest nixexprs-lib changes

view details

push time in 2 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 9ae252284799330f8c6fc74e3e4da4ba4e2ff520

Simplify channel evaluation mechanism Previously each channel used a fixed point of pkgs as a base set, upon which it could add its own overlays for adding more packages. This had some problems: - Figuring out which attributes belong to the channel and which came from nixpkgs is tricky, especially with package sets, as overlays don't export that information easily - Overlays are already complicated, but with this you had two sets of overlays: Ones for nixpkgs and ones for the channel - Unexpected things can happen if you use nixpkgs attributes that were intended to be used in overlays. E.g. .extend or .pkgs and co. This commit makes this much simpler by using nixpkgs overlays for everything. However in order for the auto-called packages to not overlay nixpkgs packages deeply, the auto-called packages only get written to self.flox.outputs. And they are auto-called with both self and self.flox.outputs in scope in order to allow using the defined packages from others. This also gets rid of the confusing channelConfig construct, and instead replacing it with an auto-caller specific config, which they can manage using flox.auto.*. Auto-callers now also need to be defined using the `auto = ` argument of the main function, simplifying the process a bit.

view details

Silvan Mosberger

commit sha 86558b33e43e6ac4dc1b19c609f983c54d070c37

Flatten channel function into toplevel Now we only need a single function, so make the default.nix itself be it. This simplifies channel declaration

view details

push time in 2 days

create barnchInfinisil/nixpkgs

branch : zsh-alias-order

created branch time in 3 days

create barnchflox/example-go

branch : master

created branch time in 3 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 7ecd752f07d67512cd5b83d3dcaa976f1b2d3ed9

Readd callPackage to package sets, fix builder mistake

view details

push time in 3 days

create barnchflox/example-perl

branch : master

created branch time in 3 days

create barnchflox/example-python

branch : master

created branch time in 3 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha d725d362ba86f613779ce4814f1b6dca5fd88de6

Remove inputChannels and nixpkgsOverlays arguments - nixpkgsOverlays will be redesigned and wasn't used - inputChannels is going to be channels.json for now and Nix evaluation won't know about it

view details

push time in 3 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 6b1db5a5977d60bdbf217acc0e8a7ad653eb19f0

Get all channels by searching through NIX_PATH

view details

push time in 3 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 039955c5a93b56fedaedebbaa8c365bba7f47f05

Take channel nixexprs from <flox-channels> on NIX_PATH

view details

Silvan Mosberger

commit sha f384a031e4b7301916ae882b092d29711810346b

Get all channels by searching through NIX_PATH

view details

push time in 3 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 994d72a96624eb555ef484d15a28907bdcd0cc2c

Replace buggy lookupNixPath with builtins.findFile builtins.nixPath

view details

push time in 3 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 3cd0e58eb01d275b1cfc0801e02367ef977ce190

Return all outputs by default

view details

push time in 3 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha b195ccc8795e1d6c26bfa37d3f63ecc7a2e4d0df

Fix lookupNixPath missing /

view details

push time in 3 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 8b66e6c963200743b7b22203de300629f31e4f66

Remove unused overlays.nix file

view details

Silvan Mosberger

commit sha de22060e3dbc6cbc945c06a292d13e2428f2b40c

Move lookupNixPath to a separate file Allows for testing later

view details

push time in 3 days

push eventlimeytexan/nixexprs

Silvan Mosberger

commit sha eeca6c412fe188dfdc503c8e25cd9e45caa6ecde

Make nixexprs work with latest nixexprs-lib changes

view details

push time in 3 days

push eventInfinisil/nixexprs

Silvan Mosberger

commit sha bcd1607b7c68a05dba48ef13bb7ddca72a18352e

An empty commit

view details

push time in 3 days

push eventInfinisil/nixexprs

Silvan Mosberger

commit sha d4cee2c5433459742f1990150b64c12d2d8bbb4a

An empty commit

view details

push time in 3 days

issue commentInfinisil/nixus

Where-to-build

I had a small IRC conversation on this with @lheckemann: https://logs.nix.samueldr.com/nixus/2020-09-03#1599163378-1599164356;

In short:

  • Currently Nixus works on the Nix level entirely: It's just a Nix expression that you nix-build directly. And Nix expressions themselves can't control how they're built.
  • One thing that might be possible is to do some builtins.unsafeDiscardOutputDependency hackery for only transferring a derivation closure to the target host and calling nix-build there. This doesn't sound like a good solution

It would be possible to write a nixus binary that does the nix-build calling, with which the build location and what-have-you-not could be controlled. This also wouldn't be the only reason for a proper nixus script. Though @bqv argued before that they really like the simplicity of it just being a Nix expression (and I like that too), so ideally I'd like to allow both using a script or the Nix expression directly (albeit with less features then).

lheckemann

comment created time in 4 days

pull request commentNixOS/nix

[WIP] Lazy attribute names

Performance testing with the latest changes reveals that there's no measurable decrease in performance, yay! I heard you like plots? I give you plot (0 is the base of this PR, each number is an additional commit) plot


Infinite recursion detection

The main problem now is that infinite recursion detection is going to be much trickier, and I haven't figured that out. Previously if you had an unevaluated thunk (a Value with type = tThunk) which you want to evaluate, you'd set type = tBlackhole, then evaluate the expression the thunk points to, and throw an inf rec error if the evaluation tries to evaluate a tBlackhole (therefore trying to evaluate something while you're evaluating it already). Once it's evaluated, you set type = tAttrs or whatever the result is. This worked previously because a Value could either be unevaluated (tThunk, tApp, ...) or it could be evaluated (tAttrs, tInt, ...).

But with lazy attribute names, there's the new tLazyBinOp Value type, which is a value that can be partially evaluated, and that multiple times. E.g. if you have a = { x = 0; } // { y = 1; }, and you evaluate first a.y then a itself, you'll transform the Value multiple times:

  • Initially: type = tThunk
  • After a.y: type = tLazyBinOp; left.type = tThunk; right.type = tAttrs; by calling evalLazyBinOpAttrs
  • After a: type = tAttrs by calling evalLazyBinOp

With this, you can't just set type = tBlackhole the first time you evaluate a, because you may encountered a many more times after that, without having to encounter infinite recursion.

Here's some tricky examples of when inf rec should be triggered and when it shouldn't (currently the ones that should just give a stack overflow without position information):

{
  # Should throw inf rec
  a = let x = {} // x; in x.y;

  # Should not throw inf rec
  b = let x = x // { y = 0; }; in x.y;

  # Should throw inf rec
  c = let x = x // { y = 0; }; in x.z;

  # Should throw inf rec
  d = let x = { y = x.z; } // { z = x.y; }; in x.y;

  # Should not throw inf rec
  e = let x = ({ y = x.z; } // { z = x.y; }) // { y = 0; }; in x.z;

  # Should not throw inf rec, even with --strict
  f = let x = x.y // { y = {}; }; in x;
}
Infinisil

comment created time in 4 days

push eventInfinisil/nix

Silvan Mosberger

commit sha e8a7a5b2defcdcea45dab1a12bf71d447fabb68a

Disable all inf rec checking for now Since it throws inf rec when it doesn't have to sometimes

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha c4f9ac33bc83ba577842b319e807a2092bfb871c

Push small fixup for the recent argument change

view details

push time in 4 days

push eventInfinisil/nixexprs

Silvan Mosberger

commit sha 402869d0cb115df1576ea24d63698c9a540885b9

Add some packages

view details

push time in 4 days

push eventInfinisil/nixexprs

Silvan Mosberger

commit sha 0855e7f975ccd2c9890c51401c30cf36fa1f3a49

Add some inline package expressions

view details

push time in 4 days

push eventInfinisil/nixexprs

Silvan Mosberger

commit sha 0e249a7c6542407f1746ecfbdc132599dab4c23c

Another empty commit

view details

push time in 4 days

push eventInfinisil/nixexprs

Silvan Mosberger

commit sha 588a0e92fe2b4a6959cacb65a9434cc9749804d8

Another empty commit

view details

push time in 4 days

create barnchInfinisil/nixexprs

branch : inf1

created branch time in 4 days

create barnchInfinisil/nixexprs

branch : inf2

created branch time in 4 days

created repositoryInfinisil/nixexprs

created time in 4 days

create barnchInfinisil/nixexprs

branch : master

created branch time in 4 days

created repositoryInfinisil/nixexprs

created time in 4 days

push eventInfinisil/nixexprs-2

Silvan Mosberger

commit sha 95e547212a0ee89aee84944731c9781823631669

Empty commit

view details

push time in 4 days

push eventInfinisil/nixexprs-1

Silvan Mosberger

commit sha d0d1f3e69ec2c894c39f0394fdd9224100457c24

Empty commit

view details

push time in 4 days

create barnchInfinisil/nixexprs-1

branch : master

created branch time in 4 days

created repositoryInfinisil/nixexprs-1

created time in 4 days

create barnchInfinisil/nixexprs-2

branch : master

created branch time in 4 days

created repositoryInfinisil/nixexprs-2

created time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 267229f35e3decfb2bdfa5bff8c3a5b27ed97489

Move command line arguments inside channel function This then allows passing these arguments from the nixexprs repo directly with --arg

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 149bf1ea872722d6887c82c0480ef898739bccb3

Autocalling improvements - If you try to access python or pythonPackages without declaring a default python version, it will fail - nixexprsLib.auto.pkgs now exists for auto-calling packages - The auto-calling functions now don't set callPackage on the package sets, this should be handled elsewhere - Minor other improvements

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha b04f6023078be1476ba76292bca655803a22bfd3

Split flox attribute set into separate file

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha eb7759dab70d88b6064645eba9709aa9a0014976

Split flox attribute set into separate file

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha c7e841910b10ba426ba82c4678c555efc558acb2

Fix channelConfig propagation Previously any overlay that changed anything inflox.* wouldn't get applied, including a changed channelConfig

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha b9ba9558f08dfa5a0ca74934df021122c650b269

Remove some comment notes

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 746113a92906ee45374af9861b6e2deae409cafa

Error when a channel tries to access an undeclared input channel

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha fbf09111c0155f6a07eef49413738d07a9f4bf6d

Add perl directory auto-caller

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 01a35bc0e326f4a2d7c6583b6ae8919aeebb24b1

Rename channel argument channelName to name again

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 7454a84a97bab165fe1ec002005b5496bff577c7

Handle failures for genProjectsJson Previously, any failing package evaluation would prevent genProjectsJson.nix from outputting any result. This commit introduces a new genProjectsJson script which handles failures by just including the failing packages in the result and showing the error on stderr

view details

Silvan Mosberger

commit sha 715376d0c2a34f8b26f2f441f445e0d99455a87b

Return failures in genProjectsJson output Previously package evaluation failures would only be shown on stderr, which makes it hard to further process them. This commit makes it so that failures are also returned as a separate JSON key

view details

Silvan Mosberger

commit sha 9c8250823ce77efebe5f335ad5a7a8decd76c093

Moving autocallers, refactoring result passing/accessing - Now each channel returns an attribute set with attributes - channelArguments, which is the arguments passed to the channel function, used for inputChannels and outputOverlays - outputs, the final nested derivation set of outputs - floxChannels, all the unfiltered channels for debugging - The auto callers will be in auto.nix instead now - No more separate channel.nix file

view details

Silvan Mosberger

commit sha f21d76516beeb7a1b84f4d5728733d169a9e1d49

Rename channel argument channelName to name again

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 29199829cb5f3baeb2e743fe65b4b7bd6f31baab

Fix builder references to flox.source.setVersion

view details

push time in 4 days

push eventflox/nixexprs-lib

Silvan Mosberger

commit sha 3cc67cbd6c01e567bfd13661cd965abcfeb54db0

Make template somewhat work - Now taking arguments srcpath, manifest, manifest_json from --arg/--argstr again - Looks up $channel-meta for srcs and channels.json in NIX_PATH - Namespace most things in pkgs.flox - Initial definition of auto-calling ./pythonPackages - Fix channels depending on each other - More fixes here and there

view details

push time in 4 days

delete branch Infinisil/network

delete branch : channel-monitor

delete time in 5 days

push eventInfinisil/nix

Silvan Mosberger

commit sha 7b947a7eedd4e26880f80cd6cffcb94c967447a7

Pass left/right lazyBinOp to update functions directly The previous implementation relied on uninitialized memory not being a certain value for it to work

view details

Silvan Mosberger

commit sha 4a2c47a9b4013972abb9fe6cf8b7994868a3e518

Implement noAllocationValue for Expr's and use it to avoid some allocs

view details

push time in 5 days

push eventNixOS/nixpkgs

R. RyanTM

commit sha 7f7a303106b7504b59e0868bd9b601136a296dbb

pdd: 1.4 -> 1.5

view details

Silvan Mosberger

commit sha 605b1ecb0cd19048615f7d8b5dc7015303a13f28

Merge pull request #101603 from r-ryantm/auto-update/pdd pdd: 1.4 -> 1.5

view details

push time in 6 days

PR merged NixOS/nixpkgs

Reviewers
pdd: 1.4 -> 1.5 10.rebuild-darwin: 1 10.rebuild-darwin: 1-10 10.rebuild-linux: 1 10.rebuild-linux: 1-10

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.

meta.description for pdd is: "Tiny date, time diff calculator"

meta.homepage for pdd is: "https://github.com/jarun/pdd"

meta.changelog for pdd is: ""

Updates performed
  • Ran passthru.UpdateScript
To inspect upstream changes
Impact

<details> <summary> <b>Checks done</b> (click to expand) </summary>


  • built on NixOS

  • The tests defined in passthru.tests, if any, passed

  • 0 of 0 passed binary check by having a zero exit code.

  • 0 of 0 passed binary check by having the new version present in output.

  • found 1.5 with grep in /nix/store/p7y0i57mx50yzca0p1bzd5d39a0xkr2w-pdd-1.5

  • directory tree listing: https://gist.github.com/b42b9d62e5eb23c959281006d69d47a2

  • du listing: https://gist.github.com/f0778f6b0886e8a7574afdfd56309f5f


</details> <details> <summary> <b>Rebuild report</b> (if merged into master) (click to expand) </summary>

4 total rebuild path(s)

1 package rebuild(s)

1 x86_64-linux rebuild(s)
1 i686-linux rebuild(s)
1 x86_64-darwin rebuild(s)
1 aarch64-linux rebuild(s)


First fifty rebuilds by attrpath
pdd

</details>

<details> <summary> <b>Instructions to test this update</b> (click to expand) </summary>


Either download from Cachix:

nix-store -r /nix/store/p7y0i57mx50yzca0p1bzd5d39a0xkr2w-pdd-1.5 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.) For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.

Or, build yourself:

nix-build -A pdd https://github.com/r-ryantm/nixpkgs/archive/7f7a303106b7504b59e0868bd9b601136a296dbb.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:

ls -la /nix/store/p7y0i57mx50yzca0p1bzd5d39a0xkr2w-pdd-1.5
ls -la /nix/store/p7y0i57mx50yzca0p1bzd5d39a0xkr2w-pdd-1.5/bin

</details> <br/>

Pre-merge build results

We have automatically built all packages that will get rebuilt due to this change.

This gives evidence on whether the upgrade will break dependent packages. Note sometimes packages show up as failed to build independent of the change, simply because they are already broken on the target branch.

Result of nixpkgs-review 1 <details> <summary>1 package built:</summary> <ul> <li>pdd</li> </ul> </details>


Maintainer pings

cc @infinisil for testing.

+2 -2

0 comment

1 changed file

r-ryantm

pr closed time in 6 days

push eventInfinisil/system

Silvan Mosberger

commit sha 44948fbc5de63badcb02ae508b5e206125620312

Make servers have the kitty terminfo

view details

push time in 6 days

issue commentnix-community/docker-nixpkgs

Image errors for GitHub Actions

Was able to fix it for https://github.com/niteoweb/nix-docker-base with https://github.com/niteoweb/nix-docker-base/commit/0a5ceed0441a32b25a33b6904a47e007231b58c6, turns out it's a bit different for Nix. See also https://github.com/actions/checkout/issues/334#issuecomment-716068696. Feel free to reuse this fix for docker-nixpkgs.

Infinisil

comment created time in 7 days

issue commentactions/checkout

Error: /etc/*release "no such file or directory"

Nice, I also looked into this again and figured it out in Nix's case as well, see https://github.com/niteoweb/nix-docker-base/commit/0a5ceed0441a32b25a33b6904a47e007231b58c6 for the fix for nix-docker-base In short:

  • The node binary uses /lib64/ld-linux-x86-64.so.2 as the dynamic linker, so make sure that exists. For Nix, this should be ${pkgs.glibc}/lib/ld-linux-x86-64.so.2
  • The binary also depends on the dynamic library libstdc++.so.6, which by default isn't found, because Nix's glibc linker doesn't look into any /lib, etc. directories for finding libraries. The easiest way to make it find that library is by setting LD_LIBRARY_PATH to ${pkgs.stdenv.cc.cc.lib}/lib.

What I used for debugging:

  • Getting the node binary that GitHub Actions use:
    $ curl -L https://github.com/actions/runner/releases/download/v2.273.5/actions-runner-linux-x64-2.273.5.tar.gz \
      | tar -zxf- ./externals/node12/bin/node
    
  • Starting your Docker image with the externals folder mounted like the runner does:
    $ docker run -it -v $PWD/externals:/__e my-image
    
  • Using file to inspect the dynamic linker path:
    [docker]$ file /__e/node12/bin/node 
    /__e/node12/bin/node: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked,
      interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=78d3113df82429048fda632489c1b285c80716c3, with debug_info, not stripped
    
  • Running ldd on the binary to see any missing libraries:
    [docker]$ ldd /__e/node12/bin/node
      linux-vdso.so.1 (0x00007fffc67ce000)
      libdl.so.2 => /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib/libdl.so.2 (0x00007f231924c000)
      libstdc++.so.6 => not found
      libm.so.6 => /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib/libm.so.6 (0x00007f231910b000)
      libgcc_s.so.1 => /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib/libgcc_s.so.1 (0x00007f23190f1000)
      libpthread.so.0 => /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib/libpthread.so.0 (0x00007f23190d0000)
      libc.so.6 => /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib/libc.so.6 (0x00007f2318f11000)
      /lib64/ld-linux-x86-64.so.2 => /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib64/ld-linux-x86-64.so.2 (0x00007f2319253000)
    
    Here you can also see all the dynamic libraries the binary depends on. See https://man7.org/linux/man-pages/man8/ld.so.8.html for how these libraries are resolved and more info on how linking works. In particular setting LD_TRACE_LOADED_OBJECTS=1, LD_DEBUG=all and LD_VERBOSE=1 are useful for debugging linking.
drewmullen

comment created time in 7 days

push eventniteoweb/nix-docker-base

Silvan Mosberger

commit sha 0a5ceed0441a32b25a33b6904a47e007231b58c6

Hacks for allowing images to work in GitHub Actions

view details

Silvan Mosberger

commit sha e52180837fef32fa346df7494af9eac6934d0143

Revert "Support for using this as `container:` with GitHub Actions" This reverts commit 767fd04425fc81a8de402ef7adc7fff1fb62ef16. That commit never had the intended effect. The parent fixed this now

view details

push time in 7 days

push eventInfinisil/github-actions-docker

Silvan Mosberger

commit sha 877cce579501ef50251b8ffeaff414f57708ce27

Readd checkout

view details

push time in 7 days

push eventInfinisil/github-actions-docker

Silvan Mosberger

commit sha db71d2e7d8f86232ad908566e6c1a9445f0d6f8b

Try running the special node

view details

push time in 7 days

push eventInfinisil/github-actions-docker

Silvan Mosberger

commit sha 4b495dda6fd8a4d6d7d46941851862b7a5fa0f68

Self-hosted runner

view details

push time in 7 days

push eventInfinisil/github-actions-docker

Silvan Mosberger

commit sha b95a7c34d3bb6aa17382bdb54f25eb112d20da34

Try volume hack

view details

push time in 7 days

issue commentNixOS/nixpkgs

youtube-dl is broken due to DMCA takedown

I'd say let's wait a couple days for this to calm down. There is a chance that youtube-dl can be brought back up.

chris-martin

comment created time in 8 days

pull request commentNixOS/rfcs

[RFC 0042] NixOS settings options

I think the names suggested by @dali99 are perfect.

Infinisil

comment created time in 8 days

pull request commentNixOS/nixpkgs

lib/modules: mkRemovedOptionModule: warning instead of error

This works to only set options if they exist:

{ options, ... }: {
  config = optionalAttrs (options ? some.option) {
    some.option = "foo";
  };
}

Also related, my https://github.com/NixOS/nixpkgs/pull/97023 will allow assertions to be changed to warnings or silence them completely.

gebner

comment created time in 9 days

issue commentNixOS/nix

Allowing derivations to verify existence of dependency subpaths before building

Actually there's lib.addContextFrom for this already. Works pretty well actually, here's a demo:

let
  pkgs = import <nixpkgs> {};
  inherit (pkgs) lib;

  derivationPath = drv: path:
    let
      check = derivation {
        name = lib.strings.sanitizeDerivationName "check-${drv.name}-${path}";
        builder = pkgs.stdenv.shell;
        args = [ "-c" ''
          requiredPath=${drv}/${lib.escapeShellArg path}
          if [[ -e "$requiredPath" ]]; then
            > $out
          else
            echo "Path $requiredPath doesn't exist!"
            exit 1
          fi
        '' ];
        system = drv.system;
      };
    in lib.addContextFrom check (drv + "/${path}");

in pkgs.writeScript "test" ''
  #!${derivationPath pkgs.bash "bin/bash"}
  echo hi
''

This can be nix-build't just fine, but if you change the bash path to e.g. "bin/hash", it will fail before building!

Infinisil

comment created time in 10 days

issue commentnix-community/docker-nixpkgs

Image errors for GitHub Actions

Looks like somebody figured it out! https://github.com/actions/checkout/issues/334#issuecomment-713845806 With nixpkgs' Docker builders, these dynamic libraries could be added relatively easily, though this will sacrifice a bit of purity. I'll certainly give that a try soonish

Infinisil

comment created time in 10 days

push eventInfinisil/nix

Silvan Mosberger

commit sha f7c35536bd616cd9a784fdf24b7878a3243aea24

Evaluate ExprOpUpdate sides with maybeThunk I think this is needed so that any variables on the sides get updated properly Without this, bin/nix-instantiate ~/src/nixpkgs/nixos --arg configuration ~/src/nixpkgs/nixos/modules/profiles/demo.nix -A vm fails with a segfault Not sure why this doesn't happen with the commit that makes // lazy though

view details

push time in 10 days

pull request commentNixOS/nixpkgs

lib: Add listFilesRecursive function to filesystem

I'm not sure if filtering is needed, because the expensive part of builtins.path that requires filtering is the store importing. This function however only lists files (like find), which isn't very expensive, even for TB big directories.

And the result can still be filtered with just the list filter

fzakaria

comment created time in 10 days

push eventInfinisil/nix

Silvan Mosberger

commit sha 48511eaa144d6b1a5ed5f6da46eca2f51c04bd00

Unroll first iteration of ExprSelect loop to avoid thunk allocation

view details

Silvan Mosberger

commit sha 35d5be45d7eaaaac9ba3873f933e0eae96e1be0e

Introduce ExprLazyBinOp and tLazyBinOp This introduces an expression base class that can be used for lazy binary operations, along with a value type for storing partial results of such expressions

view details

Silvan Mosberger

commit sha 5b1ef7bf285bdd129b3210d9ecb02d2701416b98

Make ExprOpUpdate be an ExprLazyBinOp This makes the // operator lazy in attribute names, only evaluates what is necessary to get a specific attribute.

view details

Silvan Mosberger

commit sha 152048d000ff503a43335401fb9aad6b8b7768e5

Allocate LazyBinOp values separately from Value So as to not increase the sizeof(Value) from 24 bytes to 40 bytes

view details

push time in 10 days

push eventInfinisil/nix

Silvan Mosberger

commit sha be3a0c53bbcbb5e33de844b296f768f287e58c4e

Unroll first iteration of ExprSelect loop to avoid thunk allocation

view details

Silvan Mosberger

commit sha b133300f9dbdc84bc1ea2b3c9a2c0b98385fb1d8

Introduce ExprLazyBinOp and tLazyBinOp This introduces an expression base class that can be used for lazy binary operations, along with a value type for storing partial results of such expressions

view details

Silvan Mosberger

commit sha 0d98515ab3ab774d1863037d6b14860cee78fc97

Make ExprOpUpdate be an ExprLazyBinOp This makes the // operator lazy in attribute names, only evaluates what is necessary to get a specific attribute.

view details

Silvan Mosberger

commit sha fd714212784a0774e1c70d4f7350c3c2e8e3eef0

Allocate LazyBinOp values separately from Value So as to not increase the sizeof(Value) from 24 bytes to 40 bytes

view details

push time in 10 days

pull request commentNixOS/nixpkgs

nixos/nfs: add idmapd.settings option

You can add a Co-authored-by: ... field in the commit message to give credit to more people, see https://github.blog/2018-01-29-commit-together-with-co-authors/ :)

JustinLovinger

comment created time in 10 days

pull request commentNixOS/nixpkgs

lib: add mkEnabledOption

I think introducing such a function doesn't add much benefit, since as previously stated, the same can be achieved with mkEnableOption // { default = true; }, which is imo easier to understand and also tells the reader "Watch out there is something enabled by default here". In addition, generally the default state of "enable" options should be false, not true. By introducing such a function we would encourage true defaults. And finally, mkEnabledOption is very easy to confuse with mkEnableOption, both during authoring and reviewing of modules. If at all, it would have to be named differently.

Overall, I'm rather opposed to this change.

ju1m

comment created time in 11 days

PullRequestReviewEvent

issue openedNixOS/nix

Allowing derivations to verify existence of dependency-subpaths before building

Is your feature request related to a problem? Please describe.

When you reference a subpath of a dependency, e.g. "${pkgs.bash}/bin/bash", it can easily happen that the given path doesn't exist. E.g. "${pkgs.neovim}/bin/vim" doesn't exist, and this would only be caught at runtime (or never).

Describe the solution you'd like

Nix could have built-in support for verifying existence of dependency subpaths. The low-level interface for this could be a special __getDerivationSubpath (or so) attribute on derivations, which is a function taking a path and returning a string to that path within the derivation:

let
  foo = derivation { ... };
  bar = derivation {
    # Existence of "bin/foo" in the foo derivation gets verified when the build starts
    buildCommand = "cp ${foo.__getDerivationSubpath "bin/foo"} $out";

    # In comparison, this would've been done previously, without verification:
    # buildCommand = "cp ${foo}/bin/foo $out";
  };
in bar

To implement this:

  • The string context format will have to be changed to allow depending on specific paths, such that the __getDerivationSubpath function can return a string which can track a subpath dependency. This might look like
    builtins.getContext (pkgs.bash.__getDerivationSubpath "bin/bash")
    -> { "/nix/store/1psqjc0l1vmjsjy4ha5ywbv1l0993cka-bash-4.4-p23.drv" = { outputs = { out = [ "bin/bash" ]; }; }; }
    
  • The .drv format will have to be changed in the same way, such that the dependency subpaths can be communicated to the builder. This might look like
    {
      "inputDrvs": {
        "/nix/store/1psqjc0l1vmjsjy4ha5ywbv1l0993cka-bash-4.4-p23.drv": {
          "out" : [ "bin/bash" ]
        }
      }
    }
    
    To make this backwards compatible (and not change all hashes), Nix will probably have to support both old and new .drv formats, only opting into the new format for derivations whose path list in the string context is non-empty.
  • The derivation builder will have to be changed to verify all the given subpaths of each dependency before starting the build

Describe alternatives you've considered

Also brought up was that maybe more extensive checks could be allowed, e.g. that paths are executables or directories, which would then not only describe which paths are needed, but also what for. With this it would be hard to draw the line, as you could implement all kinds of checks. This might be something to look into in the future.

Additional context

This was discussed in #nixos with @cole-h, @grahamc and @viric

created time in 11 days

Pull request review commentNixOS/nixpkgs

Icecream support

+{ config, lib, pkgs, ... }:++with lib;++let+  cfg = config.services.icecream.daemon;+in {++  ###### interface++  options = {++    services.icecream.daemon = {++     enable = mkEnableOption "Icecream Daemon";++      openFirewall = mkOption {+        type = types.bool;+        description = ''+          Whether to automatically open receive port in the firewall.+        '';+      };++      openBroadcast = mkOption {+        type = types.bool;+        description = ''+          Whether to automatically open the firewall for scheduler discovery.+        '';+      };++      cacheLimit = mkOption {+        type = types.ints.u16;+        default = 256;+        description = ''+          Maximum size in Megabytes of cache used to store compile environments of compile clients.+        '';+      };++      netName = mkOption {+        type = types.nullOr types.str;

What does this null represent? This isn't obvious from the option description. I suggest adding an explanation for each of the nullable options.

Emantor

comment created time in 11 days

PullRequestReviewEvent

pull request commentNixOS/nixpkgs

Freeform modules

@dali99 Indeed, that's something that could be improved in the future. See also https://github.com/NixOS/nixpkgs/pull/63553 which is related.

Infinisil

comment created time in 11 days

push eventNixOS/nixpkgs

Etienne Laurin

commit sha d7464ab4bbb83694587bb2e217c032e0a6c0fd98

lib.splitString: use builtin.split

view details

Silvan Mosberger

commit sha a2fe9a7abc68c5356ed7167bd9aae7ea201f2435

Merge pull request #100953 from AtnNn/splitStrings Implement splitString using builtins.split

view details

push time in 11 days

PR merged NixOS/nixpkgs

Reviewers
Implement splitString using builtins.split 10.rebuild-darwin: 0 10.rebuild-linux: 0
Motivation for this change

splitString was slow and crashed on large strings, but it is still used over a hundred times in nixpkgs. Previously mentioned in:

  • https://github.com/NixOS/nix/issues/4147
  • https://github.com/NixOS/nixpkgs/pull/69345
  • https://github.com/NixOS/nixpkgs/issues/68951
Things done
  • [x] Ran nix-instantiate --eval --strict lib/tests/misc.nix
+28 -21

0 comment

2 changed files

AtnNn

pr closed time in 11 days

PullRequestReviewEvent

push eventNixOS/nixpkgs

Farid Zakaria

commit sha 5f1d1bc57e8071472780e8cb14f6306225a921f1

lib: Add readTree function to filesystem Add a friendly function to easily return a flattened list of files within a directory. This is useful if you want to easily iterate or concatSep the list of files all found within a directory. (i.e. when constructing Java's CLASSPATH) Style improvements Co-authored-by: Silvan Mosberger <github@infinisil.com>

view details

Silvan Mosberger

commit sha 6a94d64c101b977792cb7d1213855f4c20e5e838

Merge pull request #101096 from fzakaria/faridzakaria/readTree lib: Add listFilesRecursive function to filesystem

view details

push time in 11 days

PR merged NixOS/nixpkgs

Reviewers
lib: Add listFilesRecursive function to filesystem 10.rebuild-darwin: 0 10.rebuild-linux: 0
Motivation for this change

Add a friendly function to easily return a flattened list of files within a directory.

This is useful if you want to easily iterate or concatStringsSep the list of files all found within a directory. (i.e. when constructing Java's CLASSPATH)

❯ tree /nix/store/g87va52nkc8jzbmi1aqdcf2f109r4dvn-maven-repository | head
/nix/store/g87va52nkc8jzbmi1aqdcf2f109r4dvn-maven-repository
├── antlr
│   └── antlr
│       └── 2.7.2
│           ├── antlr-2.7.2.jar -> /nix/store/d027c8f2cnmj5yrynpbq2s6wmc9cb559-antlr-2.7.2.jar
│           └── antlr-2.7.2.pom -> /nix/store/mv42fc5gizl8h5g5vpywz1nfiynmzgp2-antlr-2.7.2.pom
├── avalon-framework
│   └── avalon-framework
│       └── 4.1.3
│           ├── avalon-framework-4.1.3.jar -> /nix/store/iv5fp3955w3nq28ff9xfz86wvxbiw6n9-avalon-framework-4.1.3.jar


❯ nix-repl> listFilesRecursive /nix/store/g87va52nkc8jzbmi1aqdcf2f109r4dvn-maven-repository
[ /nix/store/g87va52nkc8jzbmi1aqdcf2f109r4dvn-maven-repository/antlr/antlr/2.7.2/antlr-2.7.2.jar /nix/store/g87va52nkc8jzbmi1aqdcf2f109r4dvn-maven-repository/antlr/antlr/2.7.2/antlr-2.7.2.pom /nix/store/g87va52nkc8jzbmi1aqdcf2f109r4dvn-maven-repository/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar /nix/store/g87va52nkc8jzbmi1aqdcf2f109r4dvn-maven-repository/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.pom /nix/store/g87va52nkc8jzbmi1aqdcf2f109r4dvn-maven-repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar ..
Things done

<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->

  • [X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • [ ] NixOS
    • [ ] macOS
    • [ ] other Linux distributions
  • [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • [ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • [ ] Tested execution of all binary files (usually in ./result/bin/)
  • [ ] Determined the impact on package closure size (by running nix path-info -S before and after)
  • [ ] Ensured that relevant documentation is up to date
  • [X] Fits CONTRIBUTING.md.
+12 -0

1 comment

1 changed file

fzakaria

pr closed time in 11 days

issue commentNixOS/nixpkgs

Switching from 19.09 to 20.03 fails ACME renewals due to DNS being unavailable during switch

@nh2 Probably https://github.com/NixOS/nixpkgs/pull/99901

arianvp

comment created time in 11 days

pull request commentNixOS/nixpkgs

Add ability to configure executable for redshift service

Actually, what if we did it like the shells: Have pkgs.redshift.binaryPath be "/bin/redshift" by setting that in a passthru. Then this module can just use ${cfg.package}${cfg.package.binaryPath or "/bin/redshift"} as the executable, and we won't need an additional option, meaning this is a one-line change. The user could then make it use the gtk version with:

{
  package = pkgs.redshift // { binaryPath = "/bin/redshift-gtk"; };
}

How the shells do this: https://github.com/NixOS/nixpkgs/blob/37eb705a65b487046b7200dd960d549b9493cf2b/pkgs/shells/bash/5.0.nix#L124-L126 https://github.com/NixOS/nixpkgs/blob/37eb705a65b487046b7200dd960d549b9493cf2b/nixos/lib/utils.nix#L26-L29

sumnerevans

comment created time in 11 days

PullRequestReviewEvent

pull request commentNixOS/nix

[WIP] Lazy attribute names

Cleaned up the commits into smallish changes, undoing some smarts along the way, which unexpectedly fixed a bug I was encountering with this, nice!

I also did some proper performance measurement, and the results are not as bad as I thought (presumably the smarts I undid were also causing the worse performance). I wrote a little measurement and plotting script to do this:

measure: <details>

#!/usr/bin/env bash
set -euo pipefail

nixCommand() {
  #nix-instantiate '<nixpkgs/nixos>' \
  #  --arg configuration '<nixpkgs/nixos/modules/profiles/demo.nix>' \
  #  -A vm
  nix-instantiate ~/src/nixpkgs -A firefox
}

run() {
  local stats=$(mktemp)

  PATH=$PWD/bin:$PATH NIX_SHOW_STATS=1 NIX_SHOW_STATS_PATH="$stats" nixCommand >/dev/null 2>/dev/null

  jq -r '.cpuTime' "$stats"
  rm "$stats"
}

measure() {
  local name=$1
  local duration=$2
  local dest="times/$name"

  echo "Making sure binary is up-to-date"
  nix-shell --run "make install -j8"

  echo "Clearing any previous results in $dest"
  mkdir -p "$(dirname "$dest")"
  > "$dest"

  echo "Warming up with a single run"
  run >/dev/null

  epochStart=$(date +%s)
  epochEnd=$(( epochStart + duration ))

  echo "Measuring for at least $duration seconds"
  while now=$(date +%s) && [[ "$now" -le "$epochEnd" ]]; do
    result=$(run)
    echo "Measured $result seconds, writing to file. $(( epochEnd - now )) seconds left"
    echo "$result" >> "$dest"
  done
}

collectdata() {
  for f in times/*; do
    jq --arg name "$(basename "$f")" '[ ., inputs ] | map({ "CPU Time" : ., "Version" : $name })' -R "$f"
  done | jq -s '. | map(.[])'
}

plot() {
  collectdata > "data.json"
  # Last nixpkgs version where vega_lite wasn't broken
  vegaLite=$(nix-build --no-out-link https://github.com/NixOS/nixpkgs/archive/e1773ee0bb99e6785e2e06c0931cc8ffa9341d2a.tar.gz -A nodePackages.vega-lite)
  "$vegaLite/bin/vl2svg" plot.json plot.svg
  xdg-open plot.svg
}

case "$1" in
  plot)
    plot
    ;;
  *)
    measure "$1" "$2"
esac

</details>

plot.json: <details>

{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
  "description": "Nix performance on `nix-instantiate '<nixpkgs/nixos>' --arg configuration '<nixpkgs/nixos/modules/profiles/demo.nix>' -A vm`",
  "data": {"url": "data.json"},
  "mark": {
    "type": "boxplot",
    "extent": "min-max"
  },
  "encoding": {
    "x": {"field": "Version", "type": "nominal"},
    "color": {"field": "Version", "type": "nominal", "legend": null},
    "y": {
      "field": "CPU Time",
      "type": "quantitative",
      "scale": {"zero": false}
    }
  }
}

</details>

To use:

  • Check out the code version you'd like to test
  • Run ./measure some-id 300, which runs the nixCommand in the script for 300 seconds, storing the results in times/some-id
  • Repeat with all the other commits you want to compare against, changing the some-id for each of them
  • Run ./measure plot, which uses Vega Lite to render all the measurements as a box plot

With 0 representing the base commit of this PR (master), 1 the first commit of this PR, 2 the second commit, etc., the plot looks as follows (with ~275 samples): plot

Note how this is only a tiny bit slower, from ~0.62 to ~0.64! And I do believe some things can be optimized still, so I hope to be able to improve performance with this PR in the end :)

Infinisil

comment created time in 11 days

CommitCommentEvent
PullRequestReviewEvent

pull request commentNixOS/rfcs

[RFC 0072] Switch to CommonMark for documentation

Alright, this looks good to me, I'm calling FCP. Unless any blockers are brought up, this should get accepted and merged in 10 days from now, on October 30!

mboes

comment created time in 11 days

PullRequestReviewEvent

Pull request review commentNixOS/nixpkgs

lib: Add readTree function to filesystem

               type = (builtins.readDir parent).${base} or null;           in file == /. || type == "directory";     in go (if isDir then file else parent);+++  # readTree: Path -> [ Path ]+  #+  # Given a directory, return a flattened list of all files within it.+  readTree = dir: lib.flatten(lib.mapAttrsToList(name: type:+    if (type == "directory") then+      lib.filesystem.readTree(dir + "/${name}")
  readTree = dir: lib.flatten (lib.mapAttrsToList (name: type:
    if type == "directory" then
      lib.filesystem.readTree (dir + "/${name}")

To make the style consistent

fzakaria

comment created time in 12 days

PullRequestReviewEvent

PR opened grahamc/network

Point nix-channel-monitor to nixpkgs instead of nixpkgs-channels

nixpkgs-channels has been deprecated and won't be updated anymore

Tested this with a different domain and no amqp

+4 -2

0 comment

2 changed files

pr created time in 12 days

more