Gabriella439 / Haskell-Nix-Derivation-Library

Parse and render *.drv files
BSD 3-Clause "New" or "Revised" License
37 stars 10 forks source link

pretty-derivation leaks memory #11

Closed mweinelt closed 3 years ago

mweinelt commented 3 years ago

I'm trying to pretty-print the derivation of zigbee2mqtt in this branch https://github.com/NixOS/nixpkgs/pull/114896. After ~22 GB RAM used earlyoom decides to kill the process.

Gabriella439 commented 3 years ago

The fix is up here: https://github.com/Gabriel439/Haskell-Nix-Derivation-Library/pull/13

I tested that against the zigbee2mqtt derivation. Before the fix I was able to reproduce the leak and after the fix it now takes about 1-2 seconds to print the derivation.

mweinelt commented 3 years ago

Thank you. I've been using nix-derivation from within nixpkgs, so I'm not in a position to test drive this change.