mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-07 04:34:46 +00:00
![Silvan Mosberger](/assets/img/avatar_default.png)
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
116 lines
2.7 KiB
Nix
116 lines
2.7 KiB
Nix
{
|
|
lib,
|
|
clangStdenv,
|
|
stdenv,
|
|
cmake,
|
|
autoPatchelfHook,
|
|
fetchFromGitHub,
|
|
dotnetCorePackages,
|
|
buildDotnetModule,
|
|
netcoredbg,
|
|
testers,
|
|
}:
|
|
let
|
|
pname = "netcoredbg";
|
|
build = "1031";
|
|
release = "3.1.0";
|
|
version = "${release}-${build}";
|
|
hash = "sha256-/ScV6NPGOun47D88e7BLisSOipeQWdUbYaEryrlPbHg=";
|
|
|
|
coreclr-version = "v8.0.7";
|
|
coreclr-src = fetchFromGitHub {
|
|
owner = "dotnet";
|
|
repo = "runtime";
|
|
rev = coreclr-version;
|
|
hash = "sha256-vxyhZ1Z5TB/2jpF4qiXTpUj1hKeqV7xPgG1BJYOLIko=";
|
|
};
|
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Samsung";
|
|
repo = pname;
|
|
rev = version;
|
|
inherit hash;
|
|
};
|
|
|
|
unmanaged = clangStdenv.mkDerivation {
|
|
inherit src pname version;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
dotnet-sdk
|
|
];
|
|
|
|
hardeningDisable = [ "strictoverflow" ];
|
|
|
|
preConfigure = ''
|
|
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
"-DCORECLR_DIR=${coreclr-src}/src/coreclr"
|
|
"-DDOTNET_DIR=${dotnet-sdk}/share/dotnet"
|
|
"-DBUILD_MANAGED=0"
|
|
];
|
|
};
|
|
|
|
managed = buildDotnetModule {
|
|
inherit
|
|
pname
|
|
version
|
|
src
|
|
dotnet-sdk
|
|
;
|
|
dotnet-runtime = null;
|
|
|
|
projectFile = "src/managed/ManagedPart.csproj";
|
|
nugetDeps = ./deps.nix;
|
|
|
|
# include platform-specific dbgshim binary in nugetDeps
|
|
dotnetFlags = [ "-p:UseDbgShimDependency=true" ];
|
|
executables = [ ];
|
|
|
|
# this passes RID down to dotnet build command
|
|
# and forces dotnet to include binary dependencies in the output (libdbgshim)
|
|
selfContainedBuild = true;
|
|
};
|
|
in
|
|
stdenv.mkDerivation {
|
|
inherit pname version;
|
|
# managed brings external binaries (libdbgshim.*)
|
|
# include source here so that autoPatchelfHook can do it's job
|
|
src = managed;
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ (lib.getLib stdenv.cc.cc) ];
|
|
installPhase = ''
|
|
mkdir -p $out/share/netcoredbg $out/bin
|
|
cp ${unmanaged}/* $out/share/netcoredbg
|
|
cp ./lib/netcoredbg/* $out/share/netcoredbg
|
|
# darwin won't work unless we link all files
|
|
ln -s $out/share/netcoredbg/* "$out/bin/"
|
|
'';
|
|
|
|
passthru = {
|
|
inherit (managed) fetch-deps;
|
|
tests.version = testers.testVersion {
|
|
package = netcoredbg;
|
|
command = "netcoredbg --version";
|
|
version = "NET Core debugger ${release}";
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Managed code debugger with MI interface for CoreCLR";
|
|
homepage = "https://github.com/Samsung/netcoredbg";
|
|
license = licenses.mit;
|
|
platforms = platforms.unix;
|
|
mainProgram = "netcoredbg";
|
|
maintainers = with maintainers; [
|
|
leo60228
|
|
konradmalik
|
|
];
|
|
};
|
|
}
|