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,33 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "cl-launch";
version = "4.1.4.1";
src = fetchurl {
url = "http://common-lisp.net/project/xcvb/cl-launch/cl-launch-${version}.tar.gz";
sha256 = "sha256-v5aURs2Verhn2HmGiijvY9br20OTPFrOGBWsb6cHhSQ=";
};
preConfigure = ''
mkdir -p "$out/bin"
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
];
preBuild = ''
sed -e 's/\t\t@/\t\t/g' -i Makefile
'';
meta = with lib; {
description = "Common Lisp launcher script";
license = licenses.llgpl21;
maintainers = with maintainers; [ raskin ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "cl-wordle";
version = "0.5.0";
src = fetchFromGitHub {
owner = "conradludgate";
repo = "wordle";
rev = "v${version}";
sha256 = "sha256-wFTvzAzboUFQg3fauIwIdRChK7rmLES92jK+8ff1D3s=";
};
cargoHash = "sha256-kkR49UwwkpZhKvBadPTUn0D/4sRVlVJowQ1+BqtBVOs=";
meta = with lib; {
description = "Wordle TUI in Rust";
homepage = "https://github.com/conradludgate/wordle";
# repo has no license, but crates.io says it's MIT
license = licenses.mit;
maintainers = with maintainers; [ lom ];
mainProgram = "wordle";
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchFromGitHub,
rebar,
erlang,
opencl-headers,
ocl-icd,
}:
stdenv.mkDerivation rec {
version = "1.2.4";
pname = "cl";
src = fetchFromGitHub {
owner = "tonyrog";
repo = "cl";
rev = "cl-${version}";
sha256 = "1gwkjl305a0231hz3k0w448dsgbgdriaq764sizs5qfn59nzvinz";
};
# https://github.com/tonyrog/cl/issues/39
postPatch = ''
substituteInPlace c_src/Makefile \
--replace "-m64" ""
'';
buildInputs = [
erlang
rebar
opencl-headers
ocl-icd
];
buildPhase = ''
rebar compile
'';
# 'cp' line taken from Arch recipe
# https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/erlang-sdl
installPhase = ''
DIR=$out/lib/erlang/lib/${pname}-${version}
mkdir -p $DIR
cp -ruv c_src doc ebin include priv src $DIR
'';
meta = with lib; {
homepage = "https://github.com/tonyrog/cl";
description = "OpenCL binding for Erlang";
license = licenses.mit;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clac";
version = "0.3.4";
src = fetchFromGitHub {
owner = "soveran";
repo = "clac";
tag = finalAttrs.version;
hash = "sha256-DcW35jKIZQqkNa5Y6am2e5/TAEg3Fo2n+fHG3nOpNzM=";
};
makeFlags = [ "PREFIX=$(out)" ];
postInstall = ''
mkdir -p "$out/share/doc/clac"
cp README* LICENSE "$out/share/doc/clac"
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Interactive stack-based calculator";
homepage = "https://github.com/soveran/clac";
changelog = "https://github.com/soveran/clac/releases/tag/${finalAttrs.version}";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [
gepbird
raskin
];
platforms = lib.platforms.unix;
mainProgram = "clac";
};
})

View File

@@ -0,0 +1,55 @@
{
lib,
buildGoModule,
fetchFromGitHub,
makeWrapper,
rpm,
xz,
}:
buildGoModule rec {
pname = "clair";
version = "4.8.0";
src = fetchFromGitHub {
owner = "quay";
repo = "clair";
rev = "v${version}";
hash = "sha256-itIjDdTKQ0PCfOkefXxqu6MpdWK3F1j6ArvaInQd/hc=";
};
vendorHash = "sha256-CpIOQiEjQGC6qeoxRS/jFohUnELefAX0KOERudL6BGM=";
nativeBuildInputs = [
makeWrapper
];
subPackages = [
"cmd/clair"
"cmd/clairctl"
];
ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
];
postInstall = ''
wrapProgram $out/bin/clair \
--prefix PATH : "${
lib.makeBinPath [
rpm
xz
]
}"
'';
meta = {
description = "Vulnerability Static Analysis for Containers";
homepage = "https://github.com/quay/clair";
changelog = "https://github.com/quay/clair/blob/v${version}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "clairvoyance";
version = "2.5.4";
pyproject = true;
src = fetchFromGitHub {
owner = "nikitastupin";
repo = "clairvoyance";
tag = "v${version}";
hash = "sha256-5PbvR0HVvA2xFzD+Jtisxuk68pdM29NyweFbZKBbhzs=";
};
pythonRelaxDeps = [ "rich" ];
build-system = with python3.pkgs; [ poetry-core ];
dependencies = with python3.pkgs; [
aiohttp
rich
];
nativeCheckInputs = with python3.pkgs; [
aiounittest
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'asyncio = "^3.4.3"' ""
'';
pythonImportsCheck = [ "clairvoyance" ];
disabledTests = [
# KeyError
"test_probe_typename"
];
meta = {
description = "Tool to obtain GraphQL API schemas";
homepage = "https://github.com/nikitastupin/clairvoyance";
changelog = "https://github.com/nikitastupin/clairvoyance/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "clairvoyance";
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
fetchFromGitHub,
gtk4,
libadwaita,
libportal,
meson,
ninja,
pkg-config,
stdenv,
vala,
wrapGAppsHook4,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clairvoyant";
version = "3.1.10";
src = fetchFromGitHub {
owner = "cassidyjames";
repo = "clairvoyant";
rev = finalAttrs.version;
hash = "sha256-CSORiNPqzliIpslV28NRPs/+bc9iblsLTPOm1WxxTjc=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
vala
wrapGAppsHook4
];
buildInputs = [
gtk4
libadwaita
libportal
];
passthru = {
updateScript = nix-update-script { };
};
meta = {
changelog = "https://github.com/cassidyjames/clairvoyant/releases/tag/${finalAttrs.version}";
description = "Ask questions, get psychic answers";
homepage = "https://github.com/cassidyjames/clairvoyant";
license = lib.licenses.gpl3Plus;
mainProgram = "com.github.cassidyjames.clairvoyant";
teams = [ lib.teams.gnome-circle ];
};
})

View File

@@ -0,0 +1,91 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
cmake,
zlib,
bzip2,
libiconv,
libxml2,
openssl,
ncurses,
curl,
libmilter,
pcre2,
libmspack,
systemd,
json_c,
check,
rustc,
rust-bindgen,
rustfmt,
cargo,
python3,
}:
stdenv.mkDerivation rec {
pname = "clamav";
version = "1.4.3";
src = fetchurl {
url = "https://www.clamav.net/downloads/production/${pname}-${version}.tar.gz";
hash = "sha256-2HTKvz1HZbNbUY71NWWKHm7HSAIAah1hP58SSqE0MhA=";
};
patches = [
./sample-configuration-file-install-location.patch
./use-non-existent-file-with-proper-permissions.patch
];
enableParallelBuilding = true;
nativeBuildInputs = [
cmake
pkg-config
rustc
rust-bindgen
rustfmt
cargo
python3
];
buildInputs = [
zlib
bzip2
libxml2
openssl
ncurses
curl
libiconv
libmilter
pcre2
libmspack
json_c
check
]
++ lib.optional stdenv.hostPlatform.isLinux systemd;
cmakeFlags = [
"-DSYSTEMD_UNIT_DIR=${placeholder "out"}/lib/systemd"
"-DAPP_CONFIG_DIRECTORY=/etc/clamav"
];
# Seems to only fail on x86_64-darwin with sandboxing
doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64);
__darwinAllowLocalNetworking = true;
checkInputs = [
python3.pkgs.pytest
];
meta = with lib; {
homepage = "https://www.clamav.net";
description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";
license = licenses.gpl2Only;
maintainers = with maintainers; [
robberer
qknight
globin
];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,29 @@
diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt
index 826fff1..3cefc34 100644
--- a/etc/CMakeLists.txt
+++ b/etc/CMakeLists.txt
@@ -6,14 +6,14 @@ install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/clamd.conf.sample
DESTINATION
- ${APP_CONFIG_DIRECTORY}
+ ${CMAKE_INSTALL_PREFIX}/${APP_CONFIG_DIRECTORY}
COMPONENT programs)
install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/freshclam.conf.sample
DESTINATION
- ${APP_CONFIG_DIRECTORY}
+ ${CMAKE_INSTALL_PREFIX}/${APP_CONFIG_DIRECTORY}
COMPONENT programs)
if(ENABLE_MILTER)
@@ -21,6 +21,6 @@ if(ENABLE_MILTER)
FILES
${CMAKE_CURRENT_SOURCE_DIR}/clamav-milter.conf.sample
DESTINATION
- ${APP_CONFIG_DIRECTORY}
+ ${CMAKE_INSTALL_PREFIX}/${APP_CONFIG_DIRECTORY}
COMPONENT programs)
endif()

View File

@@ -0,0 +1,13 @@
diff --git a/unit_tests/check_clamd.c b/unit_tests/check_clamd.c
index 2f526709a..df67c36ed 100644
--- a/unit_tests/check_clamd.c
+++ b/unit_tests/check_clamd.c
@@ -144,7 +144,7 @@ static void conn_teardown(void)
#define CLEANREPLY CLEANFILE ": OK"
#define UNKNOWN_REPLY "UNKNOWN COMMAND"
-#define NONEXISTENT PATHSEP "nonexistentfilename"
+#define NONEXISTENT PATHSEP "tmp" PATHSEP "nonexistentfilename"
#define NONEXISTENT_REPLY NONEXISTENT ": File path check failure: No such file or directory. ERROR"

View File

@@ -0,0 +1,97 @@
{
lib,
perlPackages,
fetchFromGitHub,
wrapGAppsHook3,
gobject-introspection,
perl,
clamav,
}:
perlPackages.buildPerlPackage rec {
pname = "clamtk";
version = "6.18";
src = fetchFromGitHub {
owner = "dave-theunsub";
repo = "clamtk";
rev = "v${version}";
hash = "sha256-ClBsBXbGj67zgrkA9EjgK7s3OmXOJA+xV5xLGOcMsbI=";
};
nativeBuildInputs = [
wrapGAppsHook3
gobject-introspection
];
buildInputs = [
perl
clamav
];
propagatedBuildInputs = with perlPackages; [
Glib
LWP
LWPProtocolHttps
TextCSV
JSON
LocaleGettext
Gtk3
];
preConfigure = "touch Makefile.PL";
# no tests implemented
doCheck = false;
outputs = [
"out"
"man"
];
postPatch = ''
# Set correct nix paths in perl scripts
substituteInPlace lib/App.pm \
--replace /usr/bin/freshclam ${lib.getBin clamav}/bin/freshclam \
--replace /usr/bin/sigtool ${lib.getBin clamav}/bin/sigtool \
--replace /usr/bin/clamscan ${lib.getBin clamav}/bin/clamscan \
--replace /usr/bin/clamdscan ${lib.getBin clamav}/bin/clamdscan \
--replace /usr/share/pixmaps $out/share/pixmaps
# We want to catch the crontab wrapper on NixOS and the
# System crontab on non-NixOS so we don't give a full path.
substituteInPlace lib/Schedule.pm \
--replace "( -e '/usr/bin/crontab' )" "(1)" \
--replace /usr/bin/crontab crontab
'';
installPhase = ''
runHook preInstall
install -Dm755 clamtk -t $out/bin
install -Dm444 lib/*.pm -t $out/lib/perl5/site_perl/ClamTk
install -Dm444 clamtk.desktop -t $out/share/applications
install -Dm444 images/* -t $out/share/pixmaps
install -Dm444 clamtk.1.gz -t $out/share/man/man1
install -Dm444 {CHANGES,LICENSE,*.md} -t $out/share/doc/clamtk
runHook postInstall
'';
preFixup = ''
gappsWrapperArgs+=(
--prefix PERL5LIB : $PERL5LIB
--set GI_TYPELIB_PATH "$GI_TYPELIB_PATH"
)
'';
meta = with lib; {
description = ''
Easy to use, lightweight front-end for ClamAV (Clam Antivirus).
'';
mainProgram = "clamtk";
license = licenses.gpl1Plus;
homepage = "https://github.com/dave-theunsub/clamtk";
platforms = platforms.linux;
maintainers = with maintainers; [
ShamrockLee
];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
fetchCrate,
rustPlatform,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "clang-tidy-sarif";
version = "0.8.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-ALwEsF1n6WYqITfYTn8mIyn3sxTbDux17FxKIorKkFc=";
};
cargoHash = "sha256-cTBXStAA+oCRze2Bh/trultdqtBNOOpXQltJ6R34nF8=";
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "CLI tool to convert clang-tidy diagnostics into SARIF";
homepage = "https://psastras.github.io/sarif-rs";
maintainers = with lib.maintainers; [ getchoo ];
mainProgram = "clang-tidy-sarif";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,94 @@
{
lib,
fetchFromGitHub,
stdenv,
cmake,
pkg-config,
installShellFiles,
libclang,
llvmPackages,
libllvm,
yaml-cpp,
elfutils,
libunwind,
versionCheckHook,
enableLibcxx ? false,
debug ? false,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clang-uml";
version = "0.6.1";
src = fetchFromGitHub {
owner = "bkryza";
repo = "clang-uml";
rev = finalAttrs.version;
hash = "sha256-mY6kJnwWLgCeKXSquNTxsnr4S3bKwedgiRixzyLWTK8=";
};
nativeBuildInputs = [
cmake
pkg-config
installShellFiles
]
++ (
if debug then
[
elfutils
libunwind
]
else
[ ]
);
cmakeFlags = [
"-DCUSTOM_COMPILE_OPTIONS=-Wno-error=sign-compare"
"-DGIT_VERSION=${finalAttrs.version}"
];
buildInputs = [
libclang
libllvm
yaml-cpp
];
cmakeBuildType = if debug then "Debug" else "Release";
clang = if enableLibcxx then llvmPackages.libcxxClang else llvmPackages.clang;
postInstall = ''
cp $out/bin/clang-uml $out/bin/clang-uml-unwrapped
rm $out/bin/clang-uml
export unwrapped_clang_uml="$out/bin/clang-uml-unwrapped"
# inject clang and unwrapp_clang_uml variables into wrapper
substituteAll ${./wrapper} $out/bin/clang-uml
chmod +x $out/bin/clang-uml
installShellCompletion --cmd clang-uml \
--bash $src/packaging/autocomplete/clang-uml \
--zsh $src/packaging/autocomplete/_clang-uml
'';
dontFixup = debug;
dontStrip = debug;
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgramArg = "--version";
meta = {
description = "Customizable automatic UML diagram generator for C++ based on Clang";
longDescription = ''
clang-uml is an automatic C++ to UML class, sequence, package and include diagram generator, driven by YAML configuration files.
The main idea behind the project is to easily maintain up-to-date diagrams within a code-base or document legacy code.
The configuration file or files for clang-uml define the types and contents of each generated diagram.
The diagrams can be generated in PlantUML, MermaidJS and JSON formats.
'';
maintainers = with lib.maintainers; [ eymeric ];
homepage = "https://clang-uml.github.io/";
license = lib.licenses.asl20;
platforms = lib.platforms.all;
mainProgram = "clang-uml";
};
})

View File

@@ -0,0 +1,31 @@
#!/bin/sh
# This file is copied from https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/clang-tools/wrapper
# The clang-tools wrapper is commonly used together with the clang package on
# nix, because without the wrapper, clang tools fail to find stdlib includes on
# nix.
buildcpath() {
local path after
while (( $# )); do
case $1 in
-isystem)
shift
path=$path${path:+':'}$1
;;
-idirafter)
shift
after=$after${after:+':'}$1
;;
esac
shift
done
echo $path${after:+':'}$after
}
export CPATH=${CPATH}${CPATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
$(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}${CPLUS_INCLUDE_PATH:+':'}$(buildcpath ${NIX_CFLAGS_COMPILE} \
$(<@clang@/nix-support/libcxx-cxxflags) \
$(<@clang@/nix-support/libc-cflags)):@clang@/resource-root/include
exec @unwrapped_clang_uml@ "$@"

View File

@@ -0,0 +1,30 @@
{
stdenv,
lib,
cmake,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clangbuildanalyzer";
version = "1.6.0";
src = fetchFromGitHub {
owner = "aras-p";
repo = "ClangBuildAnalyzer";
rev = "v${finalAttrs.version}";
hash = "sha256-GIMQZGPFKDrfMqCsA8nR3O8Hzp2jcaZ+yDrPeCxTsIg=";
};
nativeBuildInputs = [
cmake
];
meta = {
description = "Tool for analyzing Clang's -ftime-trace files";
homepage = "https://github.com/aras-p/ClangBuildAnalyzer";
maintainers = [ ];
license = lib.licenses.unlicense;
platforms = lib.platforms.unix;
mainProgram = "ClangBuildAnalyzer";
};
})

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
libGL,
libpng,
pkg-config,
xorg,
freetype,
fontconfig,
alsa-lib,
libXrender,
libXinerama,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clanlib";
version = "4.2.0";
src = fetchFromGitHub {
repo = "ClanLib";
owner = "sphair";
tag = "v${finalAttrs.version}";
hash = "sha256-sRHRkT8NiKVfa9YgP6DYV9WzCZoH7f0phHpoYMnCk98=";
};
nativeBuildInputs = [
pkg-config
autoreconfHook
];
buildInputs = [
libGL
libpng
xorg.xorgproto
freetype
fontconfig
alsa-lib
libXrender
libXinerama
];
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/sphair/ClanLib";
description = "Cross platform toolkit library with a primary focus on game creation";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ nixinator ];
platforms = with lib.platforms; lib.intersectLists linux (x86 ++ arm ++ aarch64 ++ riscv);
};
})

View File

@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clap";
version = "1.2.6";
src = fetchFromGitHub {
owner = "free-audio";
repo = "clap";
rev = finalAttrs.version;
hash = "sha256-QyIuuiwFg5DP2Ao/LOKYiBXxKHQ0FbFhssIIUnEQz+c=";
};
postPatch = ''
substituteInPlace clap.pc.in \
--replace '$'"{prefix}/@CMAKE_INSTALL_INCLUDEDIR@" '@CMAKE_INSTALL_FULL_INCLUDEDIR@'
'';
nativeBuildInputs = [ cmake ];
passthru.tests.pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
meta = with lib; {
description = "Clever Audio Plugin API interface headers";
homepage = "https://cleveraudio.org/";
pkgConfigModules = [ "clap" ];
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ ris ];
};
})

View File

@@ -0,0 +1,31 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "clapboard";
version = "1.1.1";
src = fetchFromGitHub {
owner = "bjesus";
repo = "clapboard";
rev = "v${version}";
hash = "sha256-vRIwdbt8f9/K7QAfFtBXrr4ezymlnzarq08W7J3aRiU=";
};
cargoHash = "sha256-w3VR6j1ZcMQsk8r9eDqMtRJrGS6+XRM8t/pf5GpTVFA=";
meta = with lib; {
description = "Wayland clipboard manager that will make you clap";
homepage = "https://github.com/bjesus/clapboard";
license = licenses.mit;
maintainers = with maintainers; [
dit7ya
bjesus
];
platforms = platforms.linux;
mainProgram = "clapboard";
};
}

View File

@@ -0,0 +1,71 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
wrapGAppsHook4,
pkg-config,
blueprint-compiler,
meson,
ninja,
rustc,
cargo,
desktop-file-utils,
gtk4,
libadwaita,
glib,
poppler,
gtksourceview5,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clapgrep";
version = "25.07";
src = fetchFromGitHub {
owner = "luleyleo";
repo = "clapgrep";
tag = "v${finalAttrs.version}";
hash = "sha256-XH0ei0x4QeCaVLDpRrHFgI6ExR5CSX7Pzg1PCrTyBec=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) src;
hash = "sha256-tKC3YgLECV3EMMzBLBPj0GntHk2oavXGpTwWG9EjH1U=";
};
nativeBuildInputs = [
meson
ninja
wrapGAppsHook4
pkg-config
blueprint-compiler
rustc
rustPlatform.cargoSetupHook
cargo
desktop-file-utils
];
buildInputs = [
gtk4
libadwaita
glib
poppler
gtksourceview5
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Search through all your files";
homepage = "https://github.com/luleyleo/clapgrep";
license = with lib.licenses; [ gpl3Only ];
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ pluiedev ];
mainProgram = "clapgrep";
};
})

View File

@@ -0,0 +1,72 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
gobject-introspection,
libpeas2,
json-glib,
libsoup_3,
glib,
clapper-unwrapped,
gst_all_1,
python3Packages,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clapper-enhancers";
version = "0.8.3";
src = fetchFromGitHub {
owner = "Rafostar";
repo = "clapper-enhancers";
tag = finalAttrs.version;
hash = "sha256-uj0ZZrS2Y896EDWeBsU3Q3S2kFdEg5FQkBOcI97FFWc=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
gobject-introspection
python3Packages.python
python3Packages.wrapPython
];
buildInputs = [
libpeas2
json-glib
libsoup_3
glib
clapper-unwrapped
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
];
pythonPath = with python3Packages; [
yt-dlp
];
postFixup = ''
buildPythonPath "$out $pythonPath"
for yt_plugin in $out/lib/clapper-enhancers/plugins/yt-dlp/*.py; do
patchPythonScript $yt_plugin
done
'';
mesonFlags = [ "-Denhancersdir=${placeholder "out"}/${finalAttrs.passthru.pluginPath}" ];
passthru.pluginPath = "lib/clapper-enhancers/plugins";
meta = {
description = "Plugins enhancing Clapper library capabilities";
homepage = "https://github.com/Rafostar/clapper-enhancers";
license = lib.licenses.lgpl21Only;
inherit (clapper-unwrapped.meta) maintainers platforms;
};
})

View File

@@ -0,0 +1,90 @@
{
lib,
stdenv,
fetchFromGitHub,
gobject-introspection,
pkg-config,
ninja,
desktop-file-utils,
shared-mime-info,
meson,
gtk4,
gst_all_1,
libGL,
libadwaita,
libsoup_3,
vala,
cmake,
libmicrodns,
glib-networking,
libpeas2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clapper-unwrapped";
version = "0.8.0";
outputs = [
"out"
"lib"
"dev"
];
src = fetchFromGitHub {
owner = "Rafostar";
repo = "clapper";
tag = finalAttrs.version;
hash = "sha256-Yb2fWsdd8jhxkGWKanLn7CAuF4MjyQ27XTrO8ja3hfs=";
};
nativeBuildInputs = [
gobject-introspection
meson
cmake
ninja
pkg-config
desktop-file-utils # for update-desktop-database
gtk4 # for gtk4-update-icon-cache
shared-mime-info # for update-mime-database
vala
];
buildInputs = [
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
glib-networking # for TLS support
gtk4
libGL
libadwaita
libsoup_3
libmicrodns
libpeas2
];
postPatch = ''
patchShebangs --build build-aux/meson/postinstall.py
'';
preFixup = ''
mkdir -p $out/share/gsettings-schemas
# alias clapper-unwrapped schemas to also provide clapper schemas.
# the precise schema patch can vary based on host platform.
schemas=$(basename $lib/share/gsettings-schemas/clapper-unwrapped-*)
cp -r $lib/share/gsettings-schemas/$schemas $out/share/gsettings-schemas/''${schemas/clapper-unwrapped-/clapper-}
'';
meta = {
description = "GNOME media player built using GTK4 toolkit and powered by GStreamer with OpenGL rendering";
longDescription = ''
Clapper is a GNOME media player built using the GTK4 toolkit.
The media player is using GStreamer as a media backend.
'';
homepage = "https://github.com/Rafostar/clapper";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,46 @@
{
stdenvNoCC,
clapper-unwrapped,
wrapGAppsHook4,
gobject-introspection,
xorg,
clapper-enhancers,
}:
stdenvNoCC.mkDerivation {
pname = "clapper";
inherit (clapper-unwrapped) version meta;
src = clapper-unwrapped;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [
wrapGAppsHook4
gobject-introspection
xorg.lndir
];
buildInputs = [ clapper-unwrapped ] ++ clapper-unwrapped.buildInputs;
installPhase = ''
runHook preInstall
mkdir -p $out
lndir $src $out
dbusfile=share/dbus-1/services/com.github.rafostar.Clapper.service
rm $out/$dbusfile
cp $src/$dbusfile $out/$dbusfile
substituteInPlace $out/$dbusfile \
--replace-fail $src/bin/clapper $out/bin/clapper
runHook postInstall
'';
preFixup = ''
gappsWrapperArgs+=(
--set-default CLAPPER_ENHANCERS_PATH "${clapper-enhancers}/${clapper-enhancers.passthru.pluginPath}"
)
'';
}

View File

@@ -0,0 +1,37 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "clarity-city";
version = "1.0.0";
src = fetchFromGitHub {
owner = "vmware";
repo = "clarity-city";
rev = "v${finalAttrs.version}";
hash = "sha256-1POSdd2ICnyNNmGadIujezNK8qvARD0kkLR4yWjs5kA=";
};
installPhase = ''
runHook preInstall
install -Dm644 TrueType/*.ttf -t $out/share/fonts/truetype
install -Dm644 OpenType/*.otf -t $out/share/fonts/opentype
install -Dm644 Webfonts/EOT/*.eot -t $out/share/fonts/eot
install -Dm644 Webfonts/WOFF/*.woff -t $out/share/fonts/woff
install -Dm644 Webfonts/WOFF2/*.woff2 -t $out/share/fonts/woff2
runHook postInstall
'';
meta = with lib; {
description = "Open source sans-serif typeface";
homepage = "https://github.com/vmware/clarity-city";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ sagikazarmark ];
};
})

View File

@@ -0,0 +1,15 @@
{ mihomo }:
mihomo.overrideAttrs (
finalAttrs: previousAttrs: {
pname = "clash-meta";
postInstall = ''
mv $out/bin/${previousAttrs.meta.mainProgram} $out/bin/${finalAttrs.meta.mainProgram}
'';
meta = previousAttrs.meta // {
mainProgram = "clash-meta";
};
}
)

View File

@@ -0,0 +1,36 @@
{
lib,
appimageTools,
fetchurl,
nix-update-script,
}:
appimageTools.wrapType2 rec {
pname = "clash-nyanpasu";
version = "1.6.1";
src = fetchurl {
url = "https://github.com/LibNyanpasu/clash-nyanpasu/releases/download/v${version}/clash-nyanpasu_${version}_amd64.AppImage";
hash = "sha256-buxhsO/X4orChaMYA2JgceeybWRlryPqY1PlF+9KoNI=";
};
extraInstallCommands =
let
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
''
install -Dm444 ${appimageContents}/clash-nyanpasu.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Clash GUI based on tauri";
homepage = "https://github.com/keiko233/clash-nyanpasu";
license = lib.licenses.gpl3Plus;
mainProgram = "clash-nyanpasu";
maintainers = with lib.maintainers; [ Guanran928 ];
platforms = [ "x86_64-linux" ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}

View File

@@ -0,0 +1,50 @@
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1250,7 +1250,7 @@
"sha2",
"shadowquic",
"shadowsocks",
- "smoltcp 0.12.0 (git+https://github.com/smoltcp-rs/smoltcp.git?rev=ac32e64)",
+ "smoltcp 0.12.0",
"socket2 0.6.0",
"tempfile",
"thiserror 2.0.17",
@@ -4096,7 +4096,7 @@
"etherparse 0.16.0",
"futures",
"rand 0.8.5",
- "smoltcp 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "smoltcp 0.12.0",
"spin 0.9.8",
"tokio",
"tokio-util",
@@ -6487,20 +6487,6 @@
]
[[package]]
-name = "smoltcp"
-version = "0.12.0"
-source = "git+https://github.com/smoltcp-rs/smoltcp.git?rev=ac32e64#ac32e643a4b7e09161193071526b3ca5a0deedb5"
-dependencies = [
- "bitflags 1.3.2",
- "byteorder",
- "cfg-if",
- "defmt 0.3.100",
- "heapless",
- "log",
- "managed",
-]
-
-[[package]]
name = "socket2"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -8792,7 +8778,7 @@
"netstack-lwip",
"netstack-smoltcp",
"rand 0.9.2",
- "smoltcp 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "smoltcp 0.12.0",
"socket2 0.6.0",
"tokio",
"tracing",

View File

@@ -0,0 +1,80 @@
{
lib,
fetchFromGitHub,
rustPlatform,
protobuf,
versionCheckHook,
cmake,
pkg-config,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "clash-rs";
version = "0.9.1";
src = fetchFromGitHub {
owner = "Watfaq";
repo = "clash-rs";
tag = "v${finalAttrs.version}";
hash = "sha256-asD7veAYdIF5biCbSXYvAyW/qBra3tvON9TQYCw6nB8=";
};
cargoHash = "sha256-9zCQKxkjiskkBGxfnq2ANpqWobs+UJ5qCsbME2Z7GY4=";
cargoPatches = [ ./Cargo.patch ];
patches = [
./unbounded-shifts.patch
];
postPatch = ''
substituteInPlace clash-lib/Cargo.toml \
--replace-fail ', git = "https://github.com/smoltcp-rs/smoltcp.git", rev = "ac32e64"' ""
'';
nativeBuildInputs = [
cmake
pkg-config
rustPlatform.bindgenHook
];
nativeInstallCheckInputs = [
protobuf
versionCheckHook
];
env = {
# requires features: sync_unsafe_cell, unbounded_shifts, let_chains, ip
RUSTC_BOOTSTRAP = 1;
RUSTFLAGS = "--cfg tokio_unstable";
NIX_CFLAGS_COMPILE = "-Wno-error";
};
buildFeatures = [ "plus" ];
doCheck = false; # test failed
postInstall = ''
# Align with upstream
ln -s "$out/bin/clash-rs" "$out/bin/clash"
'';
doInstallCheck = true;
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"^v([0-9.]+)$"
];
};
meta = {
description = "Custom protocol, rule based network proxy software";
homepage = "https://github.com/Watfaq/clash-rs";
mainProgram = "clash";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ aaronjheng ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,11 @@
--- a/clash-lib/src/lib.rs
+++ b/clash-lib/src/lib.rs
@@ -3,7 +3,7 @@
#![feature(sync_unsafe_cell)]
#![feature(lazy_get)]
#![feature(duration_millis_float)]
-#![cfg_attr(not(version("1.87.0")), feature(unbounded_shifts))]
+#![feature(unbounded_shifts)]
#![cfg_attr(not(version("1.88.0")), feature(let_chains))]
use crate::{

View File

@@ -0,0 +1,49 @@
From 3f86afc3a14474bff39573b1806046c888203096 Mon Sep 17 00:00:00 2001
From: wxt <3264117476@qq.com>
Date: Thu, 19 Jun 2025 15:37:16 +0800
Subject: [PATCH 1/2] core: validate bin_path to prevent RCE in start_clash
Add a security check in CoreManager::start_clash to ensure that the provided
binary path (`bin_path`) must be located under the current executable's
directory. This prevents potential remote code execution (RCE) attacks
caused by arbitrary binary path injection.
---
src/service/core.rs | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/service/core.rs b/src/service/core.rs
index 28e1d42..21efb26 100644
--- a/src/service/core.rs
+++ b/src/service/core.rs
@@ -7,6 +7,7 @@ use once_cell::sync::Lazy;
use std::{
sync::{atomic::Ordering, Arc, Mutex},
fs::File,
+ env,
};
use log::{info, error};
@@ -223,6 +224,20 @@ impl CoreManager {
}
pub fn start_clash(&self, body: StartBody) -> Result<(), String> {
+ {
+ let bin_path = std::path::Path::new(body.bin_path.as_str());
+ let current_exe = std::env::current_exe()
+ .map_err(|e| format!("Failed to get current exe path: {}", e))?;
+ let current_dir = current_exe.parent()
+ .ok_or("Failed to get current directory")?;
+
+ if !bin_path.starts_with(current_dir) {
+ return Err(format!(
+ "Invalid binary path for clash kernel. It must be under: {}",
+ current_dir.display()
+ ));
+ }
+ }
// 设置配置并测试
{
info!("设置Clash运行时配置: {:?}", body);
--
2.49.0

View File

@@ -0,0 +1,33 @@
From f7b094a19a47ba515d734f65754d4e57b87239c1 Mon Sep 17 00:00:00 2001
From: wxt <3264117476@qq.com>
Date: Thu, 19 Jun 2025 15:45:44 +0800
Subject: [PATCH 2/2] core: prevent overwriting existing file by validating its
existence
Add a check to verify whether the specified `log_file` already exists before proceeding.
If the file exists, return an error to prevent accidental or malicious overwriting of files.
This enhances the security of log file handling by mitigating arbitrary file overwrite risks.
---
src/service/core.rs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/service/core.rs b/src/service/core.rs
index 21efb26..004d0f0 100644
--- a/src/service/core.rs
+++ b/src/service/core.rs
@@ -123,6 +123,12 @@ impl CoreManager {
let config_file = config.config_file.as_str();
let log_file = config.log_file.as_str();
let args = vec!["-d", config_dir, "-f", config_file];
+ {
+ let log_file_2 = std::path::Path::new(log_file);
+ if log_file_2.exists() {
+ return Err(anyhow!(format!("Log file already exists: {}", log_file_2.display())));
+ }
+ }
info!("正在启动mihomo: {} -d {} -f {}", bin_path, config_dir, config_file);
--
2.49.0

View File

@@ -0,0 +1,32 @@
From 75296a3059419b91f638ee45215e56781bfda256 Mon Sep 17 00:00:00 2001
From: wxt <3264117476@qq.com>
Date: Sat, 28 Jun 2025 14:30:23 +0800
Subject: [PATCH] IPC: move path to /run/clash-verge-rev/service.sock
---
src/service/ipc.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/service/ipc.rs b/src/service/ipc.rs
index df39787..f441cd2 100644
--- a/src/service/ipc.rs
+++ b/src/service/ipc.rs
@@ -20,7 +20,7 @@ use std::ffi::OsStr;
const IPC_SOCKET_NAME: &str = if cfg!(windows) {
r"\\.\pipe\clash-verge-service"
} else {
- "/tmp/clash-verge-service.sock"
+ "/run/clash-verge-rev/service.sock"
};
/// 消息时间有效期(秒)
@@ -660,4 +660,4 @@ fn handle_unix_connection_sync(mut stream: std::os::unix::net::UnixStream) -> Re
.context("写入响应内容失败")?;
Ok(())
-}
\ No newline at end of file
+}
--
2.49.0

View File

@@ -0,0 +1,100 @@
{
lib,
mihomo,
callPackage,
fetchFromGitHub,
dbip-country-lite,
stdenv,
wrapGAppsHook3,
v2ray-geoip,
v2ray-domain-list-community,
libsoup,
}:
let
pname = "clash-verge-rev";
version = "2.4.2";
src = fetchFromGitHub {
owner = "clash-verge-rev";
repo = "clash-verge-rev";
tag = "v${version}";
hash = "sha256-HBWvk6bX0GjU/yvUejYgTQM8/IP5dYVrf30wNzgWv0s=";
};
src-service = fetchFromGitHub {
owner = "clash-verge-rev";
repo = "clash-verge-service";
rev = "396150683e01e79740563561ae2fe2db28fb8904"; # no meaningful tags in this repo. The only way is updating manully every time.
hash = "sha256-D6U22+tJ6vxn8/BTj/PV+4SF5fvGv6KAWtu5+PNJ1SQ=";
};
service-cargo-hash = "sha256-54nmhQjtPLMPoRML/3rG1jipT1VC5EDgRXnKDYuLVmM=";
pnpm-hash = "sha256-neRjVL29xxbQu/XxsQjdAka71oJww40LeDusjsgsY00=";
vendor-hash = "sha256-XszXDajAdYKEUoyrHZDxxp8ICReMnSdEeKVx7JHiaU4=";
service = callPackage ./service.nix {
inherit
version
src-service
service-cargo-hash
pname
meta
;
};
unwrapped = callPackage ./unwrapped.nix {
inherit
pname
version
src
pnpm-hash
vendor-hash
meta
libsoup
;
};
meta = {
description = "Clash GUI based on tauri";
homepage = "https://github.com/clash-verge-rev/clash-verge-rev";
longDescription = ''
Clash GUI based on tauri
Setting NixOS option `programs.clash-verge.enable = true` is recommended.
'';
license = lib.licenses.gpl3Only;
mainProgram = "clash-verge";
maintainers = with lib.maintainers; [
hhr2020
];
platforms = lib.platforms.linux;
};
in
stdenv.mkDerivation {
inherit
pname
src
version
meta
;
nativeBuildInputs = [
wrapGAppsHook3
];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share,lib/Clash\ Verge/resources}
cp -r ${unwrapped}/share/* $out/share
cp -r ${unwrapped}/bin/clash-verge $out/bin/clash-verge
# This can't be symbol linked. It will find mihomo in its runtime path
cp ${service}/bin/clash-verge-service $out/bin/clash-verge-service
ln -s ${mihomo}/bin/mihomo $out/bin/verge-mihomo
# people who want to use alpha build show override mihomo themselves. The alpha core entry was removed in clash-verge.
ln -s ${v2ray-geoip}/share/v2ray/geoip.dat $out/lib/Clash\ Verge/resources/geoip.dat
ln -s ${v2ray-domain-list-community}/share/v2ray/geosite.dat $out/lib/Clash\ Verge/resources/geosite.dat
ln -s ${dbip-country-lite.mmdb} $out/lib/Clash\ Verge/resources/Country.mmdb
runHook postInstall
'';
}

View File

@@ -0,0 +1,47 @@
{
version,
rustPlatform,
src-service,
pkg-config,
openssl,
pname,
service-cargo-hash,
meta,
}:
rustPlatform.buildRustPackage {
pname = "${pname}-service";
inherit version meta;
src = src-service;
sourceRoot = "${src-service.name}";
patches = [
# I want to keep these patches because it's not harmful.
# Patch: Restrict bin_path in spawn_process to be under the clash-verge-service directory.
# This prevents arbitrary code execution by ensuring only trusted binaries from the Nix store are allowed to run.
./0001-core-validate-bin_path-to-prevent-RCE-in-start_clash.patch
# Patch: Add validation to prevent overwriting existing files.
# This mitigates arbitrary file overwrite risks by ensuring a file does not already exist before writing.
./0002-core-prevent-overwriting-existing-file-by-validating.patch
# Patch: move IPC directory from /tmp to /run/clash-verge-rev/service.lock
# This allows we enable ProtectSystem="strict" and PrivateTmp
./0003-IPC-move-path-to-run-clash-verge-rev-service.sock.patch
];
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
];
env = {
OPENSSL_NO_VENDOR = 1;
};
cargoHash = service-cargo-hash;
}

View File

@@ -0,0 +1,112 @@
{
pname,
version,
src,
meta,
pnpm-hash,
vendor-hash,
rustPlatform,
cargo-tauri,
jq,
moreutils,
nodejs,
pkg-config,
pnpm_9,
glib,
kdePackages,
libayatana-appindicator,
libsForQt5,
libsoup,
openssl,
webkitgtk_4_1,
}:
rustPlatform.buildRustPackage {
inherit version src meta;
pname = "${pname}-unwrapped";
cargoRoot = "src-tauri";
buildAndTestSubdir = "src-tauri";
cargoHash = vendor-hash;
pnpmDeps = pnpm_9.fetchDeps {
inherit pname version src;
fetcherVersion = 1;
hash = pnpm-hash;
};
env = {
OPENSSL_NO_VENDOR = 1;
};
postPatch = ''
# We disable the option to try to use the bleeding-edge version of mihomo
# If you need a newer version, you can override the mihomo input of the wrapped package
sed -i -e '/Mihomo Alpha/d' ./src/components/setting/mods/clash-core-viewer.tsx
# See service.nix for reasons
substituteInPlace src-tauri/src/core/service_ipc.rs \
--replace-fail "/tmp/clash-verge-service.sock" "/run/clash-verge-rev/service.sock"
# Set verge-mihomo.sock path
# In service mode, use /run/clash-verge-rev
# In sidecar mode, use $XDG_RUNTIME_DIR or /run/user/$UID or /tmp
substituteInPlace src-tauri/src/utils/dirs.rs \
--replace-fail '"/var/tmp", "/tmp"' '"/run/clash-verge-rev", &std::env::var("XDG_RUNTIME_DIR").unwrap_or_else(|_| std::env::var("UID").map(|uid| format!("/run/user/{}", uid)).unwrap_or_else(|_| "/tmp".to_string()))' \
--replace-fail 'base_dir.join("verge")' 'base_dir'
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
--replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
substituteInPlace $cargoDepsCopy/sysproxy-*/src/linux.rs \
--replace-fail '"gsettings"' '"${glib.bin}/bin/gsettings"' \
--replace-fail '"kreadconfig5"' '"${libsForQt5.kconfig}/bin/kreadconfig5"' \
--replace-fail '"kreadconfig6"' '"${kdePackages.kconfig}/bin/kreadconfig6"' \
--replace-fail '"kwriteconfig5"' '"${libsForQt5.kconfig}/bin/kwriteconfig5"' \
--replace-fail '"kwriteconfig6"' '"${kdePackages.kconfig}/bin/kwriteconfig6"'
# this file tries to override the linker used when compiling for certain platforms
rm .cargo/config.toml
# disable updater and don't try to bundle helper binaries
jq '
.bundle.createUpdaterArtifacts = false |
del(.bundle.resources) |
del(.bundle.externalBin)
' src-tauri/tauri.conf.json | sponge src-tauri/tauri.conf.json
jq 'del(.bundle.externalBin)' src-tauri/tauri.linux.conf.json | sponge src-tauri/tauri.linux.conf.json
# As a side effect of patching the service to fix the arbitrary file overwrite issue,
# we also need to update the timestamp format in the filename to the second level.
# This ensures that the Clash kernel can still be restarted within one minute without problems.
substituteInPlace src-tauri/src/utils/dirs.rs \
--replace-fail '%Y-%m-%d-%H%M' '%Y-%m-%d-%H%M%S'
'';
nativeBuildInputs = [
cargo-tauri.hook
jq
moreutils
nodejs
pkg-config
pnpm_9.configHook
];
buildInputs = [
libayatana-appindicator
libsoup
openssl
webkitgtk_4_1
];
# make sure the .desktop file name does not contain whitespace,
# so that the service can register it as an auto-start item
postInstall = ''
mv $out/share/applications/Clash\ Verge.desktop $out/share/applications/clash-verge.desktop
'';
}

View File

@@ -0,0 +1,50 @@
{
lib,
fetchFromGitHub,
rustPlatform,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "clashtui";
version = "0.2.3";
src = fetchFromGitHub {
owner = "JohanChane";
repo = "clashtui";
tag = "v${version}";
hash = "sha256-2iQVYZrqo55EO0ZGn6ktP/3Py5v+LiVgrSYTtaxYXyQ=";
};
sourceRoot = "${src.name}/clashtui";
cargoHash = "sha256-8oDnumyn0Ry1AIWNLO2+1HSPsxkVLRLItgEVEXqSRFI=";
cargoBuildFlags = [ "--all-features" ];
checkFlags = [
# need fhs
"--skip=utils::config::test::test_save_and_load"
];
doInstallCheck = true;
versionCheckProgramArg = "--version";
nativeInstallCheckInputs = [
versionCheckHook
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Mihomo (Clash.Meta) TUI Client";
homepage = "https://github.com/JohanChane/clashtui";
changelog = "https://github.com/JohanChane/clashtui/releases/tag/v${version}";
mainProgram = "clashtui";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
pcre,
}:
stdenv.mkDerivation rec {
pname = "classads";
version = "1.0.10";
src = fetchurl {
url = "ftp://ftp.cs.wisc.edu/condor/classad/c++/classads-${version}.tar.gz";
sha256 = "1czgj53gnfkq3ncwlsrwnr4y91wgz35sbicgkp4npfrajqizxqnd";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ pcre ];
configureFlags = [
"--enable-namespace"
"--enable-flexible-member"
];
# error: use of undeclared identifier 'finite'; did you mean 'isfinite'?
env.NIX_CFLAGS_COMPILE = lib.optionalString (
stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64
) "-Dfinite=isfinite";
meta = {
homepage = "http://www.cs.wisc.edu/condor/classad/";
description = "Classified Advertisements library provides a generic means for matching resources";
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,14 @@
diff --git a/Makefile b/Makefile
index a10eb5214..70e2f720e 100644
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,7 @@ endif
ifeq ($(PLAT),linux)
CFLAGS += -DCC_BUILD_ICON
- LIBS = -lX11 -lXi -lpthread -lGL -ldl
+ LIBS = -lX11 -lXi -lpthread -lGL -ldl -lcurl -lopenal
BUILD_DIR = build-linux
endif

View File

@@ -0,0 +1,16 @@
diff --git a/src/Platform_Posix.c b/src/Platform_Posix.c
index bca992d..3540afa 100644
--- a/src/Platform_Posix.c
+++ b/src/Platform_Posix.c
@@ -440,9 +440,8 @@ void Platform_LoadSysFonts(void) {
String_FromConst("/Library/Fonts")
};
#else
- static const cc_string dirs[] = {
- String_FromConst("/usr/share/fonts"),
- String_FromConst("/usr/local/share/fonts")
+ static const cc_string dirs[] = {
+ String_FromConst("%NIXPKGS_FONT_PATH%")
};
#endif
for (i = 0; i < Array_Elems(dirs); i++) {

View File

@@ -0,0 +1,114 @@
{
lib,
stdenv,
fetchFromGitHub,
dos2unix,
makeWrapper,
makeDesktopItem,
copyDesktopItems,
libX11,
libXi,
libGL,
curl,
openal,
liberation_ttf,
}:
stdenv.mkDerivation rec {
pname = "ClassiCube";
version = "1.3.7";
src = fetchFromGitHub {
owner = "UnknownShadow200";
repo = "ClassiCube";
rev = version;
sha256 = "sha256-ZITyfxkQB4Jpm2ZsQyM+ouPLqCVmGB7UZRXDSU/BX0k=";
};
nativeBuildInputs = [
dos2unix
makeWrapper
copyDesktopItems
];
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = pname;
genericName = "Sandbox Block Game";
exec = "ClassiCube";
icon = "CCicon";
comment = "Minecraft Classic inspired sandbox game";
categories = [ "Game" ];
})
];
prePatch = ''
# The ClassiCube sources have DOS-style newlines
# which causes problems with diff/patch.
dos2unix 'src/Platform_Posix.c' 'src/Core.h'
'';
patches = [
# Fix hardcoded font paths
./font-location.patch
# For some reason, the Makefile doesn't link
# with libcurl and openal when ClassiCube requires them.
./fix-linking.patch
];
font_path = "${liberation_ttf}/share/fonts/truetype";
enableParallelBuilding = true;
postPatch = ''
# ClassiCube hardcodes locations of fonts.
# This changes the hardcoded location
# to the path of liberation_ttf instead
substituteInPlace src/Platform_Posix.c \
--replace '%NIXPKGS_FONT_PATH%' "${font_path}"
# ClassiCube's Makefile hardcodes JOBS=1 for some reason,
# even though it works perfectly well multi-threaded.
substituteInPlace Makefile \
--replace 'JOBS=1' "JOBS=$NIX_BUILD_CORES"
'';
buildInputs = [
libX11
libXi
libGL
curl
openal
liberation_ttf
];
installPhase = ''
runHook preInstall
mkdir -p "$out/bin"
cp 'ClassiCube' "$out/bin"
# ClassiCube puts downloaded resources
# next to the location of the executable by default.
# This doesn't work with Nix
# as the location of the executable is read-only.
# We wrap the program to make it put its resources
# in ~/.local/share instead.
wrapProgram "$out/bin/ClassiCube" \
--run 'mkdir -p "$HOME/.local/share/ClassiCube"' \
--run 'cd "$HOME/.local/share/ClassiCube"'
mkdir -p "$out/share/icons/hicolor/256x256/apps"
cp misc/CCicon.png "$out/share/icons/hicolor/256x256/apps"
runHook postInstall
'';
meta = with lib; {
homepage = "https://www.classicube.net/";
description = "Lightweight, custom Minecraft Classic/ClassiCube client with optional additions written from scratch in C";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ _360ied ];
mainProgram = "ClassiCube";
};
}

View File

@@ -0,0 +1,71 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
perl,
perlPackages,
tayga,
iproute2,
nftables,
systemd,
nixosTests,
}:
assert (lib.assertMsg systemd.withNetworkd "systemd for clatd must be built with networkd support");
stdenv.mkDerivation (finalAttrs: {
pname = "clatd";
version = "2.1.0";
src = fetchFromGitHub {
owner = "toreanderson";
repo = "clatd";
rev = "v${finalAttrs.version}";
hash = "sha256-hNFuS6pdaA/FTIUeuwjGovlHcPh248Au1VXCzMuYwLU=";
};
strictDeps = true;
nativeBuildInputs = [
makeWrapper
perl # for pod2man
];
buildInputs = with perlPackages; [
perl
NetIP
NetDNS
JSON
];
makeFlags = [ "PREFIX=$(out)" ];
preBuild = ''
mkdir -p $out/{sbin,share/man/man8}
'';
postFixup = ''
patchShebangs $out/bin/clatd
wrapProgram $out/bin/clatd \
--set PERL5LIB $PERL5LIB \
--prefix PATH : ${
lib.makeBinPath [
tayga # tayga
iproute2 # ip
nftables # nft
systemd # networkctl
]
}
'';
passthru.tests.clatd = nixosTests.clatd;
meta = with lib; {
description = "464XLAT CLAT implementation for Linux";
homepage = "https://github.com/toreanderson/clatd";
license = licenses.mit;
maintainers = with maintainers; [ jmbaur ];
mainProgram = "clatd";
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,236 @@
{
"name": "@anthropic-ai/claude-code",
"version": "2.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@anthropic-ai/claude-code",
"version": "2.0.1",
"license": "SEE LICENSE IN README.md",
"bin": {
"claude": "cli.js"
},
"engines": {
"node": ">=18.0.0"
},
"optionalDependencies": {
"@img/sharp-darwin-arm64": "^0.33.5",
"@img/sharp-darwin-x64": "^0.33.5",
"@img/sharp-linux-arm": "^0.33.5",
"@img/sharp-linux-arm64": "^0.33.5",
"@img/sharp-linux-x64": "^0.33.5",
"@img/sharp-win32-x64": "^0.33.5"
}
},
"node_modules/@img/sharp-darwin-arm64": {
"version": "0.33.5",
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz",
"integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==",
"cpu": [
"arm64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-darwin-arm64": "1.0.4"
}
},
"node_modules/@img/sharp-darwin-x64": {
"version": "0.33.5",
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz",
"integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==",
"cpu": [
"x64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-darwin-x64": "1.0.4"
}
},
"node_modules/@img/sharp-libvips-darwin-arm64": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz",
"integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==",
"cpu": [
"arm64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"darwin"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-darwin-x64": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz",
"integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==",
"cpu": [
"x64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"darwin"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-arm": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz",
"integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==",
"cpu": [
"arm"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-arm64": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz",
"integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==",
"cpu": [
"arm64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-x64": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz",
"integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==",
"cpu": [
"x64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-linux-arm": {
"version": "0.33.5",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz",
"integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==",
"cpu": [
"arm"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-arm": "1.0.5"
}
},
"node_modules/@img/sharp-linux-arm64": {
"version": "0.33.5",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz",
"integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==",
"cpu": [
"arm64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-arm64": "1.0.4"
}
},
"node_modules/@img/sharp-linux-x64": {
"version": "0.33.5",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz",
"integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==",
"cpu": [
"x64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-x64": "1.0.4"
}
},
"node_modules/@img/sharp-win32-x64": {
"version": "0.33.5",
"resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz",
"integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==",
"cpu": [
"x64"
],
"license": "Apache-2.0 AND LGPL-3.0-or-later",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
}
}
}

View File

@@ -0,0 +1,59 @@
{
lib,
buildNpmPackage,
fetchzip,
writableTmpDirAsHomeHook,
versionCheckHook,
}:
buildNpmPackage (finalAttrs: {
pname = "claude-code";
version = "2.0.10";
src = fetchzip {
url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${finalAttrs.version}.tgz";
hash = "sha256-f90cIyUofV3emYtluLL/KtfAsgjG3gFQGQPGYgDWL2M=";
};
npmDepsHash = "sha256-DehkeMZvzn+hvcCDzJfd4p9oYc1GSZm8gu8vKS4Uncw=";
postPatch = ''
cp ${./package-lock.json} package-lock.json
'';
dontNpmBuild = true;
env.AUTHORIZED = "1";
# `claude-code` tries to auto-update by default, this disables that functionality.
# https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#environment-variables
# The DEV=true env var causes claude to crash with `TypeError: window.WebSocket is not a constructor`
postInstall = ''
wrapProgram $out/bin/claude \
--set DISABLE_AUTOUPDATER 1 \
--unset DEV
'';
doInstallCheck = true;
nativeInstallCheckInputs = [
writableTmpDirAsHomeHook
versionCheckHook
];
versionCheckKeepEnvironment = [ "HOME" ];
versionCheckProgramArg = "--version";
passthru.updateScript = ./update.sh;
meta = {
description = "Agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster";
homepage = "https://github.com/anthropics/claude-code";
downloadPage = "https://www.npmjs.com/package/@anthropic-ai/claude-code";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [
malo
markus1189
omarjatoi
xiaoxiangmoe
];
mainProgram = "claude";
};
})

View File

@@ -0,0 +1,10 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash --packages nodejs nix-update git
set -euo pipefail
version=$(npm view @anthropic-ai/claude-code version)
# Update version and hashes
AUTHORIZED=1 NIXPKGS_ALLOW_UNFREE=1 nix-update claude-code --version="$version" --generate-lockfile
nix-update vscode-extensions.anthropic.claude-code --use-update-script --version "$version"

View File

@@ -0,0 +1,47 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
pname = "claude-monitor";
version = "3.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Maciek-roboblog";
repo = "Claude-Code-Usage-Monitor";
tag = "v${version}";
hash = "sha256-v5ooniaN1iVerBW77/00SpghIVE1j8cl2WENcPnS66M=";
};
build-system = with python3Packages; [ setuptools ];
dependencies = with python3Packages; [
numpy
pydantic
pydantic-settings
pyyaml
pytz
rich
];
# Tests require Claude API access and local data files
doCheck = false;
meta = {
description = "Real-time Claude Code usage monitor";
longDescription = ''
Real-time terminal monitoring tool for Claude AI token usage
with advanced analytics, machine learning-based predictions,
and Rich UI. Track your token consumption, burn rate, cost analysis,
and get intelligent predictions about session limits.
'';
homepage = "https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor";
changelog = "https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ iamanaws ];
mainProgram = "claude-monitor";
};
}

View File

@@ -0,0 +1,28 @@
diff --git a/src/procmime.c b/src/procmime.c
index bd3239e..06a3b26 100644
--- a/src/procmime.c
+++ b/src/procmime.c
@@ -1144,20 +1144,16 @@ GList *procmime_get_mime_type_list(void)
MimeType *mime_type;
gboolean fp_is_glob_file = TRUE;
if (mime_type_list)
return mime_type_list;
-
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
- if ((fp = claws_fopen(DATAROOTDIR "/mime/globs", "rb")) == NULL)
-#else
- if ((fp = claws_fopen("/usr/share/mime/globs", "rb")) == NULL)
-#endif
+
+ if ((fp = claws_fopen("@MIMEROOTDIR@/mime/globs", "rb")) == NULL)
{
fp_is_glob_file = FALSE;
if ((fp = claws_fopen("/etc/mime.types", "rb")) == NULL) {
if ((fp = claws_fopen(SYSCONFDIR "/mime.types", "rb"))
== NULL) {
FILE_OP_ERROR(SYSCONFDIR "/mime.types",
"claws_fopen");
return NULL;
}

View File

@@ -0,0 +1,360 @@
{
stdenv,
lib,
fetchurl,
wrapGAppsHook3,
autoreconfHook,
bison,
flex,
curl,
gtk3,
pkg-config,
python3,
shared-mime-info,
glib-networking,
gsettings-desktop-schemas,
# Package compatibility: old parameters whose name were not directly derived
enablePgp ? true,
enablePluginNotificationDialogs ? true,
enablePluginNotificationSounds ? true,
enablePluginPdf ? true,
enablePluginRavatar ? true,
enableSpellcheck ? true,
# Arguments to include external libraries
enableLibSM ? true,
xorg,
enableGnuTLS ? true,
gnutls,
enableEnchant ? enableSpellcheck,
enchant,
enableDbus ? true,
dbus,
dbus-glib,
enableLdap ? true,
openldap,
enableNetworkManager ? true,
networkmanager,
enableLibetpan ? true,
libetpan,
enableValgrind ? !stdenv.hostPlatform.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind,
valgrind,
enableSvg ? true,
librsvg,
# Configure claws-mail's plugins
enablePluginAcpiNotifier ? true,
enablePluginAddressKeeper ? true,
enablePluginArchive ? true,
libarchive,
enablePluginAttRemover ? true,
enablePluginAttachWarner ? true,
enablePluginBogofilter ? true,
enablePluginBsfilter ? true,
enablePluginClamd ? true,
enablePluginDillo ? true,
enablePluginFancy ? true,
webkitgtk_4_1,
enablePluginFetchInfo ? true,
enablePluginKeywordWarner ? true,
enablePluginLibravatar ? enablePluginRavatar,
enablePluginLitehtmlViewer ? true,
gumbo,
enablePluginMailmbox ? true,
enablePluginManageSieve ? true,
enablePluginNewMail ? true,
enablePluginNotification ? (enablePluginNotificationDialogs || enablePluginNotificationSounds),
libcanberra-gtk3,
libnotify,
enablePluginPdfViewer ? enablePluginPdf,
poppler,
enablePluginPerl ? true,
perl,
enablePluginPython ? true,
enablePluginPgp ? enablePgp,
gnupg,
gpgme,
enablePluginRssyl ? true,
libxml2,
enablePluginSmime ? true,
enablePluginSpamassassin ? true,
enablePluginSpamReport ? true,
enablePluginTnefParse ? true,
libytnef,
enablePluginVcalendar ? true,
libical,
}:
let
pythonPkgs = with python3.pkgs; [
python3
wrapPython
pygobject3
];
features = [
{
flags = [ "acpi_notifier-plugin" ];
enabled = enablePluginAcpiNotifier;
}
{
flags = [ "address_keeper-plugin" ];
enabled = enablePluginAddressKeeper;
}
{
flags = [ "archive-plugin" ];
enabled = enablePluginArchive;
deps = [ libarchive ];
}
{
flags = [ "att_remover-plugin" ];
enabled = enablePluginAttRemover;
}
{
flags = [ "attachwarner-plugin" ];
enabled = enablePluginAttachWarner;
}
{
flags = [ "bogofilter-plugin" ];
enabled = enablePluginBogofilter;
}
{
flags = [ "bsfilter-plugin" ];
enabled = enablePluginBsfilter;
}
{
flags = [ "clamd-plugin" ];
enabled = enablePluginClamd;
}
{
flags = [ "dbus" ];
enabled = enableDbus;
deps = [
dbus
dbus-glib
];
}
{
flags = [ "dillo-plugin" ];
enabled = enablePluginDillo;
}
{
flags = [ "enchant" ];
enabled = enableEnchant;
deps = [ enchant ];
}
{
flags = [ "fancy-plugin" ];
enabled = enablePluginFancy;
deps = [ webkitgtk_4_1 ];
}
{
flags = [ "fetchinfo-plugin" ];
enabled = enablePluginFetchInfo;
}
{
flags = [ "keyword_warner-plugin" ];
enabled = enablePluginKeywordWarner;
}
{
flags = [ "gnutls" ];
enabled = enableGnuTLS;
deps = [ gnutls ];
}
{
flags = [ "ldap" ];
enabled = enableLdap;
deps = [ openldap ];
}
{
flags = [ "libetpan" ];
enabled = enableLibetpan;
deps = [ libetpan ];
}
{
flags = [ "libravatar-plugin" ];
enabled = enablePluginLibravatar;
}
{
flags = [ "libsm" ];
enabled = enableLibSM;
deps = [ xorg.libSM ];
}
{
flags = [ "litehtml_viewer-plugin" ];
enabled = enablePluginLitehtmlViewer;
deps = [ gumbo ];
}
{
flags = [ "mailmbox-plugin" ];
enabled = enablePluginMailmbox;
}
{
flags = [ "managesieve-plugin" ];
enabled = enablePluginManageSieve;
}
{
flags = [ "networkmanager" ];
enabled = enableNetworkManager;
deps = [ networkmanager ];
}
{
flags = [ "newmail-plugin" ];
enabled = enablePluginNewMail;
}
{
flags = [ "notification-plugin" ];
enabled = enablePluginNotification;
deps = [ libnotify ] ++ [ libcanberra-gtk3 ];
}
{
flags = [ "pdf_viewer-plugin" ];
enabled = enablePluginPdfViewer;
deps = [ poppler ];
}
{
flags = [ "perl-plugin" ];
enabled = enablePluginPerl;
deps = [ perl ];
}
{
flags = [
"pgpcore-plugin"
"pgpinline-plugin"
"pgpmime-plugin"
];
enabled = enablePluginPgp;
deps = [
gnupg
gpgme
];
}
{
flags = [ "python-plugin" ];
enabled = enablePluginPython;
}
{
flags = [ "rssyl-plugin" ];
enabled = enablePluginRssyl;
deps = [ libxml2 ];
}
{
flags = [ "smime-plugin" ];
enabled = enablePluginSmime;
}
{
flags = [ "spam_report-plugin" ];
enabled = enablePluginSpamReport;
}
{
flags = [ "spamassassin-plugin" ];
enabled = enablePluginSpamassassin;
}
{
flags = [ "svg" ];
enabled = enableSvg;
deps = [ librsvg ];
}
{
flags = [ "tnef_parse-plugin" ];
enabled = enablePluginTnefParse;
deps = [ libytnef ];
}
{
flags = [ "valgrind" ];
enabled = enableValgrind;
deps = [ valgrind ];
}
{
flags = [ "vcalendar-plugin" ];
enabled = enablePluginVcalendar;
deps = [ libical ];
}
];
in
stdenv.mkDerivation rec {
pname = "claws-mail";
version = "4.3.1";
src = fetchurl {
url = "https://claws-mail.org/download.php?file=releases/claws-mail-${version}.tar.xz";
hash = "sha256-2K3yEMdnq1glLfxas8aeYD1//bcoGh4zQNLYYGL0aKY=";
};
outputs = [
"out"
"dev"
];
patches = [
./mime.patch
];
preConfigure = ''
# autotools check tries to dlopen libpython as a requirement for the python plugin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${python3}/lib
# generate version without .git
[ -e version ] || echo "echo ${version}" > version
'';
postPatch = ''
substituteInPlace configure.ac \
--replace 'm4_esyscmd([./get-git-version])' '${version}'
substituteInPlace src/procmime.c \
--subst-var-by MIMEROOTDIR ${shared-mime-info}/share
'';
nativeBuildInputs = [
autoreconfHook
pkg-config
bison
flex
wrapGAppsHook3
];
propagatedBuildInputs = pythonPkgs;
buildInputs = [
curl
gsettings-desktop-schemas
glib-networking
gtk3
]
++ lib.concatMap (f: lib.optionals f.enabled f.deps) (lib.filter (f: f ? deps) features);
configureFlags = [
"--disable-manual" # Missing docbook-tools, e.g., docbook2html
"--disable-compface" # Missing compface library
"--disable-jpilot" # Missing jpilot library
]
++ (map (
feature: map (flag: lib.strings.enableFeature feature.enabled flag) feature.flags
) features);
enableParallelBuilding = true;
preFixup = ''
buildPythonPath "$out $pythonPkgs"
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share" --prefix PYTHONPATH : "$program_PYTHONPATH")
'';
postInstall = ''
mkdir -p $out/share/applications
cp claws-mail.desktop $out/share/applications
'';
meta = with lib; {
description = "User-friendly, lightweight, and fast email client";
mainProgram = "claws-mail";
homepage = "https://www.claws-mail.org/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [
fpletz
globin
orivej
oxzi
ajs124
];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "claws";
version = "0.4.1";
src = fetchFromGitHub {
rev = version;
owner = "thehowl";
repo = "claws";
hash = "sha256-3zzUBeYfu9x3vRGX1DionLnAs1e44tFj8Z1dpVwjdCg=";
};
vendorHash = "sha256-FP+3Rw5IdCahhx9giQrpepMMtF1pWcyjNglrlu9ju0Q=";
ldflags = [
"-s"
"-w"
];
meta = with lib; {
homepage = "https://github.com/thehowl/claws";
description = "Interactive command line client for testing websocket servers";
license = licenses.mit;
maintainers = [ ];
mainProgram = "claws";
};
}

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
gfortran,
blas,
boost,
python3,
ocl-icd,
opencl-headers,
}:
stdenv.mkDerivation rec {
pname = "clblas";
version = "2.12";
src = fetchFromGitHub {
owner = "clMathLibraries";
repo = "clBLAS";
rev = "v${version}";
sha256 = "154mz52r5hm0jrp5fqrirzzbki14c1jkacj75flplnykbl36ibjs";
};
patches = [
./platform.patch
(fetchpatch {
url = "https://github.com/clMathLibraries/clBLAS/commit/68ce5f0b824d7cf9d71b09bb235cf219defcc7b4.patch";
hash = "sha256-XoVcHgJ0kTPysZbM83mUX4/lvXVHKbl7s2Q8WWiUnMs=";
})
];
postPatch = ''
sed -i -re 's/(set\(\s*Boost_USE_STATIC_LIBS\s+).*/\1OFF\ \)/g' src/CMakeLists.txt
'';
preConfigure = ''
cd src
'';
cmakeFlags = [
"-DBUILD_TEST=OFF"
];
nativeBuildInputs = [
cmake
gfortran
python3
];
buildInputs = [
blas
boost
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
ocl-icd
opencl-headers
];
strictDeps = true;
meta = with lib; {
homepage = "https://github.com/clMathLibraries/clBLAS";
description = "Software library containing BLAS functions written in OpenCL";
longDescription = ''
This package contains a library of BLAS functions on top of OpenCL.
'';
license = licenses.asl20;
maintainers = [ ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,34 @@
diff --git a/src/library/tools/ktest/config.cpp b/src/library/tools/ktest/config.cpp
index 8b20128..faf9bde 100644
--- a/src/library/tools/ktest/config.cpp
+++ b/src/library/tools/ktest/config.cpp
@@ -24,8 +24,6 @@
using namespace clMath;
-static const char DEFAULT_PLATFORM_NAME[] = "AMD Accelerated Parallel Processing";
-
Config::Config() :
defaultConfig_(""),
cpp_("ktest.cpp"),
@@ -35,7 +33,10 @@ Config::Config() :
hasFuncID_(false), hasSubdims_(false),
skipAccuracy_(false)
{
- setPlatform(DEFAULT_PLATFORM_NAME);
+ platform_ = NULL;
+ setPlatform("");
+
+ device_ = NULL;
setDevice("");
memset(&kargs_, 0, sizeof(kargs_));
@@ -262,7 +263,7 @@ Config::setPlatform(const std::string& name)
continue;
}
if (name.empty()) {
- found = (strcmp(pname, DEFAULT_PLATFORM_NAME) == 0);
+ found = true;
}
else {
found = (strcmp(pname, name.c_str()) == 0);

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchpatch,
fetchFromGitHub,
cmake,
ninja,
opencl-headers,
ocl-icd,
}:
stdenv.mkDerivation rec {
pname = "clblast";
version = "1.6.3";
src = fetchFromGitHub {
owner = "CNugteren";
repo = "CLBlast";
rev = version;
hash = "sha256-fzenYFCAQ0B2NQgh5OaErv/yNEzjznB6ogRapqfL6P4=";
};
patches = [
(fetchpatch {
name = "clblast-fix-cmake4.patch";
url = "https://github.com/CNugteren/CLBlast/commit/dd714f1b72aa8c341e5a27aa9e968b4ecdaf1abb.patch";
includes = [ "CMakeLists.txt" ];
hash = "sha256-AVFzEdj1CaVSJxOcn5PoqFb+b8k5YgSMD3VhvHeBd7o=";
})
];
nativeBuildInputs = [
cmake
ninja
];
buildInputs = [
opencl-headers
ocl-icd
];
cmakeFlags = [
# https://github.com/NixOS/nixpkgs/issues/144170
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib"
];
meta = with lib; {
description = "Tuned OpenCL BLAS library";
homepage = "https://github.com/CNugteren/CLBlast";
license = licenses.asl20;
maintainers = with maintainers; [ Tungsten842 ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchzip,
autoconf-archive,
autoreconfHook,
pkg-config,
curlWithGnuTls,
libev,
libunwind,
sqlite,
}:
stdenv.mkDerivation rec {
pname = "clboss";
version = "0.15.1";
# The release tarball includes the pre-generated file `commit_hash.h` that is required for building
src = fetchzip {
url = "https://github.com/ZmnSCPxj/clboss/releases/download/v${version}/clboss-v${version}.tar.gz";
hash = "sha256-9wrgJzXVBKGSNB2UbP+CnUmaRwdXgRAnHBZbvm/Am7Q=";
};
nativeBuildInputs = [
autoconf-archive
autoreconfHook
pkg-config
libev
libunwind
curlWithGnuTls
sqlite
];
enableParallelBuilding = true;
meta = with lib; {
description = "Automated C-Lightning Node Manager";
homepage = "https://github.com/ZmnSCPxj/clboss";
license = licenses.mit;
maintainers = with maintainers; [ prusnak ];
platforms = platforms.linux ++ platforms.darwin;
mainProgram = "clboss";
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
fetchpatch,
fetchDebianPatch,
}:
stdenv.mkDerivation {
pname = "cld2";
version = "0-unstable-2015-08-21";
src = fetchFromGitHub {
owner = "CLD2Owners";
repo = "cld2";
rev = "b56fa78a2fe44ac2851bae5bf4f4693a0644da7b";
hash = "sha256-YhXs45IbriKWKULguZM4DgfV/Fzr73VHxA1pFTXCyv8=";
};
patches = [
(fetchDebianPatch {
pname = "cld2";
version = "0.0.0-git20150806";
debianRevision = "10";
patch = "add-cmake-file.patch";
hash = "sha256-iLacWD4jQxid76pzGpDW3ZJ8Dyaksfj1pNTrU7qSBQM=";
})
(fetchpatch {
name = "fix-narrowing-errors.txt";
url = "https://github.com/ripjar/cld2/pull/1/commits/79be1adea78f0d376cb793f4dae8e70b100dadcc.patch";
hash = "sha256-i4WWYBx16kYXZ5IQPACWbS/HGsQysXre1SngYlAfNaM=";
})
];
nativeBuildInputs = [ cmake ];
meta = with lib; {
homepage = "https://github.com/CLD2Owners/cld2";
description = "Compact Language Detector 2";
longDescription = ''
CLD2 probabilistically detects over 80 languages in Unicode UTF-8 text,
either plain text or HTML/XML. Legacy encodings must be converted to valid
UTF-8 by the caller. For mixed-language input, CLD2 returns the top three
languages found and their approximate percentages of the total text bytes
(e.g. 80% English and 20% French out of 1000 bytes of text means about 800
bytes of English and 200 bytes of French). Optionally, it also returns a
vector of text spans with the language of each identified. This may be
useful for applying different spelling-correction dictionaries or
different machine translation requests to each span. The design target is
web pages of at least 200 characters (about two sentences); CLD2 is not
designed to do well on very short text, lists of proper names, part
numbers, etc.
'';
license = licenses.asl20;
maintainers = with maintainers; [ chvp ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "cldr-annotations";
version = "46.1";
src = fetchzip {
url = "https://unicode.org/Public/cldr/${version}/cldr-common-${version}.zip";
stripRoot = false;
hash = "sha256-HNQVVbUIjsGOnkzUlH2m8I0IDgEfy2omCTekZlSyXQI=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/unicode/cldr/common
mv common/annotations{,Derived} -t $out/share/unicode/cldr/common
runHook postInstall
'';
meta = with lib; {
description = "Names and keywords for Unicode characters from the Common Locale Data Repository";
homepage = "https://cldr.unicode.org";
license = licenses.unicode-30;
platforms = platforms.all;
maintainers = with maintainers; [ DeeUnderscore ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage (finalAttrs: {
pname = "clean-css-cli";
version = "5.6.3";
src = fetchFromGitHub {
owner = "clean-css";
repo = "clean-css-cli";
tag = "v${finalAttrs.version}";
hash = "sha256-tsFNcQg55uY2gL5xLLLS6INLlYzbsU6M3hnsYeOFGEw=";
};
npmDepsHash = "sha256-uvI9esVVOE18syHUCJpoiDY+Vh3hJO+GsMOTZSYJaxg=";
dontNpmBuild = true;
dontCheckForBrokenSymlinks = true;
meta = {
description = "Command-line interface to the clean-css CSS optimization library";
homepage = "https://github.com/clean-css/clean-css-cli";
changelog = "https://github.com/clean-css/clean-css-cli/blob/v${finalAttrs.version}/History.md";
license = lib.licenses.mit;
mainProgram = "cleancss";
maintainers = with lib.maintainers; [ momeemt ];
};
})

View File

@@ -0,0 +1,21 @@
The clean command line compiler clm uses timestamps of dcl, icl, abc and o files
to decide what must be rebuild. However as for chroot builds, all of the
library files will have equal timestamps, this leads to clm trying to rebuild
the library modules distributed with the Clean installation every time a user
compiles any file, which fails ue to the absence of write permission on the Nix
store.
This patch changes the freshness check to use less than instead of less than or
equal to in order to avoid this.
--- b/src/clm/clm.c
+++ a/src/clm/clm.c
@@ -250,7 +250,7 @@
|| (t1.dwHighDateTime==t2.dwHighDateTime && (unsigned)(t1.dwLowDateTime)<=(unsigned)(t2.dwLowDateTime)))
#else
typedef unsigned long FileTime;
-# define FILE_TIME_LE(t1,t2) (t1<=t2)
+# define FILE_TIME_LE(t1,t2) (t1<t2)
#endif
typedef struct project_node {

View File

@@ -0,0 +1,22 @@
--- a/src/RuntimeSystem/scon.c
+++ b/src/RuntimeSystem/scon.c
@@ -858,6 +858,8 @@
int execution_aborted;
int return_code;
+extern void abc_main (void);
+
int main (int argc,char **argv)
{
int arg_n;
--- a/src/clm/cachingcompiler.h
+++ b/src/clm/cachingcompiler.h
@@ -1,6 +1,7 @@
Clean (:: *Thread :== Int)
int start_caching_compiler (CleanCharArray compiler_path);
Clean (start_caching_compiler :: {#Char} Thread -> (Int, Thread))
+int start_caching_compiler_with_args (CleanCharArray coc_path, char** cocl_argv, int cocl_argv_size);
int call_caching_compiler (CleanCharArray args);
Clean (call_caching_compiler :: {#Char} Thread -> (Int, Thread))
int stop_caching_compiler (void);

View File

@@ -0,0 +1,80 @@
{
binutils,
fetchurl,
gcc,
lib,
runCommand,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clean";
version = "3.1";
src =
if stdenv.hostPlatform.system == "i686-linux" then
(fetchurl {
url = "https://ftp.cs.ru.nl/Clean/Clean31/linux/clean3.1_32_boot.tar.gz";
sha256 = "Ls0IKf+o7yhRLhtSV61jzmnYukfh5x5fogHaP5ke/Ck=";
})
else if stdenv.hostPlatform.system == "x86_64-linux" then
(fetchurl {
url = "https://ftp.cs.ru.nl/Clean/Clean31/linux/clean3.1_64_boot.tar.gz";
sha256 = "Gg5CVZjrwDBtV7Vuw21Xj6Rn+qN1Mf6B3ls6r/16oBc=";
})
else
throw "Architecture not supported";
hardeningDisable = [ "pic" ];
patches = [
./chroot-build-support-do-not-rebuild-equal-timestamps.patch
./declare-functions-explicitly-for-gcc14.patch
];
postPatch = ''
substituteInPlace Makefile \
--replace-fail 'INSTALL_DIR = $(CURRENTDIR)' "INSTALL_DIR = $out"
substituteInPlace src/clm/clm.c \
--replace-fail /usr/bin/as ${binutils}/bin/as \
--replace-fail /usr/bin/gcc ${gcc}/bin/gcc
'';
buildFlags = [ "-C src/" ];
# do not strip libraries and executables since all symbols since they are
# required as is for compilation. Especially the labels of unused section need
# to be kept.
dontStrip = true;
passthru.tests.compile-hello-world = runCommand "compile-hello-world" { } ''
cat >HelloWorld.icl <<EOF
module HelloWorld
Start = "Hello, world!"
EOF
${finalAttrs.finalPackage}/bin/clm HelloWorld -o hello-world
touch $out
'';
meta = {
description = "General purpose, state-of-the-art, pure and lazy functional programming language";
longDescription = ''
Clean is a general purpose, state-of-the-art, pure and lazy functional
programming language designed for making real-world applications. Some
of its most notable language features are uniqueness typing, dynamic typing,
and generic functions.
'';
homepage = "http://wiki.clean.cs.ru.nl/Clean";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [
bmrips
erin
];
platforms = [
"i686-linux"
"x86_64-linux"
];
mainProgram = "clean";
};
})

View File

@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchzip,
}:
stdenv.mkDerivation rec {
version = "7.1";
pname = "clearlooks-phenix";
src = fetchzip {
url = "https://github.com/jpfleury/clearlooks-phenix/archive/${version}.tar.gz";
sha256 = "sha256-UJgKPoNcpBkIxITAIn3INsANJn/hD8l9NCr/entbZx8=";
};
dontBuild = true;
installPhase = ''
mkdir -p $out/share/themes/Clearlooks-Phenix
cp -r . $out/share/themes/Clearlooks-Phenix/
'';
preferLocalBuild = true;
meta = with lib; {
description = "GTK3 port of the Clearlooks theme";
longDescription = ''
The Clearlooks-Phénix project aims at creating a GTK3 port of Clearlooks,
the default theme for Gnome 2. Style is also included for GTK2, Unity and
for Metacity, Openbox and Xfwm4 window managers.
'';
homepage = "https://github.com/jpfleury/clearlooks-phenix";
downloadPage = "https://github.com/jpfleury/clearlooks-phenix/releases";
license = licenses.gpl3;
maintainers = [ maintainers.prikhi ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchurl,
xorg,
libfaketime,
}:
stdenv.mkDerivation rec {
pname = "clearlyU";
version = "12-1.9";
src = fetchurl {
url = "https://www.math.nmsu.edu/~mleisher/Software/cu/cu${version}.tgz";
sha256 = "1xn14jbv3m1khy7ydvad9ydkn7yygdbhjy9wm1v000jzjwr3lv21";
};
nativeBuildInputs = [
xorg.fonttosfnt
xorg.mkfontscale
libfaketime
];
buildPhase = ''
# convert bdf fonts to otb
for i in *.bdf; do
name=$(basename "$i" .bdf)
faketime -f "1970-01-01 00:00:01" fonttosfnt -g 2 -m 2 -v -o "$name.otb" "$i"
done
'';
installPhase = ''
# install otb and bdf fonts
fontDir="$out/share/fonts"
install -m 644 -D *.bdf *.otb -t "$fontDir"
mkfontdir "$fontDir"
'';
meta = with lib; {
description = "Unicode font";
license = licenses.mit;
maintainers = [ maintainers.raskin ];
};
}

View File

@@ -0,0 +1,28 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule {
pname = "clematis";
version = "2022-04-16";
src = fetchFromGitHub {
owner = "TorchedSammy";
repo = "clematis";
rev = "cbe74da084b9d3f6893f53721c27cd0f3a45fe93";
sha256 = "sha256-TjoXHbY0vUQ2rhwdCJ/s/taRd9/MG0P9HaEw2BOIy/s=";
};
vendorHash = "sha256-YKu+7LFUoQwCH//URIswiaqa0rmnWZJvuSn/68G3TUA=";
meta = with lib; {
description = "Discord rich presence for MPRIS music players";
homepage = "https://github.com/TorchedSammy/Clematis";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ misterio77 ];
mainProgram = "clematis";
};
}

View File

@@ -0,0 +1,100 @@
{
lib,
fetchFromGitHub,
fzf,
installShellFiles,
libnotify,
makeWrapper,
mpc,
perlPackages,
rofi,
stdenv,
tmux,
unstableGitUpdater,
util-linux,
}:
stdenv.mkDerivation {
pname = "clerk";
version = "0-unstable-2024-02-20";
src = fetchFromGitHub {
owner = "carnager";
repo = "clerk";
rev = "a3c4a0b88597e8194a5b29a20bc9eab1a12f4de9";
hash = "sha256-UlACMlH4iYj1l/GIpBf6Pb7MuRHWlgxLPgAqzc+Zol8=";
};
nativeBuildInputs = [
installShellFiles
makeWrapper
];
buildInputs = with perlPackages; [
perl
DataMessagePack
DataSectionSimple
ConfigSimple
TryTiny
IPCRun
HTTPDate
FileSlurper
ArrayUtils
NetMPD
];
dontBuild = true;
strictDeps = true;
postPatch = ''
substituteInPlace clerk_rating_client.service \
--replace "/usr" "$out"
'';
installPhase = ''
runHook preInstall
mv clerk.pl clerk
installBin clerk clerk_rating_client
install -D clerk_rating_client.service $out/lib/systemd/user/clerk_rating_client.service
runHook postInstall
'';
postFixup =
let
binPath = lib.makeBinPath [
fzf
libnotify
mpc
rofi
tmux
util-linux
];
in
''
for f in clerk clerk_rating_client; do
wrapProgram $out/bin/$f \
--prefix PATH : "${binPath}" \
--set PERL5LIB $PERL5LIB
done
'';
passthru.updateScript = unstableGitUpdater {
url = "https://github.com/carnager/clerk.git";
hardcodeZeroVersion = true;
};
meta = {
homepage = "https://github.com/carnager/clerk";
description = "MPD client based on rofi/fzf";
license = lib.licenses.mit;
mainProgram = "clerk";
maintainers = with lib.maintainers; [
anderspapitto
wineee
];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,63 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
nodejs_22,
installShellFiles,
makeWrapper,
stdenv,
}:
buildNpmPackage rec {
pname = "clever-tools";
version = "4.1.0";
nodejs = nodejs_22;
src = fetchFromGitHub {
owner = "CleverCloud";
repo = "clever-tools";
rev = version;
hash = "sha256-ntKxMlRBE0WoaO2Fmpymhm7y7kCwe197sotNzpK92C4=";
};
npmDepsHash = "sha256-GsJlrz41q9GvFpYZcauuGXgMCG6mqSuI5gy+hxlJfUQ=";
nativeBuildInputs = [
installShellFiles
makeWrapper
];
buildPhase = ''
runHook preBuild
node scripts/bundle-cjs.js ${version} false
runHook postBuild
'';
installPhase = ''
mkdir -p $out/bin $out/lib/clever-tools
cp build/${version}/clever.cjs $out/lib/clever-tools/clever.cjs
makeWrapper ${nodejs}/bin/node $out/bin/clever \
--add-flags "$out/lib/clever-tools/clever.cjs" \
--set NO_UPDATE_NOTIFIER true
runHook postInstall
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd clever \
--bash <($out/bin/clever --bash-autocomplete-script $out/bin/clever) \
--zsh <($out/bin/clever --zsh-autocomplete-script $out/bin/clever)
'';
meta = {
homepage = "https://github.com/CleverCloud/clever-tools";
changelog = "https://github.com/CleverCloud/clever-tools/blob/${version}/CHANGELOG.md";
description = "Deploy on Clever Cloud and control your applications, add-ons, services from command line";
license = lib.licenses.asl20;
mainProgram = "clever";
teams = [ lib.teams.clevercloud ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/src/pins/tang/clevis-decrypt-tang b/src/pins/tang/clevis-decrypt-tang
index 72393b4..40b660f 100755
--- a/src/pins/tang/clevis-decrypt-tang
+++ b/src/pins/tang/clevis-decrypt-tang
@@ -101,7 +101,7 @@ xfr="$(jose jwk exc -i '{"alg":"ECMR"}' -l- -r- <<< "$clt$eph")"
rec_url="$url/rec/$kid"
ct="Content-Type: application/jwk+json"
-if ! rep="$(curl -sfg -X POST -H "$ct" --data-binary @- "$rec_url" <<< "$xfr")"; then
+if ! rep="$(curl --connect-timeout 10 -sfg -X POST -H "$ct" --data-binary @- "$rec_url" <<< "$xfr")"; then
echo "Error communicating with server $url" >&2
exit 1
fi

View File

@@ -0,0 +1,130 @@
{
lib,
asciidoc-full,
coreutils,
cryptsetup,
curl,
fetchFromGitHub,
gnugrep,
gnused,
jansson,
jose,
libpwquality,
luksmeta,
makeWrapper,
meson,
ninja,
nixosTests,
pkg-config,
stdenv,
tpm2-tools,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clevis";
version = "21";
src = fetchFromGitHub {
owner = "latchset";
repo = "clevis";
tag = "v${finalAttrs.version}";
hash = "sha256-2vDQP+yvH4v46fLEWG/37r5cYP3OeDfJz71cDHEGiUg=";
};
patches = [
# Replaces the clevis-decrypt 300s timeout to a 10s timeout
# https://github.com/latchset/clevis/issues/289
./0000-tang-timeout.patch
];
nativeBuildInputs = [
asciidoc-full
makeWrapper
meson
ninja
pkg-config
];
buildInputs = [
cryptsetup
curl
jansson
jose
libpwquality
luksmeta
tpm2-tools
];
outputs = [
"out"
"man"
];
# TODO: investigate how to prepare the dependencies so that they can be found
# while setting strictDeps as true. This will require studying the dark
# corners of cross-compilation in Nixpkgs...
strictDeps = false;
# Since 2018-07-11, upstream relies on a hardcoded /bin/cat. See:
# https://github.com/latchset/clevis/issues/61
# https://github.com/latchset/clevis/pull/64
#
# So, we filter all src files that have the string "/bin/cat" and patch that
# string to an absolute path for our coreutils location.
# The xargs command is a little bit convoluted because a simpler version would
# be vulnerable to code injection. This hint is a courtesy of Stack Exchange:
# https://unix.stackexchange.com/a/267438
postPatch = ''
for f in $(find src/ -type f -print0 |\
xargs -0 -I@ sh -c 'grep -q "/bin/cat" "$1" && echo "$1"' sh @); do
substituteInPlace "$f" --replace-fail '/bin/cat' '${lib.getExe' coreutils "cat"}'
done
'';
# We wrap the main clevis binary entrypoint but not the sub-binaries.
postInstall =
let
includeIntoPath = [
coreutils
cryptsetup
gnugrep
gnused
jose
libpwquality
luksmeta
tpm2-tools
];
in
''
wrapProgram $out/bin/clevis \
--prefix PATH ':' "${lib.makeBinPath includeIntoPath}:${placeholder "out"}/bin"
'';
passthru.tests = {
inherit (nixosTests.installer)
clevisBcachefs
clevisBcachefsFallback
clevisLuks
clevisLuksFallback
clevisZfs
clevisZfsFallback
;
clevisLuksSystemdStage1 = nixosTests.installer-systemd-stage-1.clevisLuks;
clevisLuksFallbackSystemdStage1 = nixosTests.installer-systemd-stage-1.clevisLuksFallback;
clevisZfsSystemdStage1 = nixosTests.installer-systemd-stage-1.clevisZfs;
clevisZfsFallbackSystemdStage1 = nixosTests.installer-systemd-stage-1.clevisZfsFallback;
};
meta = {
homepage = "https://github.com/latchset/clevis";
description = "Automated Encryption Framework";
longDescription = ''
Clevis is a pluggable framework for automated decryption. It can be used
to provide automated decryption of data or even automated unlocking of
LUKS volumes.
'';
changelog = "https://github.com/latchset/clevis/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Plus;
maintainers = [ ];
};
})

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchurl,
ncurses,
}:
stdenv.mkDerivation rec {
pname = "clex";
version = "4.7";
src = fetchurl {
url = "https://github.com/xitop/clex/releases/download/v${version}/clex-${version}.tar.gz";
hash = "sha256-3Y3ayJEy9pHLTUSeXYeekTVdopwKLZ8vVcVarLIFnpM=";
};
buildInputs = [ ncurses ];
enableParallelBuilding = true;
meta = with lib; {
description = "File manager with full-screen terminal interface";
longDescription = ''
CLEX (pronounced KLEKS) displays directory contents including the file
status details and provides features like command history, filename
insertion, or name completion in order to help users to create commands
to be executed by the shell. There are no built-in commands, CLEX is an
add-on to your favorite shell.
'';
homepage = "https://github.com/xitop/clex";
license = licenses.gpl2Plus;
platforms = with platforms; linux ++ darwin;
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
gccStdenv,
fetchFromGitHub,
cmake,
fftw,
fftwFloat,
boost,
opencl-clhpp,
ocl-icd,
}:
let
stdenv = gccStdenv;
in
stdenv.mkDerivation rec {
pname = "clfft";
version = "2.12.2";
src = fetchFromGitHub {
owner = "clMathLibraries";
repo = "clFFT";
rev = "v${version}";
hash = "sha256-yp7u6qhpPYQpBw3d+VLg0GgMyZONVII8BsBCEoRZm4w=";
};
sourceRoot = "${src.name}/src";
postPatch = ''
sed -i '/-m64/d;/-m32/d' CMakeLists.txt
'';
nativeBuildInputs = [ cmake ];
buildInputs = [
fftw
fftwFloat
boost
]
++ lib.optionals stdenv.hostPlatform.isLinux [
opencl-clhpp
ocl-icd
];
# https://github.com/clMathLibraries/clFFT/issues/237
CXXFLAGS = "-std=c++98";
meta = with lib; {
description = "Library containing FFT functions written in OpenCL";
longDescription = ''
clFFT is a software library containing FFT functions written in OpenCL.
In addition to GPU devices, the library also supports running on CPU devices to facilitate debugging and heterogeneous programming.
'';
license = licenses.asl20;
homepage = "http://clmathlibraries.github.io/clFFT/";
platforms = platforms.unix;
maintainers = with maintainers; [ chessai ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchurl,
cmake,
}:
stdenv.mkDerivation rec {
pname = "clhep";
version = "2.4.7.1";
src = fetchurl {
url = "https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-${version}.tgz";
hash = "sha256-HIMEp3cqxrmRlfEwA3jG4930rQfIXWSgRQVlKruKVfk=";
};
prePatch = ''
cd CLHEP
'';
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "clhep_ensure_out_of_source_build()" ""
'';
nativeBuildInputs = [
cmake
];
meta = with lib; {
description = "Set of HEP-specific foundation and utility classes such as random generators, physics vectors, geometry and linear algebra";
homepage = "https://cern.ch/clhep";
license = with licenses; [
gpl3Only
lgpl3Only
];
maintainers = with maintainers; [ veprbl ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
makeWrapper,
nix-update-script,
}:
stdenvNoCC.mkDerivation {
pname = "cli-tips";
version = "0-unstable-2025-02-03";
src = fetchFromGitHub {
owner = "cli-stuff";
repo = "cli-tips";
rev = "34e37224b51362003d1c5af2b0b6bc2a02b668d9";
hash = "sha256-ZJQGa7gaR76zsdZOVoIf87h2wraFFOuonJEDy6J8ygQ=";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share
install -Dm755 cli-tips.sh $out/bin/cli-tips
cp -r translations $out/share
runHook postInstall
'';
postInstall = ''
wrapProgram $out/bin/cli-tips \
--set TIPS_FOLDER "$out/share/translations"
'';
passthru.updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
};
meta = {
description = "CLI tool that provides useful tips and commands for Linux users";
homepage = "https://github.com/cli-stuff/cli-tips";
license = lib.licenses.unlicense;
platforms = with lib.platforms; linux ++ darwin ++ windows;
maintainers = with lib.maintainers; [ perchun ];
mainProgram = "cli-tips";
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
boost,
catch2,
cmake,
python3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cli11";
version = "2.5.0";
src = fetchFromGitHub {
owner = "CLIUtils";
repo = "CLI11";
rev = "v${finalAttrs.version}";
hash = "sha256-73dfpZDnKl0cADM4LTP3/eDFhwCdiHbEaGRF7ZyWsdQ=";
};
buildInputs = [ catch2 ];
nativeBuildInputs = [ cmake ];
nativeCheckInputs = [
boost
python3
];
doCheck = true;
strictDeps = true;
meta = with lib; {
description = "Command line parser for C++11";
homepage = "https://github.com/CLIUtils/CLI11";
platforms = platforms.unix;
maintainers = [ ];
license = licenses.bsd3;
};
})

View File

@@ -0,0 +1,48 @@
{
lib,
python3Packages,
fetchFromGitHub,
versionCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "cli50";
version = "8.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "cs50";
repo = "cli50";
tag = "v${version}";
hash = "sha256-0gu31NPql8pFPN4jFbPwYkQmF/rbrAai6EY1ZVfXLew=";
};
build-system = [
python3Packages.setuptools
];
dependencies = with python3Packages; [
inflect
packaging
requests
tzlocal
];
pythonImportsCheck = [ "cli50" ];
nativeCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
# no python tests
meta = {
description = "Mount directories into cs50/cli containers";
homepage = "https://cs50.readthedocs.io/cli50/";
downloadPage = "https://github.com/cs50/cli50";
changelog = "https://github.com/cs50/cli50/releases/tag/v${version}";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ ethancedwards8 ];
mainProgram = "cli50";
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
cli53,
}:
buildGoModule rec {
pname = "cli53";
version = "0.8.22";
src = fetchFromGitHub {
owner = "barnybug";
repo = "cli53";
rev = version;
sha256 = "sha256-wfb3lK/WB/B8gd4BOqh+Ol10cNZdsoCoQ+hM33+goM8=";
};
vendorHash = "sha256-LKJXoXZS866UfJ+Edwf6AkAZmTV2Q1OI1mZfbsxHb3s=";
ldflags = [
"-s"
"-w"
"-X github.com/barnybug/cli53.version=${version}"
];
passthru.tests.version = testers.testVersion {
package = cli53;
};
meta = with lib; {
description = "CLI tool for the Amazon Route 53 DNS service";
homepage = "https://github.com/barnybug/cli53";
license = licenses.mit;
maintainers = with maintainers; [ benley ];
mainProgram = "cli53";
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "cliam";
version = "2.2.0";
src = fetchFromGitHub {
owner = "securisec";
repo = "cliam";
rev = version;
hash = "sha256-59nPoH0+k1umMwFg95hQHOr/SRGKqr1URFG7xtVRiTs=";
};
vendorHash = "sha256-Tcz8W/PX+9WE+0iFVhqHuElJI7qWD+AdwOKdTc7FQTE=";
nativeBuildInputs = [
installShellFiles
];
ldflags = [
"-s"
"-w"
"-X github.com/securisec/cliam/cli/version.Version=${version}"
];
postBuild = ''
# should be called cliam
mv $GOPATH/bin/{cli,cliam}
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd cliam \
--bash <($out/bin/cliam completion bash) \
--fish <($out/bin/cliam completion fish) \
--zsh <($out/bin/cliam completion zsh)
'';
meta = with lib; {
description = "Cloud agnostic IAM permissions enumerator";
mainProgram = "cliam";
homepage = "https://github.com/securisec/cliam";
license = licenses.gpl3Only;
maintainers = with maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
stdenv,
fetchFromGitHub,
curl,
}:
stdenv.mkDerivation rec {
version = "2.8.7";
pname = "clib";
src = fetchFromGitHub {
rev = version;
owner = "clibs";
repo = "clib";
sha256 = "sha256-uL8prMk2DrYLjCmZW8DdbCg5FJ5uksT3vIATyOW2ZzY=";
};
makeFlags = [ "PREFIX=$(out)" ];
buildInputs = [ curl ];
meta = with lib; {
description = "C micro-package manager";
homepage = "https://github.com/clibs/clib";
license = licenses.mit;
maintainers = with maintainers; [ jb55 ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,38 @@
{
fetchFromGitHub,
rustPlatform,
lib,
stdenv,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "click";
version = "0.6.3";
src = fetchFromGitHub {
owner = "databricks";
repo = "click";
rev = "v${version}";
hash = "sha256-tYSbyDipZg6Qj/CWk1QVUT5AG8ncTt+5V1+ekpmsKXA=";
};
cargoHash = "sha256-K9+SGpWcsOy0l8uj1z6AQggZq+M7wHARACFxsZ6vbUo=";
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ];
meta = with lib; {
description = "Command Line Interactive Controller for Kubernetes";
homepage = "https://github.com/databricks/click";
license = [ licenses.asl20 ];
maintainers = [ maintainers.mbode ];
platforms = [
"x86_64-linux"
"x86_64-darwin"
];
mainProgram = "click";
};
}

View File

@@ -0,0 +1,90 @@
{
lib,
fetchFromGitLab,
gitUpdater,
python3Packages,
stdenv,
}:
python3Packages.buildPythonApplication rec {
pname = "clickable";
version = "8.5.0";
format = "pyproject";
src = fetchFromGitLab {
owner = "clickable";
repo = "clickable";
rev = "v${version}";
hash = "sha256-hQkRntdOlWLK+vVrdiWEkYIMK+ymEEC5ajh7+L2fH2g=";
};
build-system = [ python3Packages.setuptools ];
dependencies = with python3Packages; [
cookiecutter
requests
pyyaml
jsonschema
argcomplete
watchdog
];
nativeCheckInputs = [ python3Packages.pytestCheckHook ];
disabledTests = [
# Tests require docker
"test_cpp_plugin"
"test_html"
"test_python"
"test_qml_only"
"test_rust"
"test_review"
"test_click_build"
"test_no_device"
"test_no_file_temp"
"test_update"
"test_lib_build"
"test_clean"
"test_temp_exception"
"test_create_interactive"
"test_create_non_interactive"
"test_kill"
"test_writable_image"
"test_no_desktop_mode"
"test_no_lock"
"test_run_default_command"
"test_run"
"test_no_container_mode_log"
"test_custom_mode_log"
"test_skip_desktop_mode"
"test_log"
"test_custom_lock_file"
"test_launch_custom"
"test_launch"
"test_devices"
"test_install"
"test_skip_container_mode"
"test_godot_plugin"
]
++
# There are no docker images available for the aarch64 architecture
# which are required for tests.
lib.optionals stdenv.hostPlatform.isAarch64 [
"test_arch"
"test_restricted_arch"
];
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
meta = {
description = "Build system for Ubuntu Touch apps";
mainProgram = "clickable";
homepage = "https://clickable-ut.dev";
changelog = "https://clickable-ut.dev/en/latest/changelog.html#changes-in-v${
lib.strings.replaceStrings [ "." ] [ "-" ] version
}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ ilyakooo0 ];
teams = [ lib.teams.lomiri ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchFromSourcehut,
SDL2,
}:
stdenv.mkDerivation rec {
pname = "clickclack";
version = "0.2.3";
src = fetchFromSourcehut {
owner = "~proycon";
repo = "clickclack";
rev = version;
hash = "sha256-YmlbGEmZgT/30c+mWQzdz4rKc69d75zhoNUA5FdxdMc=";
};
buildInputs = [
SDL2
];
makeFlags = [
"PREFIX=${placeholder "out"}"
];
meta = with lib; {
description = "Vibration/audio feedback tool to be used with virtual keyboards";
homepage = "https://git.sr.ht/~proycon/clickclack";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ dotlambda ];
mainProgram = "clickclack";
};
}

View File

@@ -0,0 +1,41 @@
{
buildGoModule,
clickhouse-backup,
fetchFromGitHub,
lib,
testers,
}:
buildGoModule rec {
pname = "clickhouse-backup";
version = "2.6.39";
src = fetchFromGitHub {
owner = "Altinity";
repo = "clickhouse-backup";
rev = "v${version}";
hash = "sha256-fx300EyGm9iy4kozcffh8KZz/EYF6yqkdNLSqW1dYQg=";
};
vendorHash = "sha256-MwyjjEePxcwcESfBhmFtYy8aOI50HL7x05cJyGk5gGg=";
ldflags = [
"-X main.version=${version}"
];
postConfigure = ''
export CGO_ENABLED=0
'';
passthru.tests.version = testers.testVersion {
package = clickhouse-backup;
};
meta = with lib; {
description = "Tool for easy ClickHouse backup and restore using object storage for backup files";
mainProgram = "clickhouse-backup";
homepage = "https://github.com/Altinity/clickhouse-backup";
license = licenses.mit;
maintainers = with maintainers; [ devusb ];
};
}

View File

@@ -0,0 +1,198 @@
{
lts ? false,
version,
hash,
nixUpdateExtraArgs ? [ ],
}:
{
lib,
stdenv,
llvmPackages_19,
fetchFromGitHub,
fetchpatch,
cmake,
ninja,
python3,
perl,
nasm,
yasm,
nixosTests,
darwin,
findutils,
libiconv,
removeReferencesTo,
rustSupport ? true,
rustc,
cargo,
rustPlatform,
nix-update-script,
}:
let
llvmStdenv = llvmPackages_19.stdenv;
in
llvmStdenv.mkDerivation (finalAttrs: {
pname = "clickhouse";
inherit version;
src = fetchFromGitHub rec {
owner = "ClickHouse";
repo = "ClickHouse";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
name = "clickhouse-${tag}.tar.gz";
inherit hash;
postFetch = ''
# delete files that make the source too big
rm -rf $out/contrib/llvm-project/llvm/test
rm -rf $out/contrib/llvm-project/clang/test
rm -rf $out/contrib/croaring/benchmarks
# fix case insensitivity on macos https://github.com/NixOS/nixpkgs/issues/39308
rm -rf $out/contrib/sysroot/linux-*
rm -rf $out/contrib/liburing/man
# compress to not exceed the 2GB output limit
# try to make a deterministic tarball
tar -I 'gzip -n' \
--sort=name \
--mtime=1970-01-01 \
--owner=0 --group=0 \
--numeric-owner --mode=go=rX,u+rw,a-s \
--transform='s@^@source/@S' \
-cf temp -C "$out" .
rm -r "$out"
mv temp "$out"
'';
};
strictDeps = true;
nativeBuildInputs = [
cmake
ninja
python3
perl
llvmPackages_19.lld
removeReferencesTo
]
++ lib.optionals stdenv.hostPlatform.isx86_64 [
nasm
yasm
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
llvmPackages_19.bintools
findutils
darwin.bootstrap_cmds
]
++ lib.optionals rustSupport [
rustc
cargo
rustPlatform.cargoSetupHook
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
dontCargoSetupPostUnpack = true;
patches =
lib.optional (lib.versions.majorMinor version == "25.8") (fetchpatch {
# Disable building WASM lexer
url = "https://github.com/ClickHouse/ClickHouse/commit/67a42b78cdf1c793e78c1adbcc34162f67044032.patch";
sha256 = "7VF+JSztqTWD+aunCS3UVNxlRdwHc2W5fNqzDyeo3Fc=";
})
++
lib.optional (lib.versions.majorMinor version == "25.8" && stdenv.hostPlatform.isDarwin)
(fetchpatch {
# Do not intercept memalign on darwin
url = "https://github.com/ClickHouse/ClickHouse/commit/0cfd2dbe981727fb650f3b9935f5e7e7e843180f.patch";
sha256 = "1iNYZbugX2g2dxNR1ZiUthzPnhLUR8g118aG23yhgUo=";
});
postPatch = ''
patchShebangs src/ utils/
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace cmake/tools.cmake \
--replace-fail 'gfind' 'find' \
--replace-fail 'ggrep' 'grep' \
--replace-fail '--ld-path=''${LLD_PATH}' '-fuse-ld=lld'
substituteInPlace utils/list-licenses/list-licenses.sh \
--replace-fail 'gfind' 'find' \
--replace-fail 'ggrep' 'grep'
''
# Rust is handled by cmake
+ lib.optionalString rustSupport ''
cargoSetupPostPatchHook() { true; }
'';
cmakeFlags = [
"-DENABLE_CHDIG=OFF"
"-DENABLE_TESTS=OFF"
"-DENABLE_DELTA_KERNEL_RS=0"
"-DCOMPILER_CACHE=disabled"
]
++ lib.optional (
stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64
) "-DNO_ARMV81_OR_HIGHER=1";
env = {
CARGO_HOME = "$PWD/../.cargo/";
NIX_CFLAGS_COMPILE =
# undefined reference to '__sync_val_compare_and_swap_16'
lib.optionalString stdenv.hostPlatform.isx86_64 " -mcx16"
+
# Silence ``-Wimplicit-const-int-float-conversion` error in MemoryTracker.cpp and
# ``-Wno-unneeded-internal-declaration` TreeOptimizer.cpp.
lib.optionalString stdenv.hostPlatform.isDarwin
" -Wno-implicit-const-int-float-conversion -Wno-unneeded-internal-declaration";
};
# https://github.com/ClickHouse/ClickHouse/issues/49988
hardeningDisable = [ "fortify" ];
postInstall = ''
sed -i -e '\!<log>/var/log/clickhouse-server/clickhouse-server\.log</log>!d' \
$out/etc/clickhouse-server/config.xml
substituteInPlace $out/etc/clickhouse-server/config.xml \
--replace-fail "<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>" "<console>1</console>" \
--replace-fail "<level>trace</level>" "<level>warning</level>"
remove-references-to -t ${llvmStdenv.cc} $out/bin/clickhouse
'';
# canary for the remove-references-to hook failing
disallowedReferences = [ llvmStdenv.cc ];
# Basic smoke test
doCheck = true;
checkPhase = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
$NIX_BUILD_TOP/$sourceRoot/build/programs/clickhouse local --query 'SELECT 1' | grep 1
'';
# Builds in 7+h with 2 cores, and ~20m with a big-parallel builder.
requiredSystemFeatures = [ "big-parallel" ];
passthru = {
tests = if lts then nixosTests.clickhouse-lts else nixosTests.clickhouse;
updateScript = nix-update-script {
extraArgs = nixUpdateExtraArgs;
};
};
meta = with lib; {
homepage = "https://clickhouse.com";
description = "Column-oriented database management system";
license = licenses.asl20;
maintainers = with maintainers; [
orivej
mbalatsko
thevar1able
];
# not supposed to work on 32-bit https://github.com/ClickHouse/ClickHouse/pull/23959#issuecomment-835343685
platforms = lib.filter (x: (lib.systems.elaborate x).is64bit) (platforms.linux ++ platforms.darwin);
broken = stdenv.buildPlatform != stdenv.hostPlatform;
};
})

View File

@@ -0,0 +1,11 @@
import ./generic.nix {
version = "25.8.7.3-lts";
hash = "sha256-wH/UxMgnsK6OIGxEv9CYA67f8PWC0u6IAiW2iY/KThk=";
lts = true;
nixUpdateExtraArgs = [
"--version-regex"
"^v?(.*-lts)$"
"--override-filename"
"pkgs/by-name/cl/clickhouse/lts.nix"
];
}

View File

@@ -0,0 +1,11 @@
import ./generic.nix {
version = "25.9.2.1-stable";
hash = "sha256-BygRxiDhhs91/UPWY7f3jAGyTtyAj98RdDXLwjs8Abo=";
lts = false;
nixUpdateExtraArgs = [
"--version-regex"
"^v?(.*-stable|.*-lts)$"
"--override-filename"
"pkgs/by-name/cl/clickhouse/package.nix"
];
}

View File

@@ -0,0 +1,64 @@
{
lib,
stdenvNoCC,
appimageTools,
fetchurl,
makeWrapper,
}:
let
pname = "clickup";
version = "3.5.120";
src = fetchurl {
# Using archive.org because the website doesn't store older versions of the software.
url = "https://web.archive.org/web/20250802083833/https://desktop.clickup.com/linux";
hash = "sha256-LVHgXqTxDTsnVJ3zx74TzaSrEs2OD0wl0eioPd4+484=";
};
appimage = appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: [ pkgs.xorg.libxkbfile ];
};
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
stdenvNoCC.mkDerivation {
inherit pname version;
src = appimage;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/
cp -r bin $out/bin
mkdir -p $out/share/${pname}
cp -r ${appimageContents}/locales $out/share/${pname}
cp -r ${appimageContents}/resources $out/share/${pname}
cp -r --no-preserve=mode ${appimageContents}/usr/share/icons $out/share/
find $out/share/icons -name desktop.png -execdir mv {} clickup.png \;
install -m 444 -D ${appimageContents}/desktop.desktop $out/share/applications/clickup.desktop
substituteInPlace $out/share/applications/clickup.desktop \
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=clickup' \
--replace-fail 'Icon=desktop' 'Icon=clickup'
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}} --no-update"
runHook postInstall
'';
meta = {
description = "All in one project management solution";
homepage = "https://clickup.com";
license = lib.licenses.unfree;
mainProgram = "clickup";
maintainers = with lib.maintainers; [ heisfer ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,28 @@
{
mkDerivation,
fetchFromGitHub,
base,
bytestring,
network,
lib,
}:
mkDerivation {
pname = "client-ip-echo";
version = "0.1.0.5";
src = fetchFromGitHub {
owner = "jerith666";
repo = "client-ip-echo";
rev = "e81db98d04c13966b2ec114e01f82487962055a7";
sha256 = "02rzzbm1mdqh5zx5igd0s7pwkcsk64lx40rclxw3485348brc6ya";
};
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
base
bytestring
network
];
description = "Accepts TCP connections and echoes the client's IP address back to it";
license = lib.licenses.lgpl3;
mainProgram = "client-ip-echo";
}

View File

@@ -0,0 +1 @@
{ pkgs }: pkgs.haskellPackages.callPackage ./client-ip-echo.nix { }

View File

@@ -0,0 +1,41 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cliflux";
version = "1.9.0";
src = fetchFromGitHub {
owner = "spencerwi";
repo = "cliflux";
tag = "v${finalAttrs.version}";
hash = "sha256-2Hmdze3so74YHv9JrRHfylWcT1LlBrXVcAiBxigW6wU=";
};
cargoHash = "sha256-glA78iRu7SoJZnk6QL7b84jY1+U4RzgUXe/zQpAnK7A=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Terminal client for Miniflux RSS reader";
homepage = "https://github.com/spencerwi/cliflux";
changelog = "https://github.com/spencerwi/cliflux/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ arthsmn ];
mainProgram = "cliflux";
};
})

View File

@@ -0,0 +1,54 @@
{
stdenv,
lib,
fetchFromGitHub,
libcap,
acl,
file,
readline,
python3,
nix-update-script,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clifm";
version = "1.26.3";
src = fetchFromGitHub {
owner = "leo-arch";
repo = "clifm";
tag = "v${finalAttrs.version}";
hash = "sha256-lYeYElTeQpOnptL/c/06OWpsmI/Jkd7rlKGw0mKc9/c=";
};
buildInputs = [
libcap
acl
file
readline
python3
];
makeFlags = [
"PREFIX=${placeholder "out"}"
"DATADIR=${placeholder "out"}/share"
];
enableParallelBuilding = true;
nativeCheckInputs = [ versionCheckHook ];
doCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/leo-arch/clifm";
changelog = "https://github.com/leo-arch/clifm/releases/tag/v${finalAttrs.version}";
description = "CLI-based, shell-like, and non-curses terminal file manager";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ nadir-ishiguro ];
platforms = lib.platforms.unix;
mainProgram = "clifm";
};
})

View File

@@ -0,0 +1,115 @@
{
lib,
stdenv,
cctools,
darwin,
fetchurl,
autoconf,
autogen,
automake,
gettext,
libtool,
lowdown-unsandboxed,
protobuf,
unzip,
which,
gmp,
libsodium,
python3,
sqlite,
zlib,
jq,
libpq,
}:
let
py3 = python3.withPackages (p: [
p.distutils
p.mako
]);
in
stdenv.mkDerivation rec {
pname = "clightning";
version = "25.09";
src = fetchurl {
url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
hash = "sha256-qX9EZHuDtEcYCU8YOMbHTo3JDAAJ8nc6N7F/+AAEpn4=";
};
# when building on darwin we need cctools to provide the correct libtool
# as libwally-core detects the host as darwin and tries to add the -static
# option to libtool, also we have to add the modified gsed package.
nativeBuildInputs = [
autoconf
autogen
automake
gettext
libtool
lowdown-unsandboxed
protobuf
py3
unzip
which
libpq.pg_config
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
cctools
darwin.autoSignDarwinBinariesHook
];
buildInputs = [
gmp
libsodium
sqlite
zlib
jq
];
# this causes some python trouble on a darwin host so we skip this step.
# also we have to tell libwally-core to use sed instead of gsed.
postPatch =
if !stdenv.hostPlatform.isDarwin then
''
patchShebangs \
tools/generate-wire.py \
tools/update-mocks.sh \
tools/mockup.sh \
tools/fromschema.py \
devtools/sql-rewrite.py
''
else
''
substituteInPlace external/libwally-core/tools/autogen.sh --replace gsed sed && \
substituteInPlace external/libwally-core/configure.ac --replace gsed sed
'';
configureFlags = [ "--disable-valgrind" ];
makeFlags = [ "VERSION=v${version}" ];
enableParallelBuilding = true;
# workaround for build issue, happens only x86_64-darwin, not aarch64-darwin
# ccan/ccan/fdpass/fdpass.c:16:8: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant]
# char buf[CMSG_SPACE(sizeof(fd))];
env.NIX_CFLAGS_COMPILE = lib.optionalString (
stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64
) "-Wno-error=gnu-folding-constant";
meta = with lib; {
description = "Bitcoin Lightning Network implementation in C";
longDescription = ''
c-lightning is a standard compliant implementation of the Lightning
Network protocol. The Lightning Network is a scalability solution for
Bitcoin, enabling secure and instant transfer of funds between any two
parties for any amount.
'';
homepage = "https://github.com/ElementsProject/lightning";
maintainers = with maintainers; [
jb55
prusnak
];
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "clima";
version = "1.1.0";
src = fetchFromGitHub {
owner = "Canop";
repo = "clima";
rev = "v${version}";
hash = "sha256-CRnAxhkuCTyHR4uQofA51Dm3+YKqm3iwBkFNkbLTv1A=";
};
cargoHash = "sha256-3BNDo5ksra1d8X6yQZYSlS2CSiZfkuTHkQtIC2ckbKE=";
meta = with lib; {
description = "Minimal viewer for Termimad";
homepage = "https://github.com/Canop/clima";
changelog = "https://github.com/Canop/clima/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "clima";
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
ocl-icd,
opencl-headers,
}:
stdenv.mkDerivation rec {
pname = "clinfo";
version = "3.0.25.02.14";
src = fetchFromGitHub {
owner = "Oblomov";
repo = "clinfo";
rev = version;
sha256 = "sha256-UkkrRpmY5vZtTeEqPNYfxAGaJDoTSrNUG9N1Bknozow=";
};
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [
ocl-icd
opencl-headers
];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
meta = with lib; {
description = "Print all known information about all available OpenCL platforms and devices in the system";
homepage = "https://github.com/Oblomov/clinfo";
license = licenses.cc0;
maintainers = with maintainers; [
athas
r-burns
];
platforms = platforms.unix;
mainProgram = "clinfo";
};
}

View File

@@ -0,0 +1,54 @@
From cd4d1d8c4963620a6a84834948845df81fbbd70b Mon Sep 17 00:00:00 2001
From: Jonas Hahnfeld <jonas.hahnfeld@cern.ch>
Date: Tue, 17 Dec 2024 14:54:18 +0100
Subject: [PATCH] Use single Parser for LookupHelper
It is the only construction of a temporary parser, and it seems not
necessary (anymore).
---
include/cling/Interpreter/LookupHelper.h | 2 +-
lib/Interpreter/Interpreter.cpp | 11 ++++-------
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/include/cling/Interpreter/LookupHelper.h b/include/cling/Interpreter/LookupHelper.h
index 6e6e281470..cd79b2a65c 100644
--- a/include/cling/Interpreter/LookupHelper.h
+++ b/include/cling/Interpreter/LookupHelper.h
@@ -56,7 +56,7 @@ namespace cling {
WithDiagnostics
};
private:
- std::unique_ptr<clang::Parser> m_Parser;
+ clang::Parser* m_Parser;
Interpreter* m_Interpreter; // we do not own.
std::array<const clang::Type*, kNumCachedStrings> m_StringTy = {{}};
/// A map containing the hash of the lookup buffer. This allows us to avoid
diff --git a/lib/Interpreter/Interpreter.cpp b/lib/Interpreter/Interpreter.cpp
index 13c8409cc5..f04695439b 100644
--- a/lib/Interpreter/Interpreter.cpp
+++ b/lib/Interpreter/Interpreter.cpp
@@ -265,13 +265,6 @@ namespace cling {
}
Sema& SemaRef = getSema();
- Preprocessor& PP = SemaRef.getPreprocessor();
-
- m_LookupHelper.reset(new LookupHelper(new Parser(PP, SemaRef,
- /*SkipFunctionBodies*/false,
- /*isTemp*/true), this));
- if (!m_LookupHelper)
- return;
if (!isInSyntaxOnlyMode() && !m_Opts.CompilerOpts.CUDADevice) {
m_Executor.reset(new IncrementalExecutor(SemaRef.Diags, *getCI(),
@@ -317,6 +310,10 @@ namespace cling {
return;
}
+ m_LookupHelper.reset(new LookupHelper(m_IncrParser->getParser(), this));
+ if (!m_LookupHelper)
+ return;
+
// When not using C++ modules, we now have a PCH and we can safely setup
// our callbacks without fearing that they get overwritten by clang code.
// The modules setup is handled above.

View File

@@ -0,0 +1,217 @@
{
apple-sdk,
cmake,
fetchFromGitHub,
git,
lib,
libffi,
llvmPackages_18,
makeWrapper,
ncurses,
python3,
zlib,
# *NOT* from LLVM 18!
# The compiler used to compile Cling may affect the runtime include and lib
# directories it expects to be run with. Cling builds against (a fork of) Clang,
# so we prefer to use Clang as the compiler as well for consistency.
# It would be cleanest to use LLVM 9's clang, but it errors. So, we use a later
# version of Clang to compile, but we check out the Cling fork of Clang 9 to
# build Cling against.
clangStdenv,
# For runtime C++ standard library
gcc-unwrapped,
# Build with debug symbols
debug ? false,
# Build with libc++ (LLVM) rather than stdlibc++ (GCC).
# This is experimental and not all features work.
useLLVMLibcxx ? clangStdenv.hostPlatform.isDarwin,
}:
let
stdenv = clangStdenv;
version = "1.2";
clingSrc = fetchFromGitHub {
owner = "root-project";
repo = "cling";
rev = "v${version}";
sha256 = "sha256-ay9FXANJmB/+AdnCR4WOKHuPm6P88wLqoOgiKJwJ8JM=";
};
unwrapped = stdenv.mkDerivation {
pname = "cling-unwrapped";
inherit version;
src = fetchFromGitHub {
owner = "root-project";
repo = "llvm-project";
rev = "cling-llvm18-20250721-01";
sha256 = "sha256-JGteapyujU5w81DsfPQfTq76cYHgk5PbAFbdYfYIDo4=";
};
preConfigure = ''
cp -r ${clingSrc} cling-source
# Patch a bug in version 1.2 by backporting a fix. See
# https://github.com/root-project/cling/issues/556
chmod -R u+w cling-source
pushd cling-source
patch -p1 < ${./fix-new-parser.patch}
popd
cd llvm
'';
nativeBuildInputs = [
python3
git
cmake
];
buildInputs = [
libffi
ncurses
zlib
];
strictDeps = true;
cmakeFlags = [
"-DLLVM_EXTERNAL_PROJECTS=cling"
"-DLLVM_EXTERNAL_CLING_SOURCE_DIR=../../cling-source"
"-DLLVM_ENABLE_PROJECTS=clang"
"-DLLVM_TARGETS_TO_BUILD=host;NVPTX"
"-DLLVM_INCLUDE_TESTS=OFF"
"-DLLVM_ENABLE_RTTI=ON"
]
++ lib.optionals (!debug) [
"-DCMAKE_BUILD_TYPE=Release"
]
++ lib.optionals debug [
"-DCMAKE_BUILD_TYPE=Debug"
]
++ lib.optionals useLLVMLibcxx [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DLLVM_ENABLE_LIBCXXABI=ON"
];
CPPFLAGS = if useLLVMLibcxx then [ "-stdlib=libc++" ] else [ ];
postInstall = ''
mkdir -p $out/share/Jupyter
cp -r ../../cling-source/tools/Jupyter/kernel $out/share/Jupyter
'';
buildTargets = [ "cling" ];
dontStrip = debug;
meta = with lib; {
description = "Interactive C++ Interpreter";
mainProgram = "cling";
homepage = "https://root.cern/cling/";
license = with licenses; [
lgpl21
ncsa
];
maintainers = with maintainers; [ thomasjm ];
platforms = platforms.unix;
};
};
# The flags passed to the wrapped cling should
# a) prevent it from searching for system include files and libs, and
# b) provide it with the include files and libs it needs (C and C++ standard library plus
# its own stuff)
# These are also exposed as cling.flags because it's handy to be able to pass them to tools
# that wrap Cling, particularly Jupyter kernels such as xeus-cling and the built-in
# jupyter-cling-kernel, which use Cling as a library.
# Thus, if you're packaging a Jupyter kernel, you either need to pass these flags as extra
# args to xcpp (for xeus-cling) or put them in the environment variable CLING_OPTS
# (for jupyter-cling-kernel).
flags = [
"-nostdinc"
"-nostdinc++"
"-resource-dir"
"${llvmPackages_18.llvm.lib}/lib"
"-isystem"
"${lib.getLib unwrapped}/lib/clang/18/include"
]
++ lib.optionals useLLVMLibcxx [
"-I"
"${lib.getDev llvmPackages_18.libcxx}/include/c++/v1"
"-L"
"${llvmPackages_18.libcxx}/lib"
"-l"
"${llvmPackages_18.libcxx}/lib/libc++${stdenv.hostPlatform.extensions.sharedLibrary}"
]
++ lib.optionals (!useLLVMLibcxx) [
"-I"
"${gcc-unwrapped}/include/c++/${gcc-unwrapped.version}"
"-I"
"${gcc-unwrapped}/include/c++/${gcc-unwrapped.version}/${stdenv.hostPlatform.config}"
]
++ [
# System libc on Linux
# On Darwin, this is an empty directory, so we need a separate include with
# apple-sdk (see below)
"-isystem"
"${lib.getDev stdenv.cc.libc}/include"
# cling includes
"-isystem"
"${lib.getDev unwrapped}/include"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# On Darwin, we need the system includes
"-isystem"
"${apple-sdk}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
];
in
stdenv.mkDerivation {
pname = "cling";
version = unwrapped.version;
nativeBuildInputs = [ makeWrapper ];
inherit unwrapped flags;
inherit (unwrapped) meta;
dontUnpack = true;
dontConfigure = true;
buildPhase = ''
runHook preBuild
makeWrapper $unwrapped/bin/cling $out/bin/cling \
--add-flags "$flags"
runHook postBuild
'';
doCheck = true;
checkPhase = ''
runHook preCheck
output=$($out/bin/cling <<EOF
#include <iostream>
std::cout << "hello world" << std::endl
EOF
)
echo "$output" | grep -q "Type C++ code and press enter to run it"
echo "$output" | grep -q "hello world"
runHook postCheck
'';
dontInstall = true;
}

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
clingo,
catch2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clingcon";
version = "5.2.1";
src = fetchFromGitHub {
owner = "potassco";
repo = "clingcon";
tag = "v${finalAttrs.version}";
sha256 = "sha256-R2kgcw8VUwhOdvPXnsahT5gnoUd5DXLqfdH++8rFoAA=";
};
postPatch = ''
cp ${catch2}/include/catch2/catch.hpp libclingcon/tests/catch.hpp
'';
nativeBuildInputs = [
cmake
clingo
];
cmakeFlags = [
"-DCLINGCON_MANAGE_RPATH=ON"
"-DPYCLINGCON_ENABLE=OFF"
"-DCLINGCON_BUILD_TESTS=ON"
];
doCheck = true;
meta = {
description = "Extension of clingo to handle constraints over integers";
mainProgram = "clingcon";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
homepage = "https://potassco.org/";
downloadPage = "https://github.com/potassco/clingcon/releases/";
changelog = "https://github.com/potassco/clingcon/releases/tag/v${finalAttrs.version}";
};
})

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "clingo";
version = "5.8.0";
src = fetchFromGitHub {
owner = "potassco";
repo = "clingo";
tag = "v${finalAttrs.version}";
sha256 = "sha256-VhfWGAcrq4aN5Tgz84v7vLOWexsA89vRaang58SXVyI=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DCLINGO_BUILD_WITH_PYTHON=OFF" ];
meta = {
description = "ASP system to ground and solve logic programs";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.raskin ];
platforms = lib.platforms.unix;
homepage = "https://potassco.org/";
downloadPage = "https://github.com/potassco/clingo/releases/";
};
})

View File

@@ -0,0 +1,25 @@
{
fetchCrate,
lib,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "clini";
version = "0.1.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-+HnoYFRG7GGef5lV4CUsUzqPzFUzXDajprLu25SCMQo=";
};
cargoHash = "sha256-N18/pCOdwcYA3Uu6+/HAdeqf2xXQcZoaWhOEPMncDKM=";
meta = with lib; {
description = "Simple tool to do basic modification of ini files";
homepage = "https://github.com/domgreen/clini";
license = licenses.mit;
maintainers = with maintainers; [ Flakebi ];
mainProgram = "clini";
};
}

View File

@@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
libffi,
pkg-config,
wayland-protocols,
wayland-scanner,
wayland,
xorg,
nix-update-script,
alsa-lib,
openssl,
}:
stdenv.mkDerivation rec {
pname = "clipboard-jh";
version = "0.10.0";
src = fetchFromGitHub {
owner = "Slackadays";
repo = "clipboard";
rev = version;
hash = "sha256-3SloqijgbX3XIwdO2VBOd61or7tnByi7w45dCBKTkm8=";
};
postPatch = ''
sed -i "/CMAKE_OSX_ARCHITECTURES/d" CMakeLists.txt
'';
nativeBuildInputs = [
cmake
pkg-config
wayland-scanner
];
buildInputs = [
openssl
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libffi
wayland-protocols
wayland
xorg.libX11
alsa-lib
];
cmakeBuildType = "MinSizeRel";
cmakeFlags = [
"-Wno-dev"
"-DINSTALL_PREFIX=${placeholder "out"}"
];
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
patchelf $out/bin/cb --add-rpath $out/lib
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Cut, copy, and paste anything, anywhere, all from the terminal";
homepage = "https://github.com/Slackadays/clipboard";
license = licenses.gpl3Only;
maintainers = with maintainers; [ dit7ya ];
platforms = platforms.all;
mainProgram = "cb";
};
}

View File

@@ -0,0 +1,14 @@
diff --git a/crates/server/src/notification/dummy.rs b/crates/server/src/notification/dummy.rs
index f85dda0..7489f22 100644
--- a/crates/server/src/notification/dummy.rs
+++ b/crates/server/src/notification/dummy.rs
@@ -1,6 +1,9 @@
+#[cfg(test)]
use crate::notification::traits;
+#[cfg(test)]
#[derive(Clone, Copy, Debug, Default)]
pub struct Notification {}
+#[cfg(test)]
impl traits::Notification for Notification {}

View File

@@ -0,0 +1,66 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
protobuf,
installShellFiles,
writableTmpDirAsHomeHook,
}:
rustPlatform.buildRustPackage rec {
pname = "clipcat";
version = "0.21.1";
src = fetchFromGitHub {
owner = "xrelkd";
repo = "clipcat";
tag = "v${version}";
hash = "sha256-MYWkUb9v8hnW6gUTpIcz0+jhlc8y3hZxsEQxRIZVVxI=";
};
cargoHash = "sha256-7ntsq6x/8QFaU6Hl4tk+Rtvc8ttcK9Mp00nlirNlUKY=";
patches = [
# Fix compilation errors caused by stricter restrictions on unused code in Rust 1.89.
# TODO: remove this patch after upstream fix it.
./dummy.patch
];
nativeBuildInputs = [
protobuf
installShellFiles
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# fix following error on darwin:
# objc/notify.h:1:9: fatal error: could not build module 'Cocoa'
writableTmpDirAsHomeHook
];
checkFlags = [
# Some test cases interact with X11, skip them
"--skip=test_x11_clipboard"
"--skip=test_x11_primary"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
for cmd in clipcatd clipcatctl clipcat-menu clipcat-notify; do
installShellCompletion --cmd $cmd \
--bash <($out/bin/$cmd completions bash) \
--fish <($out/bin/$cmd completions fish) \
--zsh <($out/bin/$cmd completions zsh)
done
'';
meta = {
description = "Clipboard Manager written in Rust Programming Language";
homepage = "https://github.com/xrelkd/clipcat";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
maintainers = with lib.maintainers; [
xrelkd
bot-wxt1221
];
mainProgram = "clipcatd";
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:
buildGoModule rec {
pname = "cliphist";
version = "0.6.1";
src = fetchFromGitHub {
owner = "sentriz";
repo = "cliphist";
tag = "v${version}";
hash = "sha256-tImRbWjYCdIY8wVMibc5g5/qYZGwgT9pl4pWvY7BDlI=";
};
vendorHash = "sha256-gG8v3JFncadfCEUa7iR6Sw8nifFNTciDaeBszOlGntU=";
postInstall = ''
cp ${src}/contrib/* $out/bin/
'';
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Wayland clipboard manager";
homepage = "https://github.com/sentriz/cliphist";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ dit7ya ];
mainProgram = "cliphist";
};
}

View File

@@ -0,0 +1,78 @@
{
fetchFromGitHub,
fetchpatch,
lib,
stdenv,
autoreconfHook,
intltool,
pkg-config,
gtk3,
libayatana-appindicator,
xdotool,
which,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "clipit";
version = "1.4.5";
src = fetchFromGitHub {
owner = "CristianHenzel";
repo = "ClipIt";
rev = "45e2ea386d04dbfc411ea370299502450d589d0c";
sha256 = "0byqz9hanwmdc7i55xszdby2iqrk93lws7hmjda2kv17g34apwl7";
};
preConfigure = ''
intltoolize --copy --force --automake
'';
patches = [
# Fixes for GCC14
(fetchpatch {
url = "https://salsa.debian.org/debian/clipit/-/raw/d4bafc28fcb445d1940cdfede6c70142cf3162f5/debian/patches/incompatible-pointer-types.patch";
hash = "sha256-STI1fpnoPdEqu1embQcUlTG712HPbJ+LPm930P13Ixo=";
})
(fetchpatch {
url = "https://salsa.debian.org/debian/clipit/-/raw/656d0814030c13437b10d40ee75615d0e8cd873e/debian/patches/missing-prototypes.patch";
hash = "sha256-UD183IjV5BprPHQK9bhmUBKfUYgqEZ9M1cRE+AmhAPA=";
})
];
nativeBuildInputs = [
pkg-config
wrapGAppsHook3
autoreconfHook
intltool
];
configureFlags = [
"--with-gtk3"
"--enable-appindicator=yes"
];
buildInputs = [
gtk3
libayatana-appindicator
];
gappsWrapperArgs = [
"--prefix"
"PATH"
":"
"${lib.makeBinPath [
xdotool
which
]}"
];
meta = with lib; {
description = "Lightweight GTK Clipboard Manager";
inherit (src.meta) homepage;
license = licenses.gpl3Plus;
platforms = platforms.linux;
mainProgram = "clipit";
maintainers = with maintainers; [ kamilchm ];
};
}

View File

@@ -0,0 +1,49 @@
{
buildGoModule,
fetchFromGitHub,
lib,
wl-clipboard,
makeWrapper,
installShellFiles,
}:
buildGoModule rec {
pname = "clipman";
version = "1.6.4";
src = fetchFromGitHub {
owner = "chmouel";
repo = "clipman";
rev = "v${version}";
sha256 = "sha256-kuW74iUVLfIUWf3gaKM7IuMU1nfpU9SbSsfeZDbYGhY=";
};
vendorHash = "sha256-I1RWyjyOfppGi+Z5nvAei5zEvl0eQctcH8NP0MYSTbg=";
outputs = [
"out"
"man"
];
doCheck = false;
nativeBuildInputs = [
makeWrapper
installShellFiles
];
postInstall = ''
wrapProgram $out/bin/clipman \
--prefix PATH : ${lib.makeBinPath [ wl-clipboard ]}
installManPage docs/*.1
'';
meta = with lib; {
homepage = "https://github.com/chmouel/clipman";
description = "Simple clipboard manager for Wayland";
license = licenses.gpl3Only;
maintainers = with maintainers; [ ma27 ];
platforms = platforms.linux;
mainProgram = "clipman";
};
}

View File

@@ -0,0 +1,61 @@
{
stdenv,
lib,
fetchFromGitHub,
makeWrapper,
clipnotify,
coreutils,
gawk,
util-linux,
xdotool,
xsel,
}:
stdenv.mkDerivation rec {
pname = "clipmenu";
version = "6.2.0";
src = fetchFromGitHub {
owner = "cdown";
repo = "clipmenu";
rev = version;
sha256 = "sha256-nvctEwyho6kl4+NXi76jT2kG7nchmI2a7mgxlgjXA5A=";
};
postPatch = ''
sed -i init/clipmenud.service \
-e "s,/usr/bin,$out/bin,"
'';
makeFlags = [ "PREFIX=$(out)" ];
nativeBuildInputs = [
makeWrapper
xsel
clipnotify
];
postFixup = ''
sed -i "$out/bin/clipctl" -e 's,clipmenud\$,\.clipmenud-wrapped\$,'
wrapProgram "$out/bin/clipmenu" \
--prefix PATH : "${lib.makeBinPath [ xsel ]}"
wrapProgram "$out/bin/clipmenud" \
--set PATH "${
lib.makeBinPath [
clipnotify
coreutils
gawk
util-linux
xdotool
xsel
]
}"
'';
meta = with lib; {
description = "Clipboard management using dmenu";
inherit (src.meta) homepage;
maintainers = with maintainers; [ jb55 ];
license = licenses.publicDomain;
};
}

Some files were not shown because too many files have changed in this diff Show More