more deps

This commit is contained in:
Green Sky 2023-12-01 01:36:22 +01:00
parent 7f939b6b60
commit e0223066f6
No known key found for this signature in database
2 changed files with 108 additions and 9 deletions

View File

@ -1,14 +1,70 @@
cmake_minimum_required(VERSION 3.24 FATAL_ERROR) cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
#add_subdirectory(./entt) include(FetchContent)
#add_subdirectory(./solanaceae_util) # TODO: move entt dep into solanaceae_contact
#add_subdirectory(./solanaceae_contact) if (NOT TARGET EnTT::EnTT)
#add_subdirectory(./solanaceae_message3) FetchContent_Declare(EnTT
GIT_REPOSITORY https://github.com/skypjack/entt.git
GIT_TAG v3.12.2
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(EnTT)
endif()
#add_subdirectory(./solanaceae_plugin) if (NOT TARGET solanaceae_util)
FetchContent_Declare(solanaceae_util
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_util.git
GIT_TAG master
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(solanaceae_util)
endif()
if (NOT TARGET solanaceae_contact)
FetchContent_Declare(solanaceae_contact
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_contact.git
GIT_TAG master
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(solanaceae_contact)
endif()
if (NOT TARGET solanaceae_message3)
FetchContent_Declare(solanaceae_message3
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_message3.git
GIT_TAG master
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(solanaceae_message3)
endif()
if (NOT TARGET solanaceae_plugin)
FetchContent_Declare(solanaceae_plugin
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_plugin.git
GIT_TAG master
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(solanaceae_plugin)
endif()
add_subdirectory(./toxcore) add_subdirectory(./toxcore)
#add_subdirectory(./solanaceae_toxcore)
#add_subdirectory(./solanaceae_tox) if (NOT TARGET solanaceae_toxcore)
FetchContent_Declare(solanaceae_toxcore
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_toxcore.git
GIT_TAG master
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(solanaceae_toxcore)
endif()
if (NOT TARGET solanaceae_tox_contacts AND NOT TARGET solanaceae_tox_messages)
FetchContent_Declare(solanaceae_tox
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_tox.git
GIT_TAG master
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(solanaceae_tox)
endif()

View File

@ -1,6 +1,8 @@
{ {
description = "totato flake"; description = "totato flake";
# https://youtu.be/7ZeTP_S6ZVI
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
@ -11,12 +13,46 @@
let let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
toxcore-src = pkgs.fetchFromGitHub { toxcore-src = pkgs.fetchFromGitHub {
owner = "Green-Sky"; owner = "Green-Sky"; repo = "c-toxcore";
repo = "c-toxcore";
fetchSubmodules = true; fetchSubmodules = true;
rev = "d4b06edc2a35bad51b0f0950d74f61c8c70630ab"; # ngc_events rev = "d4b06edc2a35bad51b0f0950d74f61c8c70630ab"; # ngc_events
hash = "sha256-P7wTojRQRtvTx+h9+QcFdO381hniWWpAy5Yv63KWWZA="; hash = "sha256-P7wTojRQRtvTx+h9+QcFdO381hniWWpAy5Yv63KWWZA=";
}; };
entt-src = pkgs.fetchFromGitHub {
owner = "skypjack"; repo = "entt";
rev = "v3.12.2";
hash = "sha256-gzoea3IbmpkIZYrfTZA6YgcnDU5EKdXF5Y7Yz2Uaj4A=";
};
solanaceae_util-src = pkgs.fetchFromGitHub {
owner = "Green-Sky"; repo = "solanaceae_util";
rev = "92eee153f2c14f97e50f44b10e2a0aeb5f8b190d";
hash = "sha256-otzjzY8lxanKlryahRe+S0UL7yXsRKDJbh2DYNV71QM=";
};
solanaceae_contact-src = pkgs.fetchFromGitHub {
owner = "Green-Sky"; repo = "solanaceae_contact";
rev = "2d73c7272c3c254086fa067ccfdfb4072c20f7c9";
hash = "sha256-t6UWKMvWqXGvmsjx1JSc6fOawrzzXndaOpBntoKhLW0=";
};
solanaceae_message3-src = pkgs.fetchFromGitHub {
owner = "Green-Sky"; repo = "solanaceae_message3";
rev = "48fb5f0889404370006ae12b3637a77d7d4ba485";
hash = "sha256-kFA90EpAH/BciHDD7NwZs7KL1cDcGVQZCRjOazxMbvM=";
};
solanaceae_plugin-src = pkgs.fetchFromGitHub {
owner = "Green-Sky"; repo = "solanaceae_plugin";
rev = "eeab3109e76907a0e3e8c526956ff0fa9b3bd3a2";
hash = "sha256-knW8S4VK/U3xAWFyczSNXwx2ZA9hq2XSyr39Xh2Nsgs=";
};
solanaceae_toxcore-src = pkgs.fetchFromGitHub {
owner = "Green-Sky"; repo = "solanaceae_toxcore";
rev = "d05875f489577e9a2c26234810058b41c3236cf7";
hash = "sha256-uQVEkTn9ww/LVhPOqrq/iKIFSaDC6/BNrYGNUg+LrzA=";
};
solanaceae_tox-src = pkgs.fetchFromGitHub {
owner = "Green-Sky"; repo = "solanaceae_tox";
rev = "89e74b35f83d888f8aa2e5230811b8a5e2b101a7";
hash = "sha256-PQw2290ahYfU13tHGzBttwrvZBXK+wKh6UF4xfUaRWQ=";
};
in { in {
packages.default = pkgs.stdenv.mkDerivation { packages.default = pkgs.stdenv.mkDerivation {
pname = "totato"; pname = "totato";
@ -34,6 +70,13 @@
cmakeFlags = [ cmakeFlags = [
#"-DFETCHCONTENT_SOURCE_DIR_TOXCORE=${pkgs.libtoxcore.src}" #"-DFETCHCONTENT_SOURCE_DIR_TOXCORE=${pkgs.libtoxcore.src}"
"-DFETCHCONTENT_SOURCE_DIR_TOXCORE=${toxcore-src}" "-DFETCHCONTENT_SOURCE_DIR_TOXCORE=${toxcore-src}"
"-DFETCHCONTENT_SOURCE_DIR_ENTT=${entt-src}"
"-DFETCHCONTENT_SOURCE_DIR_SOLANACEAE_UTIL=${solanaceae_util-src}"
"-DFETCHCONTENT_SOURCE_DIR_SOLANACEAE_CONTACT=${solanaceae_contact-src}"
"-DFETCHCONTENT_SOURCE_DIR_SOLANACEAE_MESSAGE3=${solanaceae_message3-src}"
"-DFETCHCONTENT_SOURCE_DIR_SOLANACEAE_PLUGIN=${solanaceae_plugin-src}"
"-DFETCHCONTENT_SOURCE_DIR_SOLANACEAE_TOXCORE=${solanaceae_toxcore-src}"
"-DFETCHCONTENT_SOURCE_DIR_SOLANACEAE_TOX=${solanaceae_tox-src}"
]; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [