[Nix-dev] Rust prebuilt package overlay.

William Casarin jackbox55 at gmail.com
Fri Apr 14 16:40:41 CEST 2017


Nicolas Pierron <nicolas.b.pierron at nbp.name> writes:

> On Tue, Mar 7, 2017 at 1:41 PM, Profpatsch <mail at profpatsch.de> wrote:
>> On 17-03-04 08:34pm, Nicolas Pierron wrote:
>>> The *.toml manifest file is then parsed (yes, in Nix [3]) to extract
>>> [3] https://github.com/mozilla/nixpkgs-mozilla/blob/master/lib/parseTOML.nix
>>
>> what have you done
>
> I made tool to avoid updating this repository every time there is a
> new nightly version of rustc.
> This Nix expression is able to parse a 200 kB toml file in less than 1 second.

apparently you have angered the hacker gods on macos:

nixpkgs (efe12d665812e2c5f7c20513a829edff5b8b1977)
nixpkgs-mozilla (4779fb7776c3d38d78b5ebcee62165e6d1350f74)
nix-env (Nix) 1.11.8

$ nix-shell -p rustChannels.stable.rust

error: while evaluating the attribute ‘nativeBuildInputs’ of the derivation ‘shell’ at /Users/jb55/dev/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating ‘getOutput’ at /Users/jb55/dev/nixpkgs/lib/attrsets.nix:453:23, called from undefined position:
while evaluating ‘getCrossDrv’ at /Users/jb55/dev/nixpkgs/pkgs/stdenv/generic/default.nix:133:21, called from undefined position:
while evaluating the attribute ‘stable.rust’ at /Users/jb55/etc/nixpkgs-mozilla/rust-overlay.nix:154:5:
while evaluating ‘fromManifest’ at /Users/jb55/etc/nixpkgs-mozilla/rust-overlay.nix:85:28, called from /Users/jb55/etc/nixpkgs-mozilla/rust-overlay.nix:154:15:
while evaluating ‘flip’ at /Users/jb55/dev/nixpkgs/lib/trivial.nix:109:16, called from /Users/jb55/etc/nixpkgs-mozilla/rust-overlay.nix:87:21:
while evaluating ‘mapAttrs’ at /Users/jb55/dev/nixpkgs/lib/attrsets.nix:198:17, called from /Users/jb55/dev/nixpkgs/lib/trivial.nix:109:19:
while evaluating ‘fromTOML’ at /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:133:14, called from /Users/jb55/etc/nixpkgs-mozilla/rust-overlay.nix:86:16:
while evaluating ‘zipAttrs’ at /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:137:18, called from /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:149:7:
while evaluating ‘parser’ at /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:130:12, called from /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:135:19:
while evaluating ‘closeSection’ at /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:91:18, called from /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:131:5:
while evaluating ‘tokenizer’ at /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:41:15, called from /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:131:53:
while evaluating ‘tokenizer_rec’ at /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:6:46, called from /Users/jb55/etc/nixpkgs-mozilla/lib/parseTOML.nix:41:20:
compiling pattern ‘([
]+(=|[[][[][a-zA-Z0-9_."*-]+[]][]]|[[][a-zA-Z0-9_."*-]+[]]|[a-zA-Z0-9_-]+|"[^"]*")[ 
[... same line repeated 4094 times ...]
]+(=|[[][[][a-zA-Z0-9_."*-]+[]][]]|[[][a-zA-Z0-9_."*-]+[]]|[a-zA-Z0-9_-]+|"[^"]*")).*’: out of memory



Looks like some kind of infinite recursion bug?
Seems to work fine on my nixos box though 🤔

Cheers,


More information about the nix-dev mailing list