| 19 Aug 2023 |
mdarocha | yep, that’s how the lost in the nix files is generated | 12:01:40 |
mdarocha | * yep, that’s how the list in the nix files is generated | 12:01:47 |
Emma [it/its] | i wish i had the bandwidth to just clone the repo in full without --depth=1 | 12:03:30 |
Emma [it/its] | oh well | 12:03:35 |
Emma [it/its] | the nix maui flake does seem to have all of the workloads written down in nix | 12:12:52 |
Emma [it/its] | oh, you can just use nix-prefetch-url to get the hash, neat | 12:17:05 |
| 23 Aug 2023 |
| witchof0x20 left the room. | 05:58:09 |
| 5 Sep 2023 |
| Rover left the room. | 13:50:12 |
mdarocha | can somebody with merge access take a look at this? https://github.com/NixOS/nixpkgs/pull/248208 | 16:57:27 |
| 21 Sep 2023 |
| dedmunwalk joined the room. | 23:06:38 |
| 26 Sep 2023 |
| maka-77x joined the room. | 00:10:57 |
| 28 Sep 2023 |
| Ruri joined the room. | 13:21:25 |
Ruri | 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 |
mdarocha | are you able to share the source code to this app? and the nix code? | 14:07:11 |
Ruri | 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 |
mdarocha | why did you add dotnet-sdk to inputs? it should be already handled by buildDotnetModule | 14:26:08 |
Ruri | I 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 it | 14:28:38 |
mdarocha | overall the source seems a bit misconfigured | 14:29:56 |
mdarocha | it may require a bit of tweaking to make it work properly | 14:30:05 |
Ruri | The application source, I assume? | 14:30:26 |
mdarocha | yup | 14:31:13 |
mdarocha | i’ll let you know if i figure something out | 14:31:24 |
Ruri | Thank you o7 | 14:32:26 |
| 30 Sep 2023 |
mdarocha | Ruri: managed to make it compile with the following code:
{
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 = "src/Hive/Hive.csproj";
nugetDeps = ./deps.nix;
dotnet-sdk = dotnetCorePackages.sdk_6_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_6_0;
dotnetInstallFlags = [ "--framework" "net6.0" ];
#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;
};
}
| 11:19:23 |
mdarocha | make sure you have update your nixpkgs reference, I'm using the current master branch (7b22218f11c9b8c3cc4b3baa97969201238d6783) and didn't encounter the problems you mentioned, think it got fixed in some PR some time ago | 11:20:20 |
mdarocha | also rerun fetch-deps | 11:20:24 |
Ruri | In reply to @magikarpz:matrix.org
Ruri: managed to make it compile with the following code:
{
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 = "src/Hive/Hive.csproj";
nugetDeps = ./deps.nix;
dotnet-sdk = dotnetCorePackages.sdk_6_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_6_0;
dotnetInstallFlags = [ "--framework" "net6.0" ];
#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;
};
}
Thanks! that nix code successfully builds even without updating my flake lockfile, setting the sdk and runtime and using the .csproj file instead of the solution seems to do the trick | 14:31:22 |
| 16 Oct 2023 |
| Emma [it/its] ⚡️ joined the room. | 02:17:41 |
Emma [it/its] ⚡️ | { pkgs ? import <nixpkgs> {} }:
pkgs.symlinkJoin {
name = "dotnet-pack";
paths = [ pkgs.dotnet-sdk_8 pkgs.dotnet-sdk_7 pkgs.dotnet-sdk ];
postBuild = ''
rm -rfv $out/bin
rm -rfv $out/dotnet
cp -rv ${pkgs.dotnet-sdk_8}/dotnet $out/
cp -rv ${pkgs.dotnet-sdk_8}/bin $out/
'';
}
wanted to share this derivation incase anyone ever needed to use multiple dotnet versions at once | 02:18:11 |
Emma [it/its] ⚡️ | [Rory@Rory-desktop:/Rory-Open-Architecture]$ dotnet --list-sdks
6.0.414 [/nix/store/g0j4gcarcbqkxl3i14h4ls3qsmyjdc2m-dotnet-pack/sdk]
7.0.401 [/nix/store/g0j4gcarcbqkxl3i14h4ls3qsmyjdc2m-dotnet-pack/sdk]
8.0.100-rc.1.23455.8 [/nix/store/g0j4gcarcbqkxl3i14h4ls3qsmyjdc2m-dotnet-pack/sdk]
| 02:18:24 |