!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

121 Members
24 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
14 Aug 2025
@gggkiller:matrix.orgGGG that's because you're including the deps.json into your project, you should exclude it from the projects by editing the .csproj or by filtering them out of src 20:25:35
@oatmealraisin:matrix.orgoatmealraisin *

let
  Application = import ../Application { pkgs = pkgs; };
  DataMatrixGenerator = import ../../utils/DataMatrixGenerator { pkgs = pkgs; };
  Infrastrcture = import ../Infrastructure { pkgs = pkgs; };
  WebUI = import ../WebUI { pkgs = pkgs; };
in
pkgs.buildDotnetModule {
  pname = "API.csproj";
  version = "0.1";

  src = ../..;

  projectFile = "src/API/API.csproj";

  buildInputs = [
    Application
    DataMatrixGenerator
    Infrastrcture
    WebUI
  ];

  dotnetPackFlags = [ "-p:RuntimeIdentifier=linux-x64" ];
  nugetDeps = ./deps.json;
  packNupkg = false;
}
20:25:36
@gggkiller:matrix.orgGGGI don't recommend embedding the nix files into your source like that, I'd put them into a separate directory where they don't mix with the code20:26:15
@corngood:corngood.comCorngood Hmm, maybe we can use dotnet sln list to check for a solution 20:34:22
@oatmealraisin:matrix.orgoatmealraisin It's kinda hard to find info on conventions around projects instead of nixos, where do you normally put your *.nix files? 20:36:04
@whovian9369:matrix.orgWhovian9369 Speaking from personal experience when looking around, I commonly see flake.nix and flake.lock in the root of the repository, while extra files (package.nix/default.nix, deps.json, etc) being relegated to /nix/ 20:39:25
@whovian9369:matrix.orgWhovian9369 * Speaking from personal experience when looking around, I commonly see flake.nix and flake.lock in the root of the repository, while extra files (package.nix/default.nix, deps.json, etc) being relegated to a repo's /nix/ 20:39:47
@oatmealraisin:matrix.orgoatmealraisinAlright, I'll start moving everything over there and try this again20:47:58
@oatmealraisin:matrix.orgoatmealraisinThese builds take a pretty ridiculous amount of time, rough stuff20:48:15
@corngood:corngood.comCorngoodWhy is it picking up deps.json? Is that a special filename in dotnet?20:56:52

Show newer messages


Back to Room ListRoom Version: 9