Nix + dotnet | 126 Members | |
| 24 Servers |
| Sender | Message | Time |
|---|---|---|
| 17 Dec 2024 | ||
| and the code you're using to package said program? | 18:21:39 | |
| * and the code you're using to package said app? | 18:24:00 | |
| 18:24:34 | |
yeah, you shouldn't have that ${src} at the start of projectFile | 18:24:51 | |
the rest seems fine, other than the lack of a version | 18:25:16 | |
| Not really packaging it for nixpkgs, it's an alpha build and I want to test it out locally | 18:26:06 | |
| Does anyone here have tips on updating enough of a Net 7.0 app so it can be built and run with Net 8.0 and/or 9.0? The derivation in question is available at https://github.com/Whovian9369/aaru-nix-flake/blob/main/lts.nix in case it helps. | 21:42:13 | |
| unless the repo is configured otherwise , you could probably use rollForward | 21:42:45 | |
| * unless the repo is configured otherwise , you could probably use rollForward mechanics? | 21:42:53 | |
| ie. try building it under 8/9 and see what happens | 21:43:05 | |
| So updating the derivation to use Net 8.0/9.0 and try running it? | 21:45:42 | |
In reply to @whovian9369:matrix.orgYou could just do a patch (or substituteInPlace if you're lazy) to replace all TargetFramework labels to net8.0 or net9.0 of the app doesn't use any APIs that had breaking changes | 21:49:06 | |
| Just doing roll forward won't work because it still needs the older SDK to build so you'll still get the insecure warning. | 21:49:31 | |
So my current issue (which I haven't looked into yet, whoops) is That I'm getting errors because of hardcoded RuntimeIdentifiers at https://github.com/aaru-dps/Aaru/blob/f4fef21d0d88b7931b95549782563db4da91a8f8/Aaru/Aaru.csproj#L21 | 21:52:54 | |
| global properties override project ones | 21:53:41 | |
so you can do -p:RuntimeIdentifiers= | 21:53:48 | |
| My issue with just building using Net 8.0 was that it still wanted Net 7 Runtime, which threw a slight wrench in the works too. | 21:53:54 | |
| And building with 8 SDK and 8 Runtime gives me the Runtime issue. | 21:54:13 | |
| * And building with 8 SDK and 8 Runtime gives me the Runtime Identifiers issue. | 21:54:23 | |
| * You could just do a patch (or substituteInPlace if you're lazy) to replace all TargetFramework labels to net8.0 or net9.0 *if* the app doesn't use any APIs that had breaking changes | 21:55:12 | |
runtimeId = "linux-x64"; should override that then, right? Or should I be doing it using like dotnetFlags = [ "-p:RuntimeIdentifiers=linux-x64" ] | 21:55:19 | |
| Latter | 21:55:31 | |
I think nixpkgs dotnet stuff sets RuntimeIdentifier | 21:55:35 | |
so if you empty out RuntimeIdentifiers, it will work like you want it to | 21:55:44 | |
| I'll have to try it out then, thanks! | 21:55:53 | |
| You'll probably want to use `dotnetCorePackages.systemToRuntimeId` to transform the `stdenv.targetSystem` into a RuntimeIdentifier | 21:56:42 | |
| hostSystem* | 21:57:06 | |
In reply to @6pak:matrix.orgDoes it? Lemme double check | 21:57:06 | |
| I already forgot | 21:57:12 | |
| but even then, just let builddotnetmodule fill it out | 21:57:23 | |