!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

574 Members
127 Servers

Load older messages


SenderMessageTime
30 Nov 2024
@k900:0upti.meK900The package probably just needs to be fixed19:14:46
@kuruczgy:matrix.orgkuruczgy
In reply to @kuruczgy:matrix.org
Reverting https://github.com/NixOS/nixpkgs/pull/220192 seems to solve this particular issue.
So far the only non-straightforward fix is this one, because apparently the original PR was already trying to fix some cross-compilation, but I don't quite understand the argument given there.
19:16:54
@artturin:matrix.orgArtturinRedacted or Malformed Event21:51:23
@artturin:matrix.orgArtturin
In reply to @kuruczgy:matrix.org

Another one:

(import nixpkgs {
  localSystem.system = "aarch64-linux";
  crossSystem.system = "x86_64-linux";
}).pkgsHostTarget.lsb-release

for some reason has the wrong interpreter shebang.

(But please someone tell me if I am crazy, my cross settings are correct for aarch64 -> x86_64, right? I guess this is just very rarely tested.)

Since https://github.com/NixOS/nixpkgs/pull/300322 was closed
I think we should switch lsb-release to https://github.com/NixOS/nixpkgs/pull/301350
21:54:44
@kuruczgy:matrix.orgkuruczgy
In reply to @artturin:matrix.org
Since https://github.com/NixOS/nixpkgs/pull/300322 was closed
I think we should switch lsb-release to https://github.com/NixOS/nixpkgs/pull/301350
Yep, makes sense, I can make a PR. Replace substituteAll with replaceVars, and use runtimeShell, that's it I guess?
22:01:26
@kuruczgy:matrix.orgkuruczgy Actually... Where do I put the meta attr? replaceVars doesn't seem to accept it 22:03:51
@artturin:matrix.orgArtturin Use runCommand to copy the output of replaceVars to bin 22:05:55
@artturin:matrix.orgArtturin * Use runCommand to copy the output of replaceVars to bin 22:05:59
@artturin:matrix.orgArtturin * Use runCommandLocal to copy the output of replaceVars to bin 22:06:20
@artturin:matrix.orgArtturin * Use runCommand to copy the output of replaceVars to bin 22:07:18
@kuruczgy:matrix.orgkuruczgy

Hm something like this?

runCommand "lsb_release"
{
  meta = with lib; {
    description = "Prints certain LSB (Linux Standard Base) and Distribution information";
    mainProgram = "lsb_release";
    license = [ licenses.mit ];
    maintainers = with maintainers; [ primeos ];
    platforms = platforms.linux;
  };
} ''
  install -Dm 755 ${replaceVars ./lsb_release.sh {
    inherit runtimeShell coreutils getopt;
  }} $out/bin/lsb_release
''
22:13:12
@artturin:matrix.orgArtturinYep22:15:52
@kuruczgy:matrix.orgkuruczgyHere: https://github.com/NixOS/nixpkgs/pull/360576 Lemme also test if cross actually works now with it...22:18:35
@kuruczgy:matrix.orgkuruczgyYep, it does22:23:46
@artturin:matrix.orgArtturin
In reply to @kuruczgy:matrix.org
Okay, thanks for looking into this. Not sure when I will have time to make a PR, but I guess the fix is simple enough, so no reason not to.
https://github.com/NixOS/nixpkgs/pull/360602
23:40:44
@kuruczgy:matrix.orgkuruczgy
In reply to @artturin:matrix.org
https://github.com/NixOS/nixpkgs/pull/360602
Oh cool, so this is the proper fix. Nice.
23:44:00
@kuruczgy:matrix.orgkuruczgyThough I am not sure about eval performance, do you have tooling to measure that there is no significant regression?23:45:16
@artturin:matrix.orgArtturinNope and when I tried ofborg23:48:41
@artturin:matrix.orgArtturinimage.png
Download image.png
23:48:43
@artturin:matrix.orgArtturin * Nope and when I tried ofborg previously23:48:50
@artturin:matrix.orgArtturin * Nope and when I tried ofborg previously for the splicing path23:49:17
1 Dec 2024
@turlando:matrix.org@turlando:matrix.org set a profile picture.12:38:34
@s8766054:tu-dresden.deSimon.Sieben@mailbox.tu-dresden.de joined the room.13:00:05
@turlando:matrix.org@turlando:matrix.org left the room.14:03:52
@tanvir:hackliberty.org@tanvir:hackliberty.org removed their profile picture.17:39:52
@tanvir:hackliberty.org@tanvir:hackliberty.org removed their display name 𝒕𝒂𝒏𝒗𝒊𝒓.17:42:27
@tanvir:hackliberty.org@tanvir:hackliberty.org left the room.17:48:02
2 Dec 2024
@kjeremy:matrix.orgkjeremy Artturin: it's crazy to me how easily it is to get the evaluator to OOM with small changes on cross. I would expect memory usage to be linear wrt non-cross but it's definitely not 15:26:27
@rick:matrix.ciphernetics.nlMindaviI think it instantiates nixpkgs x amount of times15:28:34
@hexa:lossy.networkhexaand don't try python things 🙈16:12:19

Show newer messages


Back to Room ListRoom Version: 6