2024-06-22 16:38:19 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs }: let
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"aarch64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
"armv7l-linux"
|
|
|
|
];
|
|
|
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
2024-06-24 08:07:42 +02:00
|
|
|
(final: prev: {
|
2024-06-22 16:38:19 +02:00
|
|
|
vcpkg-tool = final.callPackage ./nix/packages/vcpkg-tool/package.nix { };
|
2024-06-24 08:07:42 +02:00
|
|
|
vcpkg = import ./nix/packages/vcpkg/package.nix { inherit (prev) vcpkg; };
|
2024-06-22 16:38:19 +02:00
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
in f system pkgs);
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
in {
|
|
|
|
packages = forAllSystems (system: pkgs: {
|
|
|
|
default = self.packages.${system}.test;
|
|
|
|
test = pkgs.callPackage ./nix/packages/test/package.nix {
|
|
|
|
src = ./.;
|
|
|
|
};
|
2024-06-24 08:07:42 +02:00
|
|
|
|
|
|
|
test-aarch64 = pkgs.pkgsCross.aarch64-multiplatform.callPackage ./nix/packages/test/package.nix {
|
|
|
|
src = ./.;
|
|
|
|
};
|
|
|
|
|
|
|
|
test-armv7 = pkgs.pkgsCross.armv7l-hf-multiplatform.callPackage ./nix/packages/test/package.nix {
|
|
|
|
src = ./.;
|
|
|
|
};
|
2024-06-22 16:38:19 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
devShells = forAllSystems (system: pkgs: {
|
|
|
|
default = self.devShells.${system}.vcpkgVendoredLibs;
|
|
|
|
|
|
|
|
vcpkgVendoredLibs = pkgs.mkShell {
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
vcpkg
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
env = {
|
|
|
|
VCPKG_ROOT = "${pkgs.vcpkg}/share/vcpkg";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nixVendoredLibs = pkgs.mkShell {
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
nlohmann_json
|
|
|
|
fmt
|
|
|
|
];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|