mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-22 19:18:45 +08:00
packages.mirism: init
This commit is contained in:
parent
a0fd36d690
commit
eb886c0c6e
@ -38,4 +38,10 @@
|
||||
packages = [ clang-tools_18 ];
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS = "1";
|
||||
};
|
||||
mirism = pkgs.mkShell.override { stdenv = pkgs.clang18Stdenv; }
|
||||
{
|
||||
inputsFrom = [ pkgs.localPackages.mirism ];
|
||||
packages = [ pkgs.clang-tools_18 ];
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS = "1";
|
||||
};
|
||||
}
|
||||
|
@ -103,6 +103,7 @@ inputs: rec
|
||||
py4vasp = inputs.pkgs.callPackage ./py4vasp.nix { src = inputs.topInputs.py4vasp; };
|
||||
pocketfft = inputs.pkgs.callPackage ./pocketfft.nix { src = inputs.topInputs.pocketfft; };
|
||||
spectroscopy = inputs.pkgs.callPackage ./spectroscopy.nix { src = inputs.topInputs.spectroscopy; };
|
||||
mirism = inputs.pkgs.callPackage ./mirism.nix { inherit biu; stdenv = inputs.pkgs.clang18Stdenv; };
|
||||
|
||||
fromYaml = content: builtins.fromJSON (builtins.readFile
|
||||
(inputs.pkgs.runCommand "toJSON" {}
|
||||
|
1
packages/mirism/.envrc
Normal file
1
packages/mirism/.envrc
Normal file
@ -0,0 +1 @@
|
||||
use flake .#mirism
|
22
packages/mirism/CMakeLists.txt
Normal file
22
packages/mirism/CMakeLists.txt
Normal file
@ -0,0 +1,22 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(mirism VERSION 0.0.0 LANGUAGES CXX)
|
||||
enable_testing()
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
message("Setting build type to 'Release' as none was specified.")
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
find_package(biu REQUIRED)
|
||||
|
||||
add_executable(mirism src/main.cpp)
|
||||
target_compile_features(mirism PUBLIC cxx_std_23)
|
||||
target_link_libraries(mirism PRIVATE biu::biu)
|
||||
|
||||
install(TARGETS mirism RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
get_property(ImportedTargets DIRECTORY "${CMAKE_SOURCE_DIR}" PROPERTY IMPORTED_TARGETS)
|
||||
message("Imported targets: ${ImportedTargets}")
|
||||
message("List of compile features: ${CMAKE_CXX_COMPILE_FEATURES}")
|
7
packages/mirism/default.nix
Normal file
7
packages/mirism/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ stdenv, cmake, pkg-config, biu }: stdenv.mkDerivation
|
||||
{
|
||||
name = "mirism";
|
||||
src = ./.;
|
||||
buildInputs = [ biu ];
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
}
|
Loading…
Reference in New Issue
Block a user