this post was submitted on 25 Jun 2023
15 points (100.0% liked)

Operating Systems

3787 readers
1 users here now

All things operating system related, from Windows to Mac to Linux distros and the more obscure.

Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 1 year ago
MODERATORS
top 7 comments
sorted by: hot top controversial new old
[–] TheTrueLinuxDev@beehaw.org 3 points 1 year ago (2 children)

Don't think so since the big part of what make arch appealing was the easier approach to programming on the platform. NixOS had some problems particularly the llvm and clang compilers that complained a lot about missing standard libraries and headers. Until that is addressed, it won't be the new arch. I plan on trying it again on next weekend.

[–] ericjmorey@programming.dev 2 points 1 year ago (1 children)

NixOS had some problems particularly the llvm and clang compilers that complained a lot about missing standard libraries and headers.

I tried searching for LLVM related issues with NixOS, but came up empty. Could you help me find more info on this?

[–] TheTrueLinuxDev@beehaw.org 1 points 1 year ago

It was discussed on Matrix channel for NixOS a long while ago. I am re-attempting NixOS to see if they have addressed the QOL for Clang/LLVM development. That was some of the issues that come up when I was working with FFI LLVM-C with C# (it uses LLVM for accelerating LINQ operations.)

[–] adis@lemmy.blad.is 1 points 1 year ago

NixOS had some problems particularly the llvm and clang compilers that complained a lot about missing standard libraries and headers.

I think it's likely that you're trying to just add clang/llvm toolchains to your development shell like this:

pkgs.mkShell { packages = [
  llvmPackages_16.clang
]; };

But you actually want something like:

(mkShell.override { inherit (llvmPackages_16) stdenv; }) {
  packages = [ ];
}
[–] awwsom@beehaw.org 2 points 1 year ago (1 children)

I agree. But its also a headache at the beginning. A big one.

[–] ericjmorey@programming.dev 1 points 1 year ago (1 children)

In what way was it a headache for you?

[–] awwsom@beehaw.org 3 points 1 year ago

ok so i was setting up nixos, it was going good. there were a lot of docs to setup home manage and nix flakes and they are easy to do once you get some hang of it. But then i wanted to do a small project in c++ where i wanted to use a library libcpr. now you can not directly install that library and use it. (AFAIK). You have to create a flake in that project and then use it. Which BTW is the right way to do it. But also i just want to test run a 4 line code.

To achieve that you either have to do shell.nix or a devshell. Both of which have a documentation which is scattered. It took me 4 days and also help from nixos unofficial discord server to do it. In the end i had to make a nix devshell using a different repo which set it up for you. Then make a cmake file and then and only then i was able to use it. So it has a little bit of a learning curve in the beginning where everything sort of makes sense but nothing works. Again this was all for a 4 line code. In the end some one just suggested me to use docker instead. Which is a valid solution too. But i was already too deep into devshell so I didn't backtrack.