!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

408 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.135 Servers

Load older messages


SenderMessageTime
15 Aug 2025
@helle:tacobelllabs.nethelle (just a stray cat girl)ty for the sanity check20:22:43
@emilazy:matrix.orgemilywell, technically you can have POSIX-compliant systems that just refuse to implement half the spec, so there's a limit to how much fallback code is sensible to write :P20:30:30
@emilazy:matrix.orgemilybut in this case it seems reasonable20:30:35
@helle:tacobelllabs.nethelle (just a stray cat girl)heh, yeah, also it not being on a hot path and all20:37:14
@niko:nrab.lolniko ⚡️

That's awesome, darwin failures that only happened on nixpkgs-unstable no longer happen when I rebuilt lix today. Meanwhile, there's a new failure, this time libcmd. There's this small snippet:

    # Use a temporary home directory for the unit tests.
    # Otherwise, /homeless-shelter is created in the single-user sandbox, and functional tests will fail.
    # TODO(alois31): handle TMPDIR properly (meson can't, and setting HOME in the test is too late)…
    'HOME': '/tmp/nix-test/libcmd-unit-tests',

which you'd think makes everything work just fine, right? WRONG. The code does this:

        auto homeDir = getEnv("HOME");
        if (homeDir) {
            // Only use `$HOME` if it exists and is owned by the current user.
            struct stat st;
            int result = stat(homeDir->c_str(), &st);

and obviously HOME does not exist so it falls back to getpwuid_r. Which just so happens to work on Linux because dynamic sandbox user gets put in the user database, but OOPS it doesn't work on darwin!

22:23:52
@niko:nrab.lolniko ⚡️Now I need someone that'll help me come up with a solution to this problem, either how can I basically mkdir -p $HOME before running this test oooor idk what the alternative is but lix really wants to know the home directory of user22:24:45
@emilazy:matrix.orgemily auto-allocate-uids on Darwin needs to insert the users into the user database 22:29:17
@emilazy:matrix.orgemilythat is the only way it will ever work22:29:23
@emilazy:matrix.orgemilyit's not practical to patch every piece of software in the world to deal with running as a user that doesn't exist22:30:12
@niko:nrab.lolniko ⚡️

Fair but also I'd argue this is an improvement in the meson file (also addresses the TODO which claimed respecting TMPDIR is impossible with meson)

    # Use a temporary home directory for the unit tests.
    # Otherwise, /homeless-shelter is created in the single-user sandbox, and functional tests will fail.
    'HOME': run_command('mktemp', '-d', 'libcmd-unit-tests.XXXXXX', check: true).stdout().strip()

and it addresses the failure (which, while a band-aid, is a fix nonetheless, and lix not building with auto-allocate-uids is a regression)

22:38:09
@niko:nrab.lolniko ⚡️ Lix tests already depend on mktemp being in PATH so this shouldn't be very radical either 22:38:57
@niko:nrab.lolniko ⚡️Aaaanyway after fixing this failure turns out functional tests still are failing, just the unit test failure was covering them22:41:48
@emilazy:matrix.orgemilyseems reasonable enough22:56:07
@emilazy:matrix.orgemily we should close off /tmp for macOS anyway 22:56:13
16 Aug 2025
@aloisw:julia0815.dealoiswNice hack, thanks. While it only runs at configure time, it should be good enough for most purposes. Can you submit a patch?08:01:41
@k900:0upti.meK900OK I may be being a dumbass08:45:22
@k900:0upti.meK900But how do you force nix-store to not daemon08:45:31
@k900:0upti.meK900 Because error: operation 'repairPath' is not supported by store 'daemon' 08:45:57
@k900:0upti.meK900 OK explicit --store / did it 08:46:27
@helle:tacobelllabs.nethelle (just a stray cat girl)please note, learning is never dumb, we all started out not knowing stuff, asking should not come with a bonus feeling of negative that said, I actually don't remember either, heh08:46:32
@qyriad:katesiria.orgQyriad
In reply to @k900:0upti.me
OK explicit --store / did it
--store local also works
08:46:58
@k900:0upti.meK900Somehow I OOMed in a particularly cursed way08:47:36
@k900:0upti.meK900And now my store is fucked08:47:41
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)kernels?08:47:54
@k900:0upti.meK900Nope08:48:00
@k900:0upti.meK900Webkits08:48:04
@k900:0upti.meK900I have enough to not OOM on kernels08:48:15
@k900:0upti.meK900Oh wow I think it might be time to exterminatus this store08:51:59
@k900:0upti.meK900GODDAMMIT11:52:57
@k900:0upti.meK900It was not the store at all11:53:01

Show newer messages


Back to Room ListRoom Version: 10