knobkraft-orm: init at 2.7.1

This commit is contained in:
Max Genson
2025-11-05 10:50:52 +01:00
parent 486d6a6a06
commit 8a8374acb1
2 changed files with 149 additions and 0 deletions
+109
View File
@@ -0,0 +1,109 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
gtk3,
glew,
webkitgtk_4_1,
cppcheck,
icu,
python312,
glib,
curlFull,
boost,
libbtbb,
libsysprof-capture,
pcre2,
alsa-lib,
util-linux,
libselinux,
libsepol,
libthai,
libdatrie,
xorg,
lerc,
libxkbcommon,
libepoxy,
sqlite,
git,
libdeflate,
xz,
libwebp,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "KnobKraft-orm";
version = "2.7.1";
src = fetchFromGitHub {
owner = "christofmuc";
repo = "knobkraft-orm";
tag = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-dOgPq4r2IvKDPhhV/LWRfGeeFckN5ZUeee/T6QNfCtw=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
gtk3
glew
webkitgtk_4_1
cppcheck
icu
python312
glib
curlFull
boost
libbtbb
libsysprof-capture
pcre2
alsa-lib
util-linux
libselinux
libsepol
libthai
libdatrie
xorg.libXdmcp
lerc
libxkbcommon
libepoxy
xorg.libXtst
sqlite
git
libdeflate
xz
libwebp
];
# Issue has been raised and should be resolved with next release.
# CMakeLists.txt needs three more lines to properly build.
patches = [ ./temporary.patch ];
cmakeFlags = [
(lib.cmakeFeature "CMAKE_INTERPROCEDURAL_OP" "off")
(lib.cmakeFeature "PYTHON_VERSION_TO_EMBED" "${python312.pythonVersion}")
];
makeFlags = [
"package"
];
meta = {
homepage = "https://github.com/christofmuc/KnobKraft-orm";
description = "Modern FOSS MIDI Sysex Librarian";
mainProgram = "KnobKraftOrm";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
backtail
];
platforms = lib.platforms.linux;
};
})
@@ -0,0 +1,40 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b98ab0e..b1fc3de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,9 @@ option(ASAN "Use Address Sanitization for Debug version (Windows only for now)"
# Gin requests C++ 20.
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_AR "gcc-ar")
+set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcs <TARGET> <LINK_FLAGS> <OBJECTS>")
+set(CMAKE_CXX_ARCHIVE_FINISH true)
add_definitions(-D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING)
# To avoid dependency on WebKit. This also came with MacOS, but as webkit is heavyweight, it is probably a good idea to turn it off for all
diff --git a/The-Orm/CMakeLists.txt b/The-Orm/CMakeLists.txt
index 1c7186e..39cebd0 100644
--- a/The-Orm/CMakeLists.txt
+++ b/The-Orm/CMakeLists.txt
@@ -5,20 +5,7 @@
#
cmake_minimum_required(VERSION 3.14)
-
-# Get the version from our sub cmakefile
-execute_process(
- COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_LIST_DIR}/gitversion.cmake"
- ERROR_VARIABLE PROJECT_VERSION
- ERROR_STRIP_TRAILING_WHITESPACE
-)
-# Cleanup output
-string(REGEX REPLACE "^[[:space:]]+|[[:space:]]+$" "" PROJECT_VERSION "${PROJECT_VERSION}")
-string(REGEX REPLACE "\n$" "" PROJECT_VERSION "${PROJECT_VERSION}")
-message(STATUS "Project version is '${PROJECT_VERSION}'")
-
-# Start project
-project(KnobKraftOrm VERSION ${PROJECT_VERSION})
+project(KnobKraftOrm VERSION 2.7.1)
# Now you can use PROJECT_DEV_TAG in your CMake scripts or in your code to handle the "-dev" part.
# For example, you could add a preprocessor definition that your code could use: