dub with nix (issue introduced by dub >= dub-v1.31.0)

Ralph ralph.amissah at gmail.com
Sat Jul 8 18:24:23 UTC 2023


mea culpa (I have had another look)

Yes there was a change in the behavior of dub between v1.30.0 and 
v1.31.0 onward which (on NixOS) resulted in a build problem with 
attempting to write to a non-writable /homeless-shelter directory 
(on NixOS, possibly using nix generally I have not checked).

However, the change does not really matter as there is a simple 
solution within nix which is in the buildPhase to make sure that 
the directory HOME exists and/or is set to a writable directory.

export HOME=$(pwd)

which I just found here:
- https://github.com/NixOS/nix/issues/670

(It is not for want of having searched for the like (and not 
found such) earlier though).

I would not bother further digging into this matter of what 
changed within dub, at least on NixOS it does not seem to matter 
provided you know what to do if caught by it.

On the positive side I can confirm that all versions of dub 
including latest dub 1.33.1, build in nix and pass almost all 
tests (several were removed to make dub work with earlier nixpkg 
builds).

will update:
On Thursday, 6 July 2023 at 15:17:49 UTC, WebFreak001 wrote:
>>
>> https://github.com/NixOS/nixpkgs/pull/226813

Thank you for your feedback,
Ralph


More information about the Digitalmars-d mailing list