push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
alsa-lib,
fontconfig,
freetype,
libX11,
libXcomposite,
libXcursor,
libXdmcp,
libXext,
libXinerama,
libXrandr,
libXtst,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ctagdrc";
version = "0.1.1";
src = fetchFromGitHub {
owner = "BillyDM";
repo = "CTAGDRC";
tag = finalAttrs.version;
hash = "sha256-szBI8ESJz1B/JuGcZD8D53c1yJeUW1uK4GewQExtD9Q=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
alsa-lib
fontconfig
freetype
libX11
libXcomposite
libXcursor
libXdmcp
libXext
libXinerama
libXrandr
libXtst
];
enableParallelBuilding = true;
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail 'COPY_PLUGIN_AFTER_BUILD TRUE' 'COPY_PLUGIN_AFTER_BUILD FALSE'
substituteInPlace CMakeLists.txt \
--replace-fail 'include(cmake-include/CPM.cmake)' '# No CPM needed'
substituteInPlace CMakeLists.txt \
--replace-fail 'juce::juce_recommended_lto_flags' '# Not forcing LTO'
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/lib/clap $out/lib/vst3
install -Dm755 "CTAGDRC_artefacts/Release/Standalone/CTAGDRC" $out/bin/CTAGDRC
install -Dm644 "CTAGDRC_artefacts/Release/CLAP/CTAGDRC.clap" -t $out/lib/clap
cp -r "CTAGDRC_artefacts/Release/VST3/CTAGDRC.vst3" $out/lib/vst3
runHook postInstall
'';
# JUCE dlopens these, make sure they are in rpath
# Otherwise, segfault will happen
env.NIX_LDFLAGS = toString [
"-lX11"
"-lXext"
"-lXcomposite"
"-lXcursor"
"-lXinerama"
"-lXrandr"
"-lXrender"
"-lXtst"
"-lXdmcp"
];
meta = {
description = "Audio compressor plugin created with JUCE";
homepage = "https://github.com/BillyDM/CTAGDRC";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ magnetophon ];
mainProgram = "CTAGDRC";
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,57 @@
{
buildGoModule,
fetchFromGitHub,
git,
jujutsu,
lib,
makeWrapper,
nix-update-script,
universal-ctags,
versionCheckHook,
}:
buildGoModule rec {
pname = "ctags-lsp";
version = "0.8.1";
vendorHash = null;
src = fetchFromGitHub {
owner = "netmute";
repo = "ctags-lsp";
tag = "v${version}";
hash = "sha256-S+9DT4lcZTcm2dppYbkFklDKzeoOhta2b1OuDytE5sU=";
};
nativeBuildInputs = [ makeWrapper ];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
postInstall = ''
wrapProgram $out/bin/ctags-lsp \
--suffix PATH : ${
lib.makeBinPath [
universal-ctags
git
jujutsu
]
}
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://github.com/netmute/ctags-lsp/releases/tag/v${version}";
description = "LSP implementation using universal-ctags as backend";
homepage = "https://github.com/netmute/ctags-lsp";
license = lib.licenses.mit;
mainProgram = "ctags-lsp";
maintainers = with lib.maintainers; [ voronind ];
};
}

View File

@@ -0,0 +1,44 @@
# shellcheck shell=bash disable=SC2154
ctestCheckHook() {
echo "Executing ctestCheckHook"
runHook preCheck
local buildCores=1
if [ "${enableParallelChecking-1}" ]; then
buildCores="$NIX_BUILD_CORES"
fi
local flagsArray=(
"-j$buildCores"
# This is enabled by the cmakeConfigurePhase by exporting
# CTEST_OUTPUT_ON_FAILURE, but it makes sense it enable it globally here
# as well.
"--output-on-failure"
)
local disabledTestsArray=()
concatTo disabledTestsArray disabledTests
if [ ${#disabledTestsArray[@]} -ne 0 ]; then
local ctestExcludedTestsFile=$NIX_BUILD_TOP/.ctest-excluded-tests
disabledTestsString="$(concatStringsSep "\n" disabledTestsArray)"
echo -e "$disabledTestsString" >"$ctestExcludedTestsFile"
flagsArray+=("--exclude-from-file" "$ctestExcludedTestsFile")
fi
concatTo flagsArray ctestFlags checkFlags checkFlagsArray
echoCmd 'ctest flags' "${flagsArray[@]}"
ctest "${flagsArray[@]}"
echo "Finished ctestCheckHook"
runHook postCheck
}
if [ -z "${dontUseCTestCheck-}" ] && [ -z "${checkPhase-}" ]; then
checkPhase=ctestCheckHook
fi

View File

@@ -0,0 +1,9 @@
{
makeSetupHook,
cmake,
}:
makeSetupHook {
name = "ctestCheckHook";
propagatedBuildInputs = [ cmake ];
} ./ctest-check-hook.sh

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "ctlptl";
version = "0.8.43";
src = fetchFromGitHub {
owner = "tilt-dev";
repo = "ctlptl";
rev = "v${version}";
hash = "sha256-NQLVwa/JLawLM5ImcRlG/XBLZBkS0fhy2gmu5v00w1k=";
};
vendorHash = "sha256-ENSW2JGcMjg83/vsmIa4C181WOkZQrRpSVZdfWXl4JY=";
nativeBuildInputs = [ installShellFiles ];
subPackages = [ "cmd/ctlptl" ];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd ctlptl \
--bash <($out/bin/ctlptl completion bash) \
--fish <($out/bin/ctlptl completion fish) \
--zsh <($out/bin/ctlptl completion zsh)
'';
meta = with lib; {
description = "CLI for declaratively setting up local Kubernetes clusters";
homepage = "https://github.com/tilt-dev/ctlptl";
license = licenses.asl20;
maintainers = with maintainers; [ svrana ];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
stdenv,
fetchzip,
}:
stdenv.mkDerivation rec {
pname = "ctmg";
version = "1.2";
src = fetchzip {
url = "https://git.zx2c4.com/ctmg/snapshot/ctmg-${version}.tar.xz";
sha256 = "1i4v8sriwjrmj3yizbl1ysckb711yl9qsn9x45jq0ij1apsydhyc";
};
installPhase = "install -D ctmg.sh $out/bin/ctmg";
meta = with lib; {
description = "Encrypted container manager for Linux using cryptsetup";
homepage = "https://git.zx2c4.com/ctmg/about/";
license = licenses.isc;
maintainers = with maintainers; [ mrVanDalo ];
platforms = platforms.linux;
mainProgram = "ctmg";
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ncurses,
readline,
}:
stdenv.mkDerivation rec {
pname = "ctodo";
version = "1.3";
src = fetchFromGitHub {
owner = "Acolarh";
repo = "ctodo";
rev = "v${version}";
sha256 = "0mqy5b35cbdwfpbs91ilsgz3wc4cky38xfz9pnr4q88q1vybigna";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
ncurses
readline
];
meta = with lib; {
homepage = "http://ctodo.apakoh.dk/";
description = "Simple ncurses-based task list manager";
license = licenses.mit;
maintainers = [ maintainers.matthiasbeyer ];
platforms = platforms.unix;
mainProgram = "ctodo";
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "ctop";
version = "0.7.7";
src = fetchFromGitHub {
owner = "bcicen";
repo = "ctop";
rev = "v${version}";
sha256 = "sha256-tojSzgpoGQg6MwV/MVpQpCA5w6bZO+9IOvfkw0Ydr6c=";
};
vendorHash = "sha256-UAja7XuoLqJFNcK1PgHGcuf/HbvSrWyRvW2D3T7Hg0g=";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.build=v${version}"
];
meta = with lib; {
description = "Top-like interface for container metrics";
homepage = "https://ctop.sh/";
license = licenses.mit;
maintainers = with maintainers; [ apeyroux ];
mainProgram = "ctop";
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
glib,
}:
stdenv.mkDerivation rec {
pname = "ctpl";
version = "0.3.5";
src = fetchurl {
url = "https://download.tuxfamily.org/ctpl/releases/ctpl-${version}.tar.gz";
sha256 = "sha256-IRCPx1Z+0hbe6kWRrb/s6OiLH0uxynfDdACSBkTXVr4=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ glib ];
meta = with lib; {
homepage = "http://ctpl.tuxfamily.org/";
description = "Template engine library written in C";
mainProgram = "ctpl";
platforms = platforms.linux;
maintainers = [ ];
license = licenses.gpl3Plus;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchurl,
cmake,
}:
stdenv.mkDerivation rec {
pname = "ctpp2";
version = "2.8.3";
src = fetchurl {
url = "https://ctpp.havoc.ru/download/${pname}-${version}.tar.gz";
sha256 = "1z22zfw9lb86z4hcan9hlvji49c9b7vznh7gjm95gnvsh43zsgx8";
};
nativeBuildInputs = [ cmake ];
patchPhase = ''
# include <unistd.h> to fix undefined getcwd
sed -i -e 's/<stdlib.h>/<stdlib.h>\n#include <unistd.h>/' src/CTPP2FileSourceLoader.cpp
'';
cmakeFlags = [
# RPATH of binary /nix/store/.../bin/ctpp2json contains a forbidden reference to /build/
"-DCMAKE_SKIP_BUILD_RPATH=ON"
];
doCheck = false; # fails
meta = with lib; {
description = "High performance templating engine";
homepage = "https://ctpp.havoc.ru/";
maintainers = [ maintainers.robbinch ];
platforms = platforms.linux;
license = licenses.bsd2;
};
}

View File

@@ -0,0 +1,72 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
file,
openssl,
atool,
bat,
chafa,
delta,
ffmpeg,
ffmpegthumbnailer,
fontforge,
glow,
imagemagick,
jq,
poppler-utils,
ueberzug,
}:
stdenv.mkDerivation rec {
pname = "ctpv";
version = "1.1";
src = fetchFromGitHub {
owner = "NikitaIvanovV";
repo = "ctpv";
rev = "v${version}";
hash = "sha256-3BQi4m44hBmPkJBFNCg6d9YKRbDZwLxdzBb/NDWTQP4=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
file # libmagic
openssl
];
makeFlags = [ "PREFIX=$(out)" ];
preFixup = ''
wrapProgram $out/bin/ctpv \
--prefix PATH ":" "${
lib.makeBinPath [
atool # for archive files
bat
chafa # for image files on Wayland
delta # for diff files
ffmpeg
ffmpegthumbnailer
fontforge
glow # for markdown files
imagemagick
jq # for json files
poppler-utils # for pdf files
ueberzug # for image files on X11
]
}";
'';
# Until https://github.com/NikitaIvanovV/ctpv/pull/90 is merged
patches = [ ./use-polite-flag.patch ];
meta = with lib; {
description = "File previewer for a terminal";
homepage = "https://github.com/NikitaIvanovV/ctpv";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ maintainers.wesleyjrz ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/sh/helpers.sh b/sh/helpers.sh
index fef8691..229d38f 100644
--- a/sh/helpers.sh
+++ b/sh/helpers.sh
@@ -73,7 +73,7 @@ is_anim_image() {
chafa_run() {
format='-f symbols'
autochafa && format=
- chafasixel && format='-f sixels'
+ chafasixel && format='-f sixels --polite on'
chafa -s "${w}x${h}" $format "$1" | sed 's/#/\n#/g'
}

View File

@@ -0,0 +1,119 @@
{
lib,
stdenv,
config,
fetchFromGitHub,
cmake,
llvmPackages, # openmp
withMkl ? false,
mkl,
withCUDA ? config.cudaSupport,
withCuDNN ? withCUDA && (cudaPackages ? cudnn),
cudaPackages,
# Enabling both withOneDNN and withOpenblas is broken
# https://github.com/OpenNMT/CTranslate2/issues/1294
withOneDNN ? false,
oneDNN,
withOpenblas ? true,
openblas,
withRuy ? true,
# passthru tests
libretranslate,
wyoming-faster-whisper,
}:
let
stdenv' = if withCUDA then cudaPackages.backendStdenv else stdenv;
in
stdenv'.mkDerivation (finalAttrs: {
pname = "ctranslate2";
version = "4.6.0";
src = fetchFromGitHub {
owner = "OpenNMT";
repo = "CTranslate2";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-EM2kunqtxo0BTIzrEomfaRsdav7sx6QEOhjDtjjSoYY=";
};
# Fix CMake 4 compatibility
postPatch = ''
substituteInPlace third_party/cpu_features/CMakeLists.txt \
--replace-fail \
'cmake_minimum_required(VERSION 3.0)' \
'cmake_minimum_required(VERSION 3.10)'
substituteInPlace third_party/ruy/third_party/cpuinfo/deps/clog/CMakeLists.txt \
--replace-fail \
'CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR)' \
'CMAKE_MINIMUM_REQUIRED(VERSION 3.10 FATAL_ERROR)'
'';
nativeBuildInputs = [
cmake
]
++ lib.optionals withCUDA [
cudaPackages.cuda_nvcc
];
cmakeFlags = [
# https://opennmt.net/CTranslate2/installation.html#build-options
# https://github.com/OpenNMT/CTranslate2/blob/54810350e662ebdb01ecbf8e4a746f02aeff1dd7/python/tools/prepare_build_environment_linux.sh#L53
# https://github.com/OpenNMT/CTranslate2/blob/59d223abcc7e636c1c2956e62482bc3299cc7766/python/tools/prepare_build_environment_macos.sh#L12
(lib.cmakeFeature "OPENMP_RUNTIME" "COMP")
(lib.cmakeBool "WITH_CUDA" withCUDA)
(lib.cmakeBool "WITH_CUDNN" withCuDNN)
(lib.cmakeBool "WITH_DNNL" withOneDNN)
(lib.cmakeBool "WITH_OPENBLAS" withOpenblas)
(lib.cmakeBool "WITH_RUY" withRuy)
(lib.cmakeBool "WITH_MKL" withMkl)
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
(lib.cmakeBool "WITH_ACCELERATE" true)
];
buildInputs =
lib.optionals withMkl [
mkl
]
++ lib.optionals withCUDA [
cudaPackages.cuda_cccl # <nv/target> required by the fp16 headers in cudart
cudaPackages.cuda_cudart
cudaPackages.libcublas
cudaPackages.libcurand
]
++ lib.optionals (withCUDA && withCuDNN) [
cudaPackages.cudnn
]
++ lib.optionals withOneDNN [
oneDNN
]
++ lib.optionals withOpenblas [
openblas
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
llvmPackages.openmp
];
passthru.tests = {
inherit
libretranslate
wyoming-faster-whisper
;
};
meta = {
description = "Fast inference engine for Transformer models";
mainProgram = "ct2-translator";
homepage = "https://github.com/OpenNMT/CTranslate2";
changelog = "https://github.com/OpenNMT/CTranslate2/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
hexa
misuzu
];
broken = !(withCuDNN -> withCUDA);
};
})

View File

@@ -0,0 +1,39 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "ctre";
version = "3.10.0";
src = fetchFromGitHub {
owner = "hanickadot";
repo = "compile-time-regular-expressions";
rev = "v${version}";
hash = "sha256-/44oZi6j8+a1D6ZGZpoy82GHjPtqzOvuS7d3SPbH7fs=";
};
nativeBuildInputs = [ cmake ];
postPatch = ''
substituteInPlace packaging/pkgconfig.pc.in \
--replace "\''${prefix}/" ""
'';
dontBuild = true;
meta = with lib; {
description = "Fast compile-time regular expressions library";
longDescription = ''
Fast compile-time regular expressions with support for
matching/searching/capturing during compile-time or runtime.
'';
license = licenses.asl20;
homepage = "https://compile-time.re";
maintainers = with maintainers; [ azahi ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchFromGitHub,
gitUpdater,
}:
stdenv.mkDerivation rec {
pname = "ctrtool";
version = "1.2.1";
src = fetchFromGitHub {
owner = "jakcron";
repo = "Project_CTR";
rev = "ctrtool-v${version}";
sha256 = "HqqeQCEUof4EBUhuUAdTruMFgYIoXhtAN3yuWW6tD+Y=";
};
sourceRoot = "${src.name}/ctrtool";
enableParallelBuilding = true;
preBuild = ''
make -j $NIX_BUILD_CORES deps
'';
# workaround for https://github.com/3DSGuy/Project_CTR/issues/145
env.NIX_CFLAGS_COMPILE = "-O0";
installPhase = "
mkdir $out/bin -p
cp bin/ctrtool${stdenv.hostPlatform.extensions.executable} $out/bin/
";
passthru.updateScript = gitUpdater { rev-prefix = "ctrtool-v"; };
meta = {
license = lib.licenses.mit;
description = "Tool to extract data from a 3ds rom";
platforms = with lib.platforms; linux ++ darwin;
maintainers = with lib.maintainers; [ marius851000 ];
mainProgram = "ctrtool";
};
}

View File

@@ -0,0 +1,81 @@
diff --git a/CMakeLists.txt.orig b/CMakeLists.txt
index ac0488e..a3724bc 100644
--- a/CMakeLists.txt.orig
+++ b/CMakeLists.txt
@@ -50,14 +50,6 @@ include(FetchContent)
set(CMAKE_VERBOSE_MAKEFILE ON)
-#========================================== PRE-CHECKS ============================================#
-include(FindGit)
-find_package(Git)
-
-if (NOT Git_FOUND)
- message(FATAL_ERROR "Required package 'Git' not found on system.")
-endif ()
-
#======================================== LIB IMPORTS =============================================#
# ======= #
# OpenSSL #
@@ -65,40 +57,17 @@ endif ()
find_package(OpenSSL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
-# ============== #
-# JSON-C library #
-# ============== #
-set(JSONC_DOWNLOAD_PATH "${TEMP_DIR_PATH}/libjsonc")
-set(JSONC_INSTALL_PATH "${CMAKE_EXTERNAL_OUTPUT_DIRECTORY}")
-
-add_custom_target(make-jsonc-install-dir ALL
- COMMAND ${CMAKE_COMMAND} -E make_directory ${JSONC_INSTALL_PATH}
-)
-
-ExternalProject_Add(libjsonc
- PREFIX "${JSONC_DOWNLOAD_PATH}"
- SOURCE_DIR "${JSONC_DOWNLOAD_PATH}/src/libjsonc-build"
- GIT_REPOSITORY "https://github.com/json-c/json-c.git"
- GIT_TAG "json-c-0.18-20240915"
- CMAKE_ARGS "-DBUILD_STATIC_LIBS=ON"
- "-DBUILD_SHARED_LIBS=OFF"
- "-DCMAKE_INSTALL_PREFIX:PATH=${JSONC_INSTALL_PATH}"
- "-DHAVE_ARC4RANDOM=OFF"
- "-DCMAKE_BUILD_TYPE=release"
- "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
-)
-
-set(JSONC_LIBRARIES
- ${CMAKE_EXTERNAL_OUTPUT_DIRECTORY}/lib/libjson-c.a
-# bsd
-)
-
# ============ #
# Curl library #
# ============ #
find_package(CURL REQUIRED)
include_directories(${CURL_INCLUDE_DIR})
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(JSONC REQUIRED json-c)
+include_directories(${JSONC_INCLUDE_DIRS})
+
+
# ================================ #
# nCurses - for the user interface #
# ================================ #
@@ -410,7 +379,7 @@ add_subdirectory(docs)
#endforeach()
add_executable(ctune ${SOURCE_FILES})
-add_dependencies(ctune ctune_logger libjsonc)
+add_dependencies(ctune ctune_logger)
include_directories(${CMAKE_EXTERNAL_OUTPUT_DIRECTORY}/include)
add_dependencies(ctune ${CTUNE_PLUGIN_LIST_AUDIO_PLAYER})
@@ -450,4 +419,4 @@ if(TARGET uninstall)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMakeUninstall.cmake)
-endif()
\ No newline at end of file
+endif()

View File

@@ -0,0 +1,66 @@
{
stdenv,
lib,
fetchFromGitHub,
openssl,
curl,
ffmpeg,
vlc,
SDL2,
lame,
json_c,
cmake,
pkg-config,
ncurses,
libuuid,
pandoc,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ctune";
version = "1.3.4";
src = fetchFromGitHub {
owner = "An7ar35";
repo = "ctune";
tag = "v${finalAttrs.version}";
hash = "sha256-36Y19CbUnv8NtvZjCMKod/Y/Ofjgr9BsxgMMdoMK+hU=";
};
nativeBuildInputs = [
cmake
pkg-config
pandoc
];
buildInputs = [
openssl
curl
ffmpeg
vlc
SDL2
lame
json_c
ncurses
libuuid
];
strictDeps = true;
cmakeFlags = [
# Avoid a wrong nested install path location
# Set to "$out" instead of "$out/$out"
"-DCMAKE_INSTALL_PREFIX=''"
];
patches = [ ./cmake_disable_git_clone.patch ];
meta = {
description = "Nice terminal nCurses (tui) internet radio player for Linux, browse and search from api.radio-browser.info";
homepage = "https://github.com/An7ar35/ctune";
changelog = "https://github.com/An7ar35/ctune/blob/master/CHANGELOG.md";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ theobori ];
mainProgram = "ctune";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,67 @@
diff -Naur --no-dereference ctx-source-old/configure.sh ctx-source-new/configure.sh
--- ctx-source-old/configure.sh 1969-12-31 21:00:01.000000000 -0300
+++ ctx-source-new/configure.sh 2023-09-27 19:26:05.403569888 -0300
@@ -42,15 +42,18 @@
ENABLE_SWITCH_DISPATCH=1
pkg-config sdl2 && HAVE_SDL=1
-pkg-config babl && HAVE_BABL=1
+
+pkg-config babl-0.1 && { HAVE_BABL=1; BABL_NAME=babl-0.1; }
+if [ $HAVE_BABL != 1 ]; then
+ pkg-config babl && { HAVE_BABL=1; BABL_NAME=babl; }
+fi
+
pkg-config libcurl && HAVE_LIBCURL=1
pkg-config alsa && HAVE_ALSA=1
pkg-config libdrm && HAVE_KMS=1
#pkg-config harfbuzz && HAVE_HARFBUZZ=1
-
-
-ARCH=`uname -m`
+: "${ARCH:="$(uname -m)"}"
case "$ARCH" in
"x86_64") HAVE_SIMD=1 ;;
@@ -224,8 +227,8 @@
if [ $HAVE_BABL = 1 ];then
echo "#define CTX_BABL 1 " >> local.conf
echo "#define CTX_ENABLE_CM 1 " >> local.conf
- echo "CTX_CFLAGS+= `pkg-config babl --cflags`" >> build.conf
- echo "CTX_LIBS+= `pkg-config babl --libs` " >> build.conf
+ echo "CTX_CFLAGS+= `pkg-config "${BABL_NAME}" --cflags`" >> build.conf
+ echo "CTX_LIBS+= `pkg-config "${BABL_NAME}" --libs` " >> build.conf
else
echo "#define CTX_BABL 0 " >> local.conf
echo "#define CTX_ENABLE_CM 0 " >> local.conf
@@ -335,7 +338,7 @@
#echo "Generating build.deps"
#make build.deps 2>/dev/null
-echo -n "configuration summary, architecture $(arch)"
+echo -n "configuration summary, architecture $ARCH"
[ $HAVE_SIMD = 1 ] && echo " SIMD multi-pass"
echo ""
echo "Backends:"
diff -Naur --no-dereference ctx-source-old/Makefile ctx-source-new/Makefile
--- ctx-source-old/Makefile 1969-12-31 21:00:01.000000000 -0300
+++ ctx-source-new/Makefile 2023-09-27 19:37:23.779830320 -0300
@@ -206,8 +206,8 @@
libctx.a: itk.o deps.o $(CTX_OBJS) build.conf Makefile
$(AR) rcs $@ $(CTX_OBJS) deps.o itk.o
libctx.so: $(CTX_OBJS) deps.o itk.o build.conf Makefile
- $(LD) -shared $(LIBS) $(CTX_OBJS) deps.o itk.o $(CTX_LIBS) -o $@
- #$(LD) --retain-symbols-file=symbols -shared $(LIBS) $? $(CTX_LIBS) -o $@
+ $(CCC) -shared $(LIBS) $(CTX_OBJS) deps.o itk.o $(CTX_LIBS) -o $@
+ #$(CCC) --retain-symbols-file=symbols -shared $(LIBS) $? $(CTX_LIBS) -o $@
ctx: main.c ctx.h build.conf Makefile $(TERMINAL_OBJS) $(MEDIA_HANDLERS_OBJS) libctx.a
$(CCC) main.c $(TERMINAL_OBJS) $(MEDIA_HANDLERS_OBJS) -o $@ $(CFLAGS) libctx.a $(LIBS) $(CTX_CFLAGS) $(OFLAGS_LIGHT) -lpthread $(CTX_LIBS)
@@ -277,5 +277,5 @@
for a in `cat itk/css.h | tr ';' ' ' | tr ',' ' ' | tr ')' ' '|tr ':' ' ' | tr '{' ' ' | tr ' ' '\n' | grep 'SQZ_[a-z][0-9a-zA-Z_]*'| sort | uniq`;do b=`echo $$a|tail -c+5|tr '_' '-'`;echo "#define $$a `./squoze/squoze -33 $$b`u // \"$$b\"";done \
>> $@
echo '#endif' >> $@
-static.inc: static/* static/*/* tools/gen_fs.sh
+static.inc: static/* tools/gen_fs.sh
./tools/gen_fs.sh static > $@

View File

@@ -0,0 +1,83 @@
{
lib,
stdenv,
fetchgit,
SDL2,
alsa-lib,
babl,
bash,
curl,
libdrm, # Not documented
pkg-config,
xxd,
enableFb ? false,
nixosTests,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ctx";
version = "unstable-2023-09-03";
src = fetchgit {
name = "ctx-source"; # because of a dash starting the directory
url = "https://ctx.graphics/.git/";
rev = "1bac18c152eace3ca995b3c2b829a452085d46fb";
hash = "sha256-fOcQJ2XCeomdtAUmy0A+vU7Vt325OSwrb1+ccW+gZ38=";
};
patches = [
# Many problematic things fixed - it should be upstreamed somehow:
# - babl changed its name in pkg-config files
# - arch detection made optional
# - LD changed to CCC
# - remove inexistent reference to static/*/*
./0001-fix-detections.diff
];
postPatch = ''
patchShebangs ./tools/gen_fs.sh
'';
nativeBuildInputs = [
pkg-config
xxd
];
buildInputs = [
SDL2
alsa-lib
babl
bash # for ctx-audioplayer
curl
libdrm
];
strictDeps = true;
env.ARCH = stdenv.hostPlatform.parsed.cpu.arch;
configureScript = "./configure.sh";
configureFlags = lib.optional enableFb "--enable-fb";
configurePlatforms = [ ];
dontAddPrefix = true;
dontDisableStatic = true;
installFlags = [
"PREFIX=${placeholder "out"}"
];
passthru.tests.test = nixosTests.terminal-emulators.ctx;
meta = {
homepage = "https://ctx.graphics/";
description = "Vector graphics terminal";
longDescription = ''
ctx is an interactive 2D vector graphics, audio, text- canvas and
terminal, with escape sequences that enable a 2D vector drawing API using
a vector graphics protocol.
'';
license = lib.licenses.gpl3Plus;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
zlib,
libffi,
elfutils,
libdwarf,
}:
stdenv.mkDerivation rec {
pname = "ctypes.sh";
version = "1.2";
src = fetchFromGitHub {
owner = "taviso";
repo = "ctypes.sh";
rev = "v${version}";
sha256 = "1wafyfhwd7nf7xdici0djpwgykizaz7jlarn0r1b4spnpjx1zbx4";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
zlib
libffi
elfutils
libdwarf
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
meta = with lib; {
description = "Foreign function interface for bash";
mainProgram = "ctypes.sh";
homepage = "https://github.com/taviso/ctypes.sh";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.unix;
};
}