!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

124 Members
24 Servers

Load older messages


SenderMessageTime
12 Jan 2023
@winterqt:nixos.devWinter (she/her) just do nix build .#whateverPackage.fetch-deps 14:25:11
@daniel:nopemail.orgdanielI did that over and over, realized now that I of course called it with the wrong package name. Thanks though!14:29:12
@winterqt:nixos.devWinter (she/her)
In reply to @daniel:nopemail.org
I did that over and over, realized now that I of course called it with the wrong package name. Thanks though!
(was it not erroring?)
14:31:10
@daniel:nopemail.orgdaniel
In reply to @winterqt:nixos.dev
(was it not erroring?)
It was, but I thought that meant that somehow fetch-deps didn't pass through correctly.
14:33:24
17 Jan 2023
@daniel:nopemail.orgdanielFetch-deps doesn't seem to handle project references correctly, am I observing this right? The script wants to look for the project dependencies in the "nuget.org" source.11:07:33
@raphi:tapesoftware.netraphi in my experience <ProjectReference> just works, as long both the referring project and the referenced project are part of src
example: https://github.com/raphaelr/nugettest
if they are separated search for projectReferences in the nixpkgs manual
11:48:50
22 Jan 2023
@omlet:matrix.orgomlet left the room.20:26:21
24 Mar 2023
@quapka:matrix.orgquapka joined the room.15:07:46
@quapka:matrix.orgquapka Hi guys, is there a minimal flake.nix template for a .NET project? 15:27:17
@quapka:matrix.orgquapka

Non-flake attempt: I am trying to make it work like this:

{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
  buildInputs = with pkgs; [ dotnet-sdk_7 dotnet-runtime_7 ];
  DOTNET_ROOT = with pkgs; lib.makeBinPath [ dotnet-runtime_7 ];
}

But still failing.

15:38:42
@quapka:matrix.orgquapka Getting You must install .NET to run this application. error message. 15:38:56
@quapka:matrix.orgquapka

This seems to be enough to get the project up and running:

{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
  buildInputs = with pkgs.dotnetCorePackages; [ sdk_7_0 ];

  DOTNET_ROOT = with pkgs; "${dotnet-sdk_7}";
}
16:38:21
@quapka:matrix.orgquapka

If anyone finds this helpful, this is how I've turned that into a flake.nix:

{
  description = "Basic .NET 7 flake";

  outputs = { self, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem
      (system:
        let pkgs = nixpkgs.legacyPackages.${system}; in
        {
          devShells.default = 
            pkgs.mkShell {
              buildInputs = with pkgs.dotnetCorePackages; [ sdk_7_0 ];

              DOTNET_ROOT = with pkgs; "${dotnet-sdk_7}";
            };
        }
      );
}

16:45:51
@quapka:matrix.orgquapka Hm, any ideas when *.nuspec file is missing? Therefore the nuget-to-nix file seems to file and consequently I can't run buildDotnetModule, becuase it requires the nugetDeps to be set. 17:32:22
26 Mar 2023
@rbutani:matrix.orgrbutani joined the room.00:33:02
14 Apr 2023
@flafydev:matrix.orgFlafy (moving to @flafy:flafy.dev) joined the room.07:32:29
@felschr:matrix.orgfelschr joined the room.18:31:55
30 Apr 2023
@huantian:huantian.devhuantian joined the room.05:32:59
@evils:nixos.devevils joined the room.14:03:23
@evils:nixos.devevils

hi, i had a go at packaging a dotnet project
i've got something, but the binary does nothing but return 255

https://github.com/NixOS/nixpkgs/commit/7d7d2bfee091dd389eb51bdac1a363cfc27643b4

14:06:06
@evils:nixos.devevilsdid i miss anything obvious? or is there a way to get a more verbose failure?14:07:05
@huantian:huantian.devhuantian

I don't see anything obvious in your code, but I'm getting a weird error when building all dotnet packages for some reason

error: builder for '/nix/store/rscfr5ivym33v9w1n7p20zbarn5cif77-tjaplayer3-f-1.8.2.1-dependencies-source.drv' failed with exit code 139;
       last 1 log lines:
       > /nix/store/a4v3az5zmqfc2x3gyjgds5azgdhf9b54-stdenv-linux/setup: line 1560:     7 Segmentation fault      (core dumped) nuget init "/nix/store/gv7vh34zghgnmla0qjgfgzxmvjxb6k2d-tjaplayer3-f-1.8.2.1-nuget-deps" "$out/lib"```
An error that I'm getting for a different derivation, getting the same for all my dotnet derivations
22:30:04
@huantian:huantian.devhuantian *

I don't see anything obvious in your code, but I'm getting a weird error when building all dotnet packages for some reason

error: builder for '/nix/store/rscfr5ivym33v9w1n7p20zbarn5cif77-tjaplayer3-f-1.8.2.1-dependencies-source.drv' failed with exit code 139;
       last 1 log lines:
       > /nix/store/a4v3az5zmqfc2x3gyjgds5azgdhf9b54-stdenv-linux/setup: line 1560:     7 Segmentation fault      (core dumped) nuget init "/nix/store/gv7vh34zghgnmla0qjgfgzxmvjxb6k2d-tjaplayer3-f-1.8.2.1-nuget-deps" "$out/lib"
```
An error that I'm getting for a different derivation, getting the same for all my dotnet derivations
22:30:09
@huantian:huantian.devhuantian *

I don't see anything obvious in your code, but I'm getting a weird error when building all dotnet packages for some reason

error: builder for '/nix/store/rscfr5ivym33v9w1n7p20zbarn5cif77-tjaplayer3-f-1.8.2.1-dependencies-source.drv' failed with exit code 139;
       last 1 log lines:
       > /nix/store/a4v3az5zmqfc2x3gyjgds5azgdhf9b54-stdenv-linux/setup: line 1560:     7 Segmentation fault      (core dumped) nuget init "/nix/store/gv7vh34zghgnmla0qjgfgzxmvjxb6k2d-tjaplayer3-f-1.8.2.1-nuget-deps" "$out/lib"

An error that I'm getting for a different derivation, getting the same for all my dotnet derivations

22:30:16
@huantian:huantian.devhuantian *

I don't see anything obvious in your code, but I'm getting a weird error when building all dotnet packages for some reason

error: builder for '/nix/store/rscfr5ivym33v9w1n7p20zbarn5cif77-tjaplayer3-f-1.8.2.1-dependencies-source.drv' failed with exit code 139;
       last 1 log lines:
       > /nix/store/a4v3az5zmqfc2x3gyjgds5azgdhf9b54-stdenv-linux/setup: line 1560:     7 Segmentation fault      (core dumped) nuget init "/nix/store/gv7vh34zghgnmla0qjgfgzxmvjxb6k2d-tjaplayer3-f-1.8.2.1-nuget-deps" "$out/lib"

An error that I'm getting for a different derivation, getting the same for all my dotnet derivations

22:30:22
@huantian:huantian.devhuantianesterdayperhaps this is a nixpkgs issue that was introduced recently? didn't find anything on it when searching y22:30:56
@huantian:huantian.devhuantian * perhaps this is a nixpkgs issue that was introduced recently? didn't find anything on it when searching yesterday22:31:01
2 May 2023
@raphi:tapesoftware.netraphi

i think these are different issues
evils: setting COREHOST_TRACE helps with debugging dotnet startup issues: COREHOST_TRACE=1 ./result/bin/UVtools:

Launch host: /nix/store/b1mz9an1n8cx92g5f87p5qszbzmm7dli-UVtools-3.13.1/lib/UVtools/UVtools, app: /nix/store/b1mz9an1n8cx92g5f87p5qszbzmm7dli-UVtools-3.13.1/lib/UVtools/UVtools.dll, argc: 4, args: --crash-report,
Application,System.DllNotFoundException: Unable to load shared library 'libX11.so.6' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibX11.so.6: cannot open shared object file: No such file or directory

so add libX11 to runtimeDeps. i suppose UVtools is swallowing and ignoring this exception which is not nice...

huantian: can this be reproduced on nixpkgs master?

06:33:24
@huantian:huantian.devhuantianI believe so, let me push one of my partially finished packages to my nixpkgs fork06:35:16
@huantian:huantian.devhuantian raphi: made a quick draft pr, https://github.com/NixOS/nixpkgs/pull/229418, seems to fail for me still 06:48:59

Show newer messages


Back to Room ListRoom Version: 9