| 29 Aug 2024 |
@adis:blad.is | ^ This kinda thing is a reason why we should move away from functional abstractions a la buildNpmPackage to stdenv hooks instead | 23:29:27 |
@adis:blad.is | It's a bit too hard to grok composition currently | 23:29:38 |
emily | (but why build one derivation when you can build two?) | 23:30:26 |
@adis:blad.is | In reply to @emilazy:matrix.org (but why build one derivation when you can build two?) I'm a bit of a derivation collector myself | 23:34:11 |
Winter | In reply to @adis:blad.is
It's actually not that hard to build it as one derivation.
buildGoModule {
npmDeps = fetchNpmDeps { ... }; # Or use importNpmLock
npmBuildScript = "build";
nativeBuildInputs = with npmHooks; [ npmConfigHook npmBuilidHook npmInstallHook nodejs.python ]; # Or importNpmLock.npmConfigHook
}
it's not i just forgot if buildGoModule fucks it up or not | 23:50:25 |
Winter | In reply to @adis:blad.is ^ This kinda thing is a reason why we should move away from functional abstractions a la buildNpmPackage to stdenv hooks instead providing both isn't bad when you don't need composition, which is why i provided both and not just one (...like Go...) | 23:50:57 |
@adis:blad.is | In reply to @winter:catgirl.cloud providing both isn't bad when you don't need composition, which is why i provided both and not just one (...like Go...) I'm really of two minds about that. One the one hand, yes, you get more compact/convenient code. OTOH it really gives you concept overload and it's actually harder to learn what's going on. | 23:52:41 |
@adis:blad.is | The learning curve of the functional abstractions looks more like a cliff than a curve | 23:53:19 |