!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

118 Members
23 Servers

Load older messages


SenderMessageTime
23 Dec 2024
@6pak:matrix.org6pak * lts uses 3.1.5, prerelease uses 7.0.100:53:01
@6pak:matrix.org6pakthe ef6 reference is just for decoration I guess00:53:23
@corngood:corngood.comCorngoodAh, I was looking at `pname = "EntityFramework"; version = "6.4.4"`00:53:47
@corngood:corngood.comCorngoodI'm not familiar with these packages at all. I also don't remember what happened when it was left targeting netcoreapp3.1. that should be possible with a newer sdk, right?00:54:53
@whovian9369:matrix.orgWhovian9369I'll see if I can play around with any of this at some point. Thank you both so much for the thoughts!01:05:25
@whovian9369:matrix.orgWhovian9369
  patchPhase = ''
    # Fix Net build
    substituteInPlace \
      "Aaru/Aaru.csproj" \
      "Aaru.Database/Aaru.Database.csproj" \
      --replace-fail 'Version="3.1.5"' 'Version="7.0.1"'

    substituteInPlace \
      "Aaru.Database/Aaru.Database.csproj" \
      --replace-fail 'Version="1.1.6"' 'Version="2.0.0-preview1-final"'
  '';

So this worked!

$  aaru --version
Creating main database
Adding USB vendors
Added 3410 usb vendors
Adding USB products
Added 19812 usb products
Adding CompactDisc read offsets
Added 4630 CompactDisc read offsets
Adding known devices
Added 354 known devices
Saving changes...
In compliance with the European Union General Data Protection Regulation 2016/679 (GDPR),
we must give you the following information about Aaru and ask if you want to opt-in
in some information sharing.
...
...
5.3.2.0+f4fef21d

$  aaru --version
5.3.2.0+f4fef21d
03:50:00
@whovian9369:matrix.orgWhovian9369 (I removed a bunch from patchPhase for the above example) 03:53:18
@gggkiller:matrix.orgGGG I'd recommend using patch files whenever possible instead of substituteInPlace 03:58:38
@gggkiller:matrix.orgGGGbut if you've ensured that it only changes the versions of what you want then it should be fine03:59:01
@whovian9369:matrix.orgWhovian9369That's a good tip, thanks03:59:59
@whovian9369:matrix.orgWhovian9369
$  cd "$(nix eval --raw .#lts.src.outPath)"
$  rg -F 'Version="1.1.6"'
Aaru.Database/Aaru.Database.csproj
48:    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.1.6"/>
$  rg -F 'Version="3.1.5"'
Aaru/Aaru.csproj
167:    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.5" />

Aaru.Database/Aaru.Database.csproj
45:    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5"/>
46:    <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.1.5"/>
47:    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.5"/>

As far as I can tell, the only things that I'm changing are what I intend to, so I should be good.

04:01:22
@whovian9369:matrix.orgWhovian9369 (Honestly I just prefer substituteInPlace since it leaves a cleaner directory, but honestly I should just use patch files instead since that will make the actual derivation cleaner.) 04:02:14
@gggkiller:matrix.orgGGGI myself prefer patch files because they ensure that things break if the file isn't the same anymore04:02:34
@gggkiller:matrix.orgGGGinstead of just possibly silently changing things they shouldn't04:02:47
@whovian9369:matrix.orgWhovian9369That's certainly a good point. Most of what I'm modifying (other than this) are hard to mis-patch so I'm not really worried, but hey that is still a very good reminder. https://github.com/Whovian9369/aaru-nix-flake/blob/620ef8866395544b5aad55b7dac83fa63a988731/lts.nix#L36-L7904:07:20
@whovian9369:matrix.orgWhovian9369 On prerelease and git I'm only doing --replace-fail '{chash:8}' "${substring 0 8 src.rev}" which I'm pretty confident aren't going to mis-match at all even between updates.
(If those change at all, like if one gets removed, I'm sure that I'll figure it out pretty easily and add it to the extensive file list.)
04:10:32
24 Dec 2024
@6pak:matrix.org6pak GGG replied to your question about buildPackages 00:56:32
@6pak:matrix.org6pakif after reading the link you are still confused, don't worry, I think everyone is00:56:42
@6pak:matrix.org6pakimo the mess comes from the implicit splicing mechanic, it would be much clearer if you were forced to explicitly reference the package set but oh well00:57:54
@gggkiller:matrix.orgGGGHuh, I thought `hostPlatform` was already the machine it's being built on01:00:43
@6pak:matrix.org6pakhostPlatform is the host that will run the package01:01:04
@6pak:matrix.org6pakbuildPlatform is the host that is building the package01:01:17
@6pak:matrix.org6paktargetPlatform is a special thing for target-specific packages, like the GCC compiler01:01:43
@6pak:matrix.org6pakbecause you can build a GCC compiler on linux-x64 (buildPlatform) that will run on linux-arm64 (hostPlatform) that compiles binaries for linux-riscv (targetPlatform)01:02:38
@6pak:matrix.org6pakso in most cases hostPlatform == targetPlatform01:02:52
@6pak:matrix.org6pakin nixpkgs I think it's only GCC that uses targetPlatform?01:03:22
@gggkiller:matrix.orgGGGGod, this is so confusing01:03:34
@6pak:matrix.org6pakllvm/clang can compile to multiple targets from single binary just fine01:03:35
@gggkiller:matrix.orgGGGI think I get it now though01:04:11
@gggkiller:matrix.orgGGGBut yeah, most packages just outright don't work with cross from what I'm understanding then01:04:24

Show newer messages


Back to Room ListRoom Version: 9