Bump ApiSurface (#20)
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/all-checks-complete Pipeline was successful

Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com>
Reviewed-on: #20
This commit is contained in:
2025-09-08 21:29:00 +00:00
parent 6b2ebdffba
commit 2ca8c5e43b
7 changed files with 398 additions and 406 deletions

View File

@@ -14,13 +14,14 @@
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
deps = builtins.fromJSON (builtins.readFile ./nix/deps.json);
projectFile = "./PureGym.App/PureGym.App.fsproj";
testProjectFile = "./PureGym.Test/PureGym.Test.fsproj";
pname = "puregym";
dotnet-sdk = pkgs.dotnetCorePackages.sdk_9_0;
dotnet-runtime = pkgs.dotnetCorePackages.runtime_9_0;
version = "0.1";
dotnetTool = toolName: toolVersion: hash:
dotnetTool = dllOverride: toolName: toolVersion: hash:
pkgs.stdenvNoCC.mkDerivation rec {
name = toolName;
version = toolVersion;
@@ -31,15 +32,20 @@
hash = hash;
installPhase = ''mkdir -p $out/bin && cp -r tools/*/any/* $out/bin'';
};
installPhase = ''
installPhase = let
dll =
if isNull dllOverride
then name
else dllOverride;
in ''
runHook preInstall
mkdir -p "$out/lib"
cp -r ./bin/* "$out/lib"
makeWrapper "${dotnet-runtime}/bin/dotnet" "$out/bin/${name}" --add-flags "$out/lib/${name}.dll"
makeWrapper "${dotnet-runtime}/bin/dotnet" "$out/bin/${name}" --set DOTNET_HOST_PATH "${dotnet-sdk}/bin/dotnet" --add-flags "$out/lib/${dll}.dll"
runHook postInstall
'';
};
fantomas = dotnetTool "fantomas" (builtins.fromJSON (builtins.readFile ./.config/dotnet-tools.json)).tools.fantomas.version (builtins.head (builtins.filter (elem: elem.pname == "fantomas") ((import ./nix/deps.nix) {fetchNuGet = x: x;}))).hash;
fantomas = dotnetTool null "fantomas" (builtins.fromJSON (builtins.readFile ./.config/dotnet-tools.json)).tools.fantomas.version (builtins.head (builtins.filter (elem: elem.pname == "fantomas") deps)).hash;
in {
packages = {
fantomas = fantomas;
@@ -47,7 +53,7 @@
inherit pname version projectFile testProjectFile dotnet-sdk dotnet-runtime;
name = "puregym";
src = ./.;
nugetDeps = ./nix/deps.nix; # `nix build .#default.passthru.fetch-deps && ./result` and put the result here
nugetDeps = ./nix/deps.json; # `nix build .#default.fetch-deps && ./result nix/deps.json` and put the result here
doCheck = true;
};
};
@@ -58,13 +64,7 @@
};
};
devShells.default = pkgs.mkShell {
buildInputs =
[pkgs.alejandra dotnet-sdk pkgs.python3 pkgs.nodePackages.markdown-link-check]
++ (
if pkgs.stdenv.isDarwin
then [pkgs.darwin.apple_sdk.frameworks.CoreServices]
else []
);
buildInputs = [pkgs.alejandra dotnet-sdk pkgs.python3 pkgs.nodePackages.markdown-link-check];
};
checks = {
alejandra = pkgs.stdenvNoCC.mkDerivation {