!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

125 Members
24 Servers

Load older messages


SenderMessageTime
19 Aug 2023
@magikarpz:matrix.orgmdarochaie those package are implicitly included with every does, and thanks to that we don’t have to regenerate all the deps.nix in the nixpkgs tree11:53:43
@magikarpz:matrix.orgmdarochaif you want to take a stab at implementing workloads then PRs are welcome :) I unfortunately didn’t have the time to take a look at that issue11:54:13
@emma:rory.gayEmma [it/its] both eg. Microsoft.AspNetCore.App.Ref and Microsoft.NETCore.App.Runtime.Mono.browser-wasm appear to be in in that same /usr/share/dotnet/packs directory 11:54:34
@magikarpz:matrix.orgmdarocha* ie those package are implicitly included with every deps, and thanks to that we don’t have to regenerate all the deps.nix in the nixpkgs tree11:54:41
@emma:rory.gayEmma [it/its]
In reply to @magikarpz:matrix.org
if you want to take a stab at implementing workloads then PRs are welcome :) I unfortunately didn’t have the time to take a look at that issue
i'd try but i have close to no experience with nix as a language, so i'd have no idea about actually implementing anything
11:55:45
@emma:rory.gayEmma [it/its] i'd be willing to test manually add all the workload packages into packages in 7.0.nix but i'd need to figure out how i'd even calculate all the sha256's 11:57:58
@magikarpz:matrix.orgmdarochayou can start by looking into dotnet’s update.sh script to see how they are generated11:58:35
@magikarpz:matrix.orgmdarocha but for workloads, I believe a better starting point will be the nix-maui rep referenced in the issue I linked 11:59:02
@emma:rory.gayEmma [it/its]well there the issue starts that i have no clue what i'm doing when it comes to nix11:59:34
@magikarpz:matrix.orgmdarochayeah, this unfortunately doesn’t seem like an easy issue for beginners :/12:00:03
@emma:rory.gayEmma [it/its] hence why i proposed to test if adding all workloads' packages into the packages array would work in a local nixpkgs checkout 12:00:41
@emma:rory.gayEmma [it/its]though, it looks like i could just add the package names in update.sh and the script would take care of the hashes?12:01:24
@magikarpz:matrix.orgmdarochayou can check it, sure, I’m not sure if it will work or not12:01:25
@magikarpz:matrix.orgmdarochayep, that’s how the lost in the nix files is generated12:01:40
@magikarpz:matrix.orgmdarocha* yep, that’s how the list in the nix files is generated12:01:47
@emma:rory.gayEmma [it/its]i wish i had the bandwidth to just clone the repo in full without --depth=112:03:30
@emma:rory.gayEmma [it/its]oh well12:03:35
@emma:rory.gayEmma [it/its]the nix maui flake does seem to have all of the workloads written down in nix12:12:52
@emma:rory.gayEmma [it/its]oh, you can just use nix-prefetch-url to get the hash, neat12:17:05
23 Aug 2023
@witchof0x20:matrix.orgwitchof0x20 left the room.05:58:09
5 Sep 2023
@rover:aguiarvieira.ptRover left the room.13:50:12
@magikarpz:matrix.orgmdarochacan somebody with merge access take a look at this? https://github.com/NixOS/nixpkgs/pull/24820816:57:27
21 Sep 2023
@dedmunwalk:matrix.orgdedmunwalk joined the room.23:06:38
26 Sep 2023
@maka-mmparr77:matrix.orgmaka-77x joined the room.00:10:57
28 Sep 2023
@Joelixny:matrix.orgRuri joined the room.13:21:25
@Joelixny:matrix.orgRuri

I've been trying to package a dotnet 6 application and having issues with the Microsoft.Build.NoTargets SDK, if I pin the version in the .csproj the build fails during dotnetConfigureHook with error : Unable to find package Microsoft.Build.NoTargets. No packages exist with this id in source(s): nugetSource, if I leave it unpinned it seems to find it until it fails during dotnetBuildHook with error MSB4236: The SDK 'Microsoft.Build.NoTargets' specified could not be found.

I'm fairly new to nix and very unfamiliar with dotnet development (I was not involved in the actual development of this application), so I would appreciate some pointers as I'm out of ideas

13:39:32
@magikarpz:matrix.orgmdarochaare you able to share the source code to this app? and the nix code?14:07:11
@Joelixny:matrix.orgRuri
In reply to @magikarpz:matrix.org
are you able to share the source code to this app? and the nix code?

Here's the source code of the application: https://github.com/Assistant/Hive
The nix code currently lives only in my nixos config with this file being called by callPackage,

{
  lib,
  fetchFromGitHub,
  buildDotnetModule,
  dotnetCorePackages,
  mono,
  dotnet-sdk,
  openssh,
}:
buildDotnetModule rec {
  fullSrc =
    (fetchFromGitHub {
      owner = "Assistant";
      repo = pname;
      rev = "66649a2a343797a98f3228172ffc17052f5442d1";
      sha256 = "sha256-iG49/XLi3Skhp8NY5IAqSU5IfMj4y4GNIm2huewiu9Q=";
      fetchSubmodules = true;
    })
    .overrideAttrs (_: {
      GIT_CONFIG_COUNT = 1;
      GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf";
      GIT_CONFIG_VALUE_0 = "git@github.com:";
    });

  pname = "Hive";
  version = "0.0.1";
  src = fullSrc;

  projectFile = "Hive.sln";
  nugetDeps = ./deps.nix;
  selfContainedBuild = true;
  # dotnetInstallFlags = ["--framework" "net6.0"];

  # dotnet-sdk = dotnetCorePackages.sdk_6_0;
  # dotnet-runtime = dotnetCorePackages.aspnetcore_6_0;

  nativeCheckInputs = [mono dotnet-sdk];
  # buildInputs = [openssh];
  # testProjectFile = "src/Hive.Test/Hive.Tests.csproj";

  meta = with lib; {
    homepage = "https://github.com/Atlas-Rhythm/Hive";
    description = "A general backend project for modding communities";
    license = licenses.agpl3Only;
  };
}
14:18:46
@magikarpz:matrix.orgmdarochawhy did you add dotnet-sdk to inputs? it should be already handled by buildDotnetModule14:26:08
@Joelixny:matrix.orgRuriI don't have a good answer other than seeing it somewhere and trying things to see what would work, let me give it a try without it14:28:38

Show newer messages


Back to Room ListRoom Version: 9