Try this
This commit is contained in:
@@ -8,6 +8,7 @@ steps:
|
||||
# Test
|
||||
- nix develop --command dotnet test
|
||||
- nix develop --command dotnet test --configuration Release
|
||||
- nix develop --command alejandra --check .
|
||||
|
||||
when:
|
||||
- event: "push"
|
||||
|
63
flake.nix
63
flake.nix
@@ -1,26 +1,45 @@
|
||||
{
|
||||
description = "Advent of Code 2023";
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
description = "Advent of Code 2023";
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}: flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
||||
{
|
||||
devShells = { default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
(with dotnetCorePackages;
|
||||
combinePackages [
|
||||
dotnet-sdk_8
|
||||
dotnetPackages.Nuget
|
||||
])
|
||||
] ++ [pkgs.swift darwin.apple_sdk.frameworks.Foundation darwin.apple_sdk.frameworks.CryptoKit darwin.apple_sdk.frameworks.GSS pkgs.zlib pkgs.zlib.dev pkgs.openssl pkgs.icu];
|
||||
};};
|
||||
}
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
# Conditionally include Swift and Apple SDK for Darwin systems
|
||||
let
|
||||
darwinDeps =
|
||||
if system == "x86_64-darwin" || system == "aarch64-darwin"
|
||||
then [
|
||||
pkgs.swift
|
||||
pkgs.darwin.apple_sdk.frameworks.Foundation
|
||||
pkgs.darwin.apple_sdk.frameworks.CryptoKit
|
||||
pkgs.darwin.apple_sdk.frameworks.GSS
|
||||
]
|
||||
else [];
|
||||
in {
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs;
|
||||
[
|
||||
(with dotnetCorePackages;
|
||||
combinePackages [
|
||||
dotnet-sdk_8
|
||||
dotnetPackages.Nuget
|
||||
])
|
||||
]
|
||||
++ darwinDeps
|
||||
++ [pkgs.zlib pkgs.zlib.dev pkgs.openssl pkgs.icu pkgs.alejandra];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user