Nix + dotnet | 126 Members | |
| 24 Servers |
| Sender | Message | Time |
|---|---|---|
| 13 Nov 2024 | ||
| 03:10:06 | ||
| howdy y'all, was wondering if there's a way to build an app that targets .net framework 4.8 in nixos | 03:10:54 | |
| * howdy y'all, was wondering if there's a way to build an app that targets .net framework 4.8 in nixpkgs | 03:11:03 | |
| I'm trying to add https://github.com/ijwu/enemizer as part of | 03:11:26 | |
| https://github.com/nixos/nixpkgs/pull/355563 | 03:11:39 | |
| and there's a bunch of different .net version deps, several rely on .net framework 4.8, one relies on .net6.0, and one relies on "netstandard2.0" according to its .csproj file | 03:12:32 | |
| I've had no luck with using buildDotnetModule so far. | 03:13:44 | |
| Is there a project file you can use instead of the sln? Publishing an sln often causes problems. Also can you share what happens when you run `fetch-deps`? Feel free to @ me on the PR if you'd rather discuss there. | 04:00:36 | |
In reply to@corngood:corngood.comfetch-deps is fine, and I've tried the project file of the specific part I need, though it fails trying to find the core library that's in the same repo | 04:09:36 | |
I'll ping you on the PR, the build command(with flakes and nix-command enabled) is nix build github:pyrox0/nixpkgs/archipelago-from-source#enemizer | 04:10:19 | |
| note that the specific package isn't the focus of the PR, but is one component of it. | 04:11:22 | |
| Ah, I see. Do you actually need the whole solution, or can you get away with just building one or both of those projects? Alternatively you might be able to build it as-is using mono/xbuild. The only thing I see in nixpkgs using xbuild is | 13:27:33 | |
| Converting the other projects to dotnet-sdk style is probably the best option long-term. | 13:28:42 | |
In reply to @corngood:corngood.comI believe I only need library and core, the two you mentioned. would I just do library as its own derivation and then cli.core as the main derivation? | 17:43:43 | |
| with it inheriting the library project through the dependency field or whatever its called(i cant remember the name otoh but its in the dotnet language section) | 17:44:19 | |
I think you'd only need one derivation, just set projectFile to Enemizer/EnemizerCLI.Core/EnemizerCLI.Core.csproj, since it depends on the other csproj. | 18:13:22 | |
I'm not sure if that project supports packing to nuget packages? If so you might want to set packNupkg. It depends on what's consuming it. | 18:14:17 | |
In reply to@corngood:corngood.comI tried that but it didn't work, let me check if that work | 18:14:37 | |
| * I tried that but it didn't work iirc, let me check if that work | 18:14:41 | |
| * I tried that but it didn't work iirc, let me check if that does work | 18:14:47 | |
| oh okay it's failing with a different error(its trying to hardcode dotnet compiler paths in the source code?) | 18:17:20 | |
| Download enemizer.log | 18:19:57 | |
| here's the logfile, if you can make any sense of it(I can't) | 18:20:09 | |
| 22:15:21 | ||
| 14 Nov 2024 | ||
In reply to @pyrox:pyrox.dev I think what's happening here is it's using an old version of If I remove
it builds. | 13:45:59 | |
| Here's the PR for the latest round of dotnet upgrades (with 9.0 final), including some infrastructure changes: https://github.com/NixOS/nixpkgs/pull/355753 There are some breaking changes, so if anyone maintains dotnet derivations outside of nixpkgs, I'm interested in test cases or feedback. | 13:47:58 | |
| 16 Nov 2024 | ||
| 01:14:09 | ||
In reply to @corngood:corngood.comi wonder if we'll see a dotnet-sdk_9 alias as with prior versions? | 17:29:24 | |
| in other news: seems running a dotnet 9 app with current nixpkgs doesnt work, so now im using this PR's version of dotnet 9 and it works 🎉 | 17:37:06 | |
In reply to @emma:rory.gay I'm open to this. I originally had a big plan to rearrange the package names, but this seems like it might still be the most intuitive way. 9.0 final seems like a logical time to do it. I'd also like to default things to the source-built sdks whenever possible, but they aren't building reliably on Darwin at the moment. | 22:43:01 | |