profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/edolstra/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Eelco Dolstra edolstra Tweag I/O @tweag Utrecht, Netherlands http://nixos.org/~eelco/

edolstra/dwarffs 81

A FUSE filesystem that allows tools like gdb to look up debug info files via HTTP

edolstra/nix-repl 39

REPL for Nix

edolstra/nix-serve 38

A standalone Nix binary cache server

edolstra/import-cargo 26

A function for fetching the crates listed in a Cargo lock file

edolstra/nix-ccache 19

A flake to remotely build and/or cache C/C++ compilation, using recursive Nix

edolstra/nix-warez 11

Nix expressions for proprietary software

edolstra/nix-make 10

Experimental Nix build management stuff

edolstra/nix 9

Nix, the purely functional package manager

edolstra/aefs 8

AEFS, a cryptographic filesystem for Linux

issue commentNixOS/nix

[json.exception.parse_error.101] on `nix flake update`

I can't reproduce this, nix flake update works fine on the repo above:

$ nix flake update
warning: updating lock file '/home/eelco/Dev/nix/vf-sqlite-graphql/flake.lock':
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/0f1a3661f12b23e066b73909a07e36b60e824893' (2021-09-04)
  → 'github:nixos/nixpkgs/16483464441212d6b0c213c01dc06747d38831ea' (2021-09-21)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/1fc1a35ed2adfd7cdb781b8605383fef885e3aad' (2021-09-04)
  → 'github:oxalica/rust-overlay/d875f63082a3db25fa233d4ccd8f86b138c6cfeb' (2021-09-21)
warning: Git tree '/home/eelco/Dev/nix/vf-sqlite-graphql' is dirty
happysalada

comment created time in 16 hours

issue closedNixOS/nix

can `nix-hash` by default print all possible hashes in all possible forms?

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

It is often happen that nix-hash used interactively prints the hash in unexpected form, sha256 when sha512 is expected, base32 when base16 is expected, --recursive when --flat is expected.

That forces to alter the command line and run it again, sometimes more than once.

It takes time, both of the user and the computer.

Remembering available command like flags and their defaults is difficult, especially because nix-hash and nix hash-path have different defaults

Describe the solution you'd like Could nix-hash when run without command like flags (which fully specify what the user want to get) print the matrix of all possible hashes of the file/path in all their printable forms ?

Also, printing out the nar size would be a nice addition.

Examples:

# nix-hash $path
md5-flat: <base16> <base32> <sri>
sha1-flat: <base16> <base32> <sri>
sha256-flat: <base16> <base32> <sri>
sha512-flat: <base16> <base32> <sri>

narsize: <narsize>
md5: <base16> <base32> <sri>
sha1: <base16> <base32> <sri>
sha256: <base16> <base32> <sri>
sha512: <base16> <base32> <sri>
# nix-hash --recursive $path
narsize: <narsize>
md5: <base16> <base32> <sri>
sha1: <base16> <base32> <sri>
sha256: <base16> <base32> <sri>
sha512: <base16> <base32> <sri>
# nix-hash --recursive --type sha256 $path
narsize: <narsize>
sha256: <base16> <base32> <sri>
# nix-hash --recursive --base32 $path
narsize: <narsize>
md5: <base32>
sha1: <base32>
sha256: <base32>
sha512: <base32>

And the legacy form when the expected result is fully described for not to break bash scripts:

# nix-hash --recursive --base32 --type sha256 $path
<base32>

closed time in 16 hours

kvtb

issue commentNixOS/nix

can `nix-hash` by default print all possible hashes in all possible forms?

I don't think this is a good idea. In Nixpkgs you should almost always use sha256 in SRI format, so that's what nix hash {file,path} print by default. Printing non-standard hashes/formats is just confusing in general.

kvtb

comment created time in 16 hours

delete branch edolstra/nix

delete branch : restrict-path-inputs

delete time in 16 hours

push eventNixOS/nix

Eelco Dolstra

commit sha 5cbb9c5406f3058fcc9f99692490fbc5a4f57876

path fetcher: Fix relative path check

view details

Eelco Dolstra

commit sha 06557299b30f53c6d4a1a2e3068f36d9ef3df904

Allow relative paths anywhere into the parent's store path

view details

Eelco Dolstra

commit sha 60cc975d22c193cd70cc4e8d3fb5643728aec418

Set input parent at construction time

view details

Eelco Dolstra

commit sha c81f9761ccb40865edc497321752503abc0da858

Merge pull request #5279 from edolstra/restrict-path-inputs Fix relative path input handling

view details

push time in 16 hours

issue closedNixOS/nix

Restrict "path" inputs in flakes

Currently you can do wacky stuff like declaring an input foo.url = path:../, which will cause Nix to start copying the entire Nix store. We need to specify what absolute/relative paths are allowed in flake inputs. Some possibilities:

  • Don't allow paths at all.
  • Only allow paths from flakes accessed via a path: (or other local) URL. This way e.g. a github flake can't read local paths.
  • Only allow relative paths to other flakes in the same repository.

closed time in 16 hours

edolstra

PR merged NixOS/nix

Fix relative path input handling

Previously inputs like path:.. or path:../foo were accepted. In particular, path:.. caused Nix to copy the entire Nix store.

Fixes #5168.

+34 -19

0 comment

4 changed files

edolstra

pr closed time in 16 hours

PR opened NixOS/nix

Fix relative path input handling

Previously inputs like path:.. or path:../foo were accepted. In particular, path:.. caused Nix to copy the entire Nix store.

Fixes #5168.

+34 -19

0 comment

4 changed files

pr created time in 17 hours

create barnchedolstra/nix

branch : restrict-path-inputs

created branch time in 17 hours

push eventedolstra/nix

Eelco Dolstra

commit sha 29e556582e936157db04b372d5dbb9835fcc91cc

Tweak src/nix/daemon.md Co-authored-by: John Ericson <git@JohnEricson.me>

view details

push time in 20 hours

push eventedolstra/nix

Eelco Dolstra

commit sha 515dff9eb3ff36e72fc57496a9e1aa92a5767322

Tweak src/nix/daemon.md Co-authored-by: John Ericson <git@JohnEricson.me>

view details

push time in 20 hours

push eventedolstra/nix

Eelco Dolstra

commit sha 0bc3a5d6a756e46f03684c545f268806206c2d69

nix daemon: Add --stdio flag

view details

Eelco Dolstra

commit sha 8f357d24f669e7c847699842875ad4ba09aad20a

nix daemon: Document how to listen on a TCP port

view details

Eelco Dolstra

commit sha 61e7130411d053ddaef6af4133fc69c1aa04343a

Clean up PeerInfo handling

view details

Eelco Dolstra

commit sha 94c73776cade2e4e7697735e414742779126fad8

nix daemon: Support multiple sockets In conjunction with systemd socket activation, this allows the daemon to listen to multiple sockets, e.g. [Socket] ListenStream=/nix/var/nix/daemon-socket/socket ListenStream=1234

view details

Eelco Dolstra

commit sha 5b43bd6ead4c62d46c0066f16b16b78d7d5eb75d

nix daemon: Apply auth to --stdio

view details

Eelco Dolstra

commit sha 809874c3d3215ebe796d6a3517dfca8f959f22f1

Show IP client address

view details

Eelco Dolstra

commit sha 76395780bfbf1bb4442ba36e22c6e5b35b6924d1

Document systemd socket activation

view details

push time in a day

issue commentNixOS/nix

get-env.sh interprets hex literals in function bodies

Let's keep it open.

winterqt

comment created time in a day

delete branch NixOS/nix

delete branch : regnat/ci-better-cache-usage

delete time in 2 days

push eventNixOS/nix

regnat

commit sha 81ed6ee20199e99d3f22bfcbd49eafc678608fc0

flake: Use the real nixUnstable from nixpkgs Don’t let it pick our overriden lowdown as that would cause it not to be cached in cache.nixos.org

view details

Eelco Dolstra

commit sha be69a98d2cb707f5fe87dfa657e39c06cc95fb58

Merge pull request #5277 from NixOS/regnat/ci-better-cache-usage flake: Use the real nixUnstable from nixpkgs

view details

push time in 2 days

PR merged NixOS/nix

flake: Use the real nixUnstable from nixpkgs

Don’t let it pick our overridden lowdown as that would cause it not to be cached in cache.nixos.org.

This reduces the build times in the CI from 30mins to 20mins (so still not awesome, but already much better for a 1line change)

+3 -3

0 comment

1 changed file

regnat

pr closed time in 2 days

Pull request review commentNixOS/nix

set the PER_LINUX32 personality flag, when building for armv6l-linux or armv7l-linux

 void LocalDerivationGoal::runChild()             if (personality(PER_LINUX32) == -1)                 throw SysError("cannot set i686-linux personality");         }+        if (drv->platform == "armv7l-linux" || drv->platform == "armv6l-linux") {+          if (personality(PER_LINUX32) == -1)+            throw SysError("cannot set 32bit linux personality");+        }

This can be combined with the i686-linux case above it (i.e. if (... || drv->platform == "armv7l-linux" || drv->platform == "armv6l-linux") { ... }). Otherwise LGTM.

cleverca22

comment created time in 2 days

PullRequestReviewEvent

push eventedolstra/nix

Gregor Kleen

commit sha fd67a0f927ec0711eba59714939ff939fc95db38

Fix scheme argument to s3 cache

view details

Eelco Dolstra

commit sha 2933d3c588a256430064fe98abb393e79452f6c2

Merge pull request #5266 from gkleen/fix/s3-cache-scheme Fix scheme query parameter for s3 cache

view details

Eelco Dolstra

commit sha 0b52061d7f23db7f34f2b4c6f6b18d8465638416

Add TCP store Like UDSRemoteStore, but over a TCP connection. Example usage: $ nix path-info --store tcp://example.org:1234 ...

view details

push time in 2 days

push eventNixOS/nixos-org-configurations

Eelco Dolstra

commit sha 802db950e468d7722ac0ae13029b24a3810ca7fb

Remove ike and wendy

view details

Eelco Dolstra

commit sha 87f4bba1c56375db1377e80d7e9ebe6131365330

Remove lucifer and hydra These were turned off last year.

view details

Eelco Dolstra

commit sha 43a27604c68147a2b3da5c8a858857ca97ee3c30

Remove delft cruft

view details

push time in 2 days

issue commentNixOS/nix

get-env.sh interprets hex literals in function bodies

I think the easiest solution is to change

$'\xfe\xed\xfa\xcf'

to

$(printf '\xfe\xed\xfa\xcf')
winterqt

comment created time in 2 days

issue closedNixOS/nix

paths with 2+ derivers

Describe the bug

Not exactly the bug, just a source of inconsistency.

Nix codebase assumes that a path has at most 1 deriver. https://github.com/NixOS/nix/blob/c000cec27fcb16548606830410be265eb082f777/src/libstore/path-info.hh#L28-L31

It is not true for fixed-output derivations (and probably for CA too, I did not play with CA yet)

For example fetchurl $url and pkgsCross.whatever.fetchurl $url would produce the same output path, but they have different derivers.

This false assumption is propagated to many Nix commands, for example what build log will nix log display ? The path might have more than 1 build log.

It also affects nix-copy-closure and garbage collection. In a minor, not critical way. The main problem of peeking a random deriver when a path has 2+ of them is making difficult to reason about what a particular command will do exactly:

How many .drv files will remain after GC run with --option keep-derivations true if there are 2+ of them ?

Which one of the derivers will be rebuilt on nix-store --repair-path, and why only one, not all of them ?

closed time in 2 days

kvtb

issue commentNixOS/nix

paths with 2+ derivers

The deriver field simply records the specific derivation used to build the outputs. This is used in conjunction with gc-keep-derivations to keep track of the provenance of store paths. It cannot record all possible derivers, because there are an infinite number of them.

kvtb

comment created time in 2 days

push eventNixOS/nix

Gregor Kleen

commit sha fd67a0f927ec0711eba59714939ff939fc95db38

Fix scheme argument to s3 cache

view details

Eelco Dolstra

commit sha 2933d3c588a256430064fe98abb393e79452f6c2

Merge pull request #5266 from gkleen/fix/s3-cache-scheme Fix scheme query parameter for s3 cache

view details

push time in 2 days

PR merged NixOS/nix

Fix scheme query parameter for s3 cache

Fixes #4365

There seems to have been some variable shadowing such that the scheme argument passed to makeConfig was always s3.
Through renaming the offending variable the correct scheme now get's passed.


Fix is tested to work (push & pull) with …?scheme=http… in our CI.

+1 -1

0 comment

1 changed file

gkleen

pr closed time in 2 days

issue closedNixOS/nix

scheme argument is broken for s3 store on nixUnstable

Describe the bug

I want to set up binary cache as specified in https://nixos.org/manual/nix/unstable/package-management/s3-substituter.html but nix copy refuses to work without https when using nixUnstable package.

Steps To Reproduce

  1. Start minio
{
  services.minio = {
    enable = true;
    accessKey = "accessKey";
    secretKey = "secretKey";
  };
  systemd.services.minio.serviceConfig.StateDirectory = "minio";
}
  1. Go to http://127.0.0.1:9000/ and create test bucket
  2. Copy hello package to test bucket
$ export AWS_ACCESS_KEY_ID="accessKey"
$ export AWS_SECRET_ACCESS_KEY="secretKey"
$ nix build /nix/store/v5sv61sszx301i0x6xysaqzla09nksnd-hello-2.10
$ nix copy /nix/store/v5sv61sszx301i0x6xysaqzla09nksnd-hello-2.10 --to 's3://test?scheme=http&endpoint=127.0.0.1:9000'
AWS error '' (Unable to connect to endpoint with address : 127.0.0.1), will retry in 0 ms
AWS error '' (Unable to connect to endpoint with address : 127.0.0.1), will retry in 50 ms
AWS error '' (Unable to connect to endpoint with address : 127.0.0.1), will retry in 100 ms
AWS error '' (Unable to connect to endpoint with address : 127.0.0.1), will retry in 200 ms
AWS error '' (Unable to connect to endpoint with address : 127.0.0.1), will retry in 400 ms
AWS error '' (Unable to connect to endpoint with address : 127.0.0.1), will retry in 800 ms
AWS error '' (Unable to connect to endpoint with address : 127.0.0.1), will retry in 1600 ms
AWS error '' (Unable to connect to endpoint with address : 127.0.0.1), will retry in 3200 ms
AWS error '' (Unable to connect to endpoint with address : 127.0.0.1), will retry in 6400 ms
AWS error '' (Unable to connect to endpoint with address : 127.0.0.1), will retry in 12800 ms
error: --- Error --- nix
AWS error fetching 'nix-cache-info': Unable to connect to endpoint with address : 127.0.0.1

Expected behavior

The old version of nix is working fine

$ nix shell nixpkgs#nix -c nix copy /nix/store/v5sv61sszx301i0x6xysaqzla09nksnd-hello-2.10 --to 's3://test?scheme=http&endpoint=127.0.0.1:9000'
warning: unknown setting 'experimental-features'

nix-env --version output

$ nix-env --version
nix-env (Nix) 2.4pre20201201_5a6ddb3
$ nix shell nixpkgs#nix -c nix-env --version
warning: unknown setting 'experimental-features'
nix-env (Nix) 2.3.9

Additional context

Add any other context about the problem here.

closed time in 2 days

misuzu

issue commentNixOS/nix

Segmentation fault of builtins.listToAttrs with a derivation

You need parenthesis around list elements, i.e.

nix-repl> builtins.listToAttrs [(derivation {})]
error: attribute 'name' missing for call to 'listToAttrs'

       at «string»:1:1:

            1| builtins.listToAttrs [(derivation {})]
             | ^
            2|

Otherwise you get a list with two elements (derivation and {}).

junjihashimoto

comment created time in 5 days

PR opened NixOS/nix

Allow connecting to a Nix daemon via TCP

Lacking encryption/authentication, this is primarily useful to testing, e.g. when locally simulating high-latency SSH store connections via qdisc/netem.

Example usage:

# nix path-info --store tcp://example.org:1234 ...

TODO: add daemon support.

+107 -0

0 comment

1 changed file

pr created time in 5 days

push eventedolstra/nix

Eelco Dolstra

commit sha 03341e704c8be8386d3a3d5cbe3620a5b827e889

Add TCP store Like UDSRemoteStore, but over a TCP connection. Example usage: $ nix path-info --store tcp://example.org:1234 ...

view details

push time in 5 days

create barnchedolstra/nix

branch : tcp-store

created branch time in 5 days