mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
localPackages.sbatch-cli: init
This commit is contained in:
@@ -197,6 +197,12 @@
|
||||
packages = [ pkgs.clang-tools_17 ];
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS = "1";
|
||||
};
|
||||
sbatch-cli = pkgs.mkShell
|
||||
{
|
||||
packages = with pkgs; [ sbatch-cli ];
|
||||
buildInputs = [ pkgs.clang-tools_17 ];
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS = "1";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ inputs: rec
|
||||
sqlite-orm = inputs.pkgs.callPackage ./sqlite-orm { src = inputs.topInputs.sqlite-orm; };
|
||||
mkPnpmPackage = inputs.pkgs.callPackage ./mkPnpmPackage.nix {};
|
||||
nodejs-with-pnpm9 = inputs.pkgs.callPackage ./nodejs-with-pnpm9.nix {};
|
||||
sbatch-cli = inputs.pkgs.callPackage ./sbatch-cli {};
|
||||
|
||||
fromYaml = content: builtins.fromJSON (builtins.readFile
|
||||
(inputs.pkgs.runCommand "toJSON" {}
|
||||
|
||||
3
local/pkgs/sbatch-cli/.clangd
Normal file
3
local/pkgs/sbatch-cli/.clangd
Normal file
@@ -0,0 +1,3 @@
|
||||
CompileFlags:
|
||||
Add: [ -Wall, -Wextra, -std=c++23 ]
|
||||
Compiler: g++
|
||||
1
local/pkgs/sbatch-cli/.envrc
Normal file
1
local/pkgs/sbatch-cli/.envrc
Normal file
@@ -0,0 +1 @@
|
||||
use flake .#sbatch-cli
|
||||
22
local/pkgs/sbatch-cli/CMakeLists.txt
Normal file
22
local/pkgs/sbatch-cli/CMakeLists.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(sbatch-cli 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()
|
||||
|
||||
set(HPCSTAT_VERSION "unknown" CACHE STRING "Version of the hpcstat")
|
||||
|
||||
add_executable(sbatch-cli src/main.cpp)
|
||||
target_compile_features(sbatch-cli PUBLIC cxx_std_23)
|
||||
# target_link_libraries(sbatch-cli PRIVATE)
|
||||
|
||||
install(TARGETS sbatch-cli 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
local/pkgs/sbatch-cli/default.nix
Normal file
7
local/pkgs/sbatch-cli/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ stdenv, cmake, pkg-config }: stdenv.mkDerivation
|
||||
{
|
||||
name = "sbatch-cli";
|
||||
src = ./.;
|
||||
buildInputs = [];
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
}
|
||||
0
local/pkgs/sbatch-cli/src/main.cpp
Normal file
0
local/pkgs/sbatch-cli/src/main.cpp
Normal file
Reference in New Issue
Block a user