!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

125 Members
24 Servers

Load older messages


SenderMessageTime
31 May 2024
@vengmark2:matrix.orgl0b0 * What is the process for updating .NET modules, including their dependencies?06:18:01
@vengmark2:matrix.orgl0b0 * What is the process for updating .NET modules, including their dependencies? I tried setting passthru.updateScript = nix-update-script { };, which makes it possible to run nix-shell maintainers/scripts/update.nix --argstr package NAME, but nix-build --attr NAME.passthru.updateScript fails with "expression does not evaluate to a derivation". 06:57:46
@vengmark2:matrix.orgl0b0 * What is the process for updating .NET modules, including their dependencies? I tried setting passthru.updateScript = nix-update-script { };, which makes it possible to run nix-shell maintainers/scripts/update.nix --argstr package NAME, but nix-build --attr NAME.passthru.updateScript fails with "expression does not evaluate to a derivation". And any time I try to run $(nix-build --attr NAME.passthru.fetch-deps) it fails to access anything on the network with "error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.". 06:58:42
2 Jun 2024
@purepani:matrix.orgpurepani
In reply to @vengmark2:matrix.org
What is the process for updating .NET modules, including their dependencies? I tried setting passthru.updateScript = nix-update-script { };, which makes it possible to run nix-shell maintainers/scripts/update.nix --argstr package NAME, but nix-build --attr NAME.passthru.updateScript fails with "expression does not evaluate to a derivation". And any time I try to run $(nix-build --attr NAME.passthru.fetch-deps) it fails to access anything on the network with "error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.".
See the posted above.
Basically, the name for nixos 24.11 (Vicuña) contains a non-ascii character, and dotnet doesn't like that(in particular, the azure sdk)
See this issue for a workaround: https://github.com/NixOS/nixpkgs/issues/315574
06:44:15
3 Jun 2024
@emma:rory.gayEmma [it/its]what's the recommended way to make dotnet tools work?01:16:43
@emma:rory.gayEmma [it/its]writing /etc/dotnet/install_location and setting DOTNET_ROOT appears to work but i dont think thats a good solution long term?01:17:19
@emma:rory.gayEmma [it/its]and even then, it still requires to be run in an FHSEnv (eg. steam-run)01:18:03
@purepani:matrix.orgpurepani
In reply to @purepani:matrix.org
See the posted above.
Basically, the name for nixos 24.11 (Vicuña) contains a non-ascii character, and dotnet doesn't like that(in particular, the azure sdk)
See this issue for a workaround: https://github.com/NixOS/nixpkgs/issues/315574
Lookgs like you can also just set AZURE_TELEMETRY_DISABLED=1 as an environment variable
22:14:41
4 Jun 2024
@vengmark2:matrix.orgl0b0
In reply to @purepani:matrix.org
Lookgs like you can also just set AZURE_TELEMETRY_DISABLED=1 as an environment variable
export AZURE_TELEMETRY_DISABLED=1 && nix-shell maintainers/scripts/update.nix --argstr package NAME results in "cp: cannot stat '/tmp/deps-nexus-mods-app-KbN4wW/home/.nuget/packages/*': No such file or directory"
08:44:56
5 Jun 2024
@purepani:matrix.orgpurepani
In reply to @vengmark2:matrix.org
export AZURE_TELEMETRY_DISABLED=1 && nix-shell maintainers/scripts/update.nix --argstr package NAME results in "cp: cannot stat '/tmp/deps-nexus-mods-app-KbN4wW/home/.nuget/packages/*': No such file or directory"
I am not sure what this error is, but I think it's a different issue. That being said, I don't remember if nix-shell passes environement variables through by default or not, so maybe try updating the package update script to expose that environment variable?
17:45:34
@purepani:matrix.orgpurepaniThat was my bad for not reading your original messages closely enough though; i just saw the error and know that it's caused by the issue i mentioned.17:47:15
@purepani:matrix.orgpurepaniI have a PR to wrap the dotnet executable with the environment variable; I seem to no longer be able to replicate this issue on my computer at all, though, so could you try running your code off of this to see if it works https://github.com/NixOS/nixpkgs/pull/31705117:49:15
@vengmark2:matrix.orgl0b0
In reply to @purepani:matrix.org
I am not sure what this error is, but I think it's a different issue. That being said, I don't remember if nix-shell passes environement variables through by default or not, so maybe try updating the package update script to expose that environment variable?
I also tried copying the script and exporting the variable at the start of it, but no go.
20:14:57
7 Jun 2024
@alex3829:matrix.orgreal_z2 removed their display name real_z2.23:43:59
10 Jun 2024
@sandro:supersandro.deSandro 🐧 joined the room.01:31:07
@sandro:supersandro.deSandro 🐧I think I have a hot clue why dotnet is not working on unstable right now https://github.com/NixOS/nixpkgs/issues/315574#issuecomment-215701297801:32:20
11 Jun 2024
@emma:conduit.rory.gayEmma [it/its] ⚡️OH02:53:55
@emma:conduit.rory.gayEmma [it/its] ⚡️so thats why im not able to restore nuget packages.... 🤦02:54:08
15 Jun 2024
@emma:rory.gayEmma [it/its]hm does anyone know if Rider actually hard depends on dotnet sdk 7 or whether that can be swapped out with sdk 8?04:47:36
18 Jun 2024
@a-kenji:matrix.orga-kenji joined the room.11:24:17
27 Jun 2024
@vigress9:matrix.orgV. 🏳️‍⚧️ joined the room.11:40:04
@vigress9:matrix.orgV. 🏳️‍⚧️Redacted or Malformed Event11:41:01
@vigress9:matrix.orgV. 🏳️‍⚧️Redacted or Malformed Event11:42:55
@vigress9:matrix.orgV. 🏳️‍⚧️ left the room.18:48:01
2 Jul 2024
@belvaleth:matrix.orgbelvaleth joined the room.09:07:21
@ps-swazzan:matrix.orgSaeid joined the room.17:05:09
@ps-swazzan:matrix.orgSaeid changed their display name from Saeid Al-Wazzan to Saeid.17:05:24
@ps-swazzan:matrix.orgSaeid

Hello, I don't know if this is the right place to ask but I have been trying to figure out an issue for quite a long time without any luck. I made a nix flake to build my F# project and I can't get it to build with nix build. I get errors like the following:

17:07:22
@ps-swazzan:matrix.orgSaeid *

Hello, I don't know if this is the right place to ask but I have been trying to figure out an issue for quite a long time without any luck. I made a nix flake to build my F# project and I can't get it to build with nix build. I get errors like the following:

error NU1101: Unable to find package runtime.any.System.Reflection. No packages exist with this id in source(s): /nix/store/kph077ikp1bvzw4yc4yxa3rnps6rn0r0-dotnet-sdk-8.0.300/sdk/8.0.300/FSharp/library-packs, nugetSource [/private/tmp/nix-build-inventory-backend-20240628.drv-0/backend/backend.sln]
17:07:34
@ps-swazzan:matrix.orgSaeid

I did manage to generate a deps.nix that contains a line like this:

(fetchNuGet { pname = "System.Reflection"; version = "4.3.0"; sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; })

and my flake definition looks (partially) like this:

      packages = forAllSystems (system:
        let
          pkgs = nixpkgsFor.${system};
        in {
          default = pkgs.buildDotnetModule rec {
            pname = "inventory-backend";
            inherit version;

            src = ./backend;
            projectFile = "backend.sln";

            # To generate deps.nix:
            #
            # nix develop
            # dotnet restore backend/ --packages out
            # nuget-to-nix out > deps.nix
            nugetDeps = ./deps.nix;

            dotnet-sdk = pkgs.dotnet-sdk_8;

            packNupkg = true;
          };
        });
17:10:16

Show newer messages


Back to Room ListRoom Version: 9