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,69 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
static ? stdenv.hostPlatform.isStatic,
cxxStandard ? null,
}:
stdenv.mkDerivation rec {
pname = "abseil-cpp";
version = "20210324.2";
src = fetchFromGitHub {
owner = "abseil";
repo = "abseil-cpp";
rev = version;
sha256 = "sha256-fcxPhuI2eL/fnd6nT11p8DpUNwGNaXZmd03yOiZcOT0=";
};
patches = [
# Use CMAKE_INSTALL_FULL_{LIBDIR,INCLUDEDIR}
# https://github.com/abseil/abseil-cpp/pull/963
(fetchpatch {
url = "https://github.com/abseil/abseil-cpp/commit/5bfa70c75e621c5d5ec095c8c4c0c050dcb2957e.patch";
sha256 = "0nhjxqfxpi2pkfinnqvd5m4npf9l1kg39mjx9l3087ajhadaywl5";
})
# Bacport gcc-13 fix:
# https://github.com/abseil/abseil-cpp/pull/1187
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/abseil/abseil-cpp/commit/36a4b073f1e7e02ed7d1ac140767e36f82f09b7c.patch";
hash = "sha256-aA7mwGEtv/cQINcawjkukmCvfNuqwUeDFssSiNKPdgg=";
})
]
++ lib.optionals stdenv.hostPlatform.isLoongArch64 [
# https://github.com/abseil/abseil-cpp/pull/1110
(fetchpatch {
url = "https://github.com/abseil/abseil-cpp/commit/808bc202fc13e85a7948db0d7fb58f0f051200b1.patch";
sha256 = "sha256-ayY/aV/xWOdEyFSDqV7B5WDGvZ0ASr/aeBeYwP5RZVc=";
})
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Dont propagate the path to CoreFoundation. Otherwise, its impossible to build packages
# that require a different SDK other than the default one.
./cmake-core-foundation.patch
];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
]
++ lib.optionals (cxxStandard != null) [
"-DCMAKE_CXX_STANDARD=${cxxStandard}"
];
nativeBuildInputs = [ cmake ];
meta = with lib; {
description = "Open-source collection of C++ code designed to augment the C++ standard library";
homepage = "https://abseil.io/";
license = licenses.asl20;
platforms = platforms.all;
maintainers = [ maintainers.andersk ];
# Requires LFS64 APIs. 202401 and later are fine.
broken = stdenv.hostPlatform.isMusl;
};
}

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
gtest,
static ? stdenv.hostPlatform.isStatic,
cxxStandard ? null,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "abseil-cpp";
version = "20240116.3";
src = fetchFromGitHub {
owner = "abseil";
repo = "abseil-cpp";
tag = finalAttrs.version;
hash = "sha256-VfC8kQtGlOew9iVKxQ7kIgqFMvHiDpSBhvyNOfneuwo=";
};
patches = [
# Fixes: clang++: error: unsupported option '-msse4.1' for target 'aarch64-apple-darwin'
# https://github.com/abseil/abseil-cpp/pull/1707
(fetchpatch {
name = "fix-compile-breakage-on-darwin";
url = "https://github.com/abseil/abseil-cpp/commit/6dee153242d7becebe026a9bed52f4114441719d.patch";
hash = "sha256-r6QnHPnwPwOE/hv4kLNA3FqNq2vU/QGmwAc5q0/q1cs=";
})
];
cmakeFlags = [
"-DABSL_BUILD_TEST_HELPERS=ON"
"-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
]
++ lib.optionals (cxxStandard != null) [
"-DCMAKE_CXX_STANDARD=${cxxStandard}"
];
strictDeps = true;
nativeBuildInputs = [ cmake ];
buildInputs = [ gtest ];
meta = {
description = "Open-source collection of C++ code designed to augment the C++ standard library";
homepage = "https://abseil.io/";
changelog = "https://github.com/abseil/abseil-cpp/releases/tag/${finalAttrs.version}";
license = lib.licenses.asl20;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.GaetanLepage ];
};
})

View File

@@ -0,0 +1,63 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
gtest,
static ? stdenv.hostPlatform.isStatic,
cxxStandard ? null,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "abseil-cpp";
version = "20240722.1";
src = fetchFromGitHub {
owner = "abseil";
repo = "abseil-cpp";
tag = finalAttrs.version;
hash = "sha256-ir4hG2VIPv3se7JfWqCM/siLqFEFkmhMW/IGCocy6Pc=";
};
patches = [
# Don't match -Wnon-virtual-dtor in the "flags are needed to suppress
# Needed to cleanly apply the #1738 fix below.
# https://github.com/abseil/abseil-cpp/issues/1737
(fetchpatch {
url = "https://github.com/abseil/abseil-cpp/commit/9cb5e5d15c142e5cc43a2c1db87c8e4e5b6d38a5.patch";
hash = "sha256-PTNmNJMk42Omwek0ackl4PjxifDP/+GaUitS60l+VB0=";
})
# Fix shell option group handling in pkgconfig files
# https://github.com/abseil/abseil-cpp/pull/1738
(fetchpatch {
url = "https://github.com/abseil/abseil-cpp/commit/bd0c9c58cac4463d96b574de3097422bb78215a8.patch";
hash = "sha256-fB9pvkyNBXoDKLrVaNwliqrWEPTa2Y6OJMe2xgl5IBc=";
})
];
cmakeFlags = [
"-DABSL_BUILD_TEST_HELPERS=ON"
"-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
]
++ lib.optionals (cxxStandard != null) [
"-DCMAKE_CXX_STANDARD=${cxxStandard}"
];
strictDeps = true;
nativeBuildInputs = [ cmake ];
buildInputs = [ gtest ];
meta = {
description = "Open-source collection of C++ code designed to augment the C++ standard library";
homepage = "https://abseil.io/";
changelog = "https://github.com/abseil/abseil-cpp/releases/tag/${finalAttrs.version}";
license = lib.licenses.asl20;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.GaetanLepage ];
};
})

View File

@@ -0,0 +1,12 @@
diff -ur a/absl/time/CMakeLists.txt b/absl/time/CMakeLists.txt
--- a/absl/time/CMakeLists.txt 1969-12-31 19:00:01.000000000 -0500
+++ b/absl/time/CMakeLists.txt 2023-10-30 21:50:32.639061785 -0400
@@ -55,7 +55,7 @@
)
if(APPLE)
- find_library(CoreFoundation CoreFoundation)
+ set(CoreFoundation "-framework CoreFoundation")
endif()
absl_cc_library(

View File

@@ -0,0 +1,105 @@
{
stdenv,
lib,
fetchFromGitLab,
unstableGitUpdater,
accounts-qt,
dbus-test-runner,
pkg-config,
qmake,
qtbase,
qtdeclarative,
qttools,
signond,
xvfb-run,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "accounts-qml-module";
version = "0.7-unstable-2023-10-28";
src = fetchFromGitLab {
owner = "accounts-sso";
repo = "accounts-qml-module";
rev = "05e79ebbbf3784a87f72b7be571070125c10dfe3";
hash = "sha256-ZpnkZauowLPBnO3DDDtG/x07XoQGVNqEF8AQB5TZK84=";
};
outputs = [
"out"
"doc"
];
postPatch = ''
substituteInPlace src/src.pro \
--replace '$$[QT_INSTALL_BINS]/qmlplugindump' 'qmlplugindump' \
--replace '$$[QT_INSTALL_QML]' '${placeholder "out"}/${qtbase.qtQmlPrefix}'
# Find qdoc
substituteInPlace doc/doc.pri \
--replace-fail 'QDOC = $$[QT_INSTALL_BINS]/qdoc' 'QDOC = qdoc'
# Don't install test binary
sed -i tests/tst_plugin.pro \
-e '/TARGET = tst_plugin/a INSTALLS -= target'
''
+ lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
sed -i accounts-qml-module.pro -e '/tests/d'
'';
# QMake can't find Qt modules in buildInputs
strictDeps = false;
nativeBuildInputs = [
pkg-config
qmake
qtdeclarative # qmlplugindump
qttools # qdoc
];
buildInputs = [
accounts-qt
qtbase
qtdeclarative
signond
];
nativeCheckInputs = [
dbus-test-runner
xvfb-run
];
dontWrapQtApps = true;
postConfigure = ''
make qmake_all
'';
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
preCheck = ''
# Needs xcb platform plugin
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
'';
preInstall = ''
# Same plugin needed here, re-export in case checks are disabled
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
'';
postFixup = ''
moveToOutput share/accounts-qml-module/doc $doc
'';
passthru.updateScript = unstableGitUpdater {
tagPrefix = "VERSION_";
};
meta = {
description = "QML bindings for libaccounts-qt + libsignon-qt";
homepage = "https://gitlab.com/accounts-sso/accounts-qml-module";
license = lib.licenses.lgpl21Only;
maintainers = with lib.maintainers; [ OPNA2608 ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,55 @@
{
stdenv,
lib,
fetchFromGitLab,
gitUpdater,
doxygen,
glib,
libaccounts-glib,
pkg-config,
qmake,
qtbase,
wrapQtAppsHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "accounts-qt";
version = "1.17";
# pinned to fork with Qt6 support
src = fetchFromGitLab {
owner = "accounts-sso";
repo = "libaccounts-qt";
rev = "refs/tags/VERSION_${finalAttrs.version}";
hash = "sha256-mPZgD4r7vlUP6wklvZVknGqTXZBckSOtNzK7p6e2qSA=";
};
propagatedBuildInputs = [
glib
libaccounts-glib
];
buildInputs = [ qtbase ];
nativeBuildInputs = [
doxygen
pkg-config
qmake
wrapQtAppsHook
];
# remove forbidden references to /build
preFixup = ''
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/bin/*
'';
passthru.updateScript = gitUpdater {
rev-prefix = "VERSION_";
};
meta = with lib; {
description = "Qt library for accessing the online accounts database";
mainProgram = "accountstest";
homepage = "https://gitlab.com/accounts-sso/libaccounts-qt";
license = licenses.lgpl21;
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchurl,
gettext,
attr,
}:
# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
stdenv.mkDerivation rec {
pname = "acl";
version = "2.3.2";
src = fetchurl {
url = "mirror://savannah/acl/acl-${version}.tar.gz";
hash = "sha256-XyvbrWKXB6p9hcYj+ZSqih0t7FWnPeUgW6wL9gWKL3w=";
};
outputs = [
"bin"
"dev"
"out"
"man"
"doc"
];
nativeBuildInputs = [ gettext ];
buildInputs = [ attr ];
postPatch = ''
patchShebangs .
'';
meta = with lib; {
inherit (attr.meta) platforms badPlatforms;
homepage = "https://savannah.nongnu.org/projects/acl";
description = "Library and tools for manipulating access control lists";
license = licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
mkDerivation,
fetchFromGitHub,
}:
mkDerivation {
pname = "1lab";
version = "unstable-2025-07-01";
src = fetchFromGitHub {
owner = "the1lab";
repo = "1lab";
rev = "e9c2ad2b3ba9cefad36e72cb9d732117c68ac862";
hash = "sha256-wKh77+xCdfMtnq9jMlpdnEptGO+/WVNlQFa1TDbdUGs=";
};
postPatch = ''
# We don't need anything in support; avoid installing LICENSE.agda
rm -rf support
# Remove verbosity options as they make Agda take longer and use more memory.
shopt -s globstar extglob
files=(src/**/*.@(agda|lagda.md))
sed -Ei '/OPTIONS/s/ -v ?[^ #]+//g' "''${files[@]}"
'';
meta = with lib; {
description = "Formalised, cross-linked reference resource for mathematics done in Homotopy Type Theory ";
homepage = "https://github.com/the1lab/1lab";
license = licenses.agpl3Only;
platforms = platforms.unix;
maintainers = with maintainers; [ ncfavier ];
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
mkDerivation,
fetchFromGitHub,
standard-library,
}:
mkDerivation rec {
version = "0.3.0";
pname = "agda-categories";
src = fetchFromGitHub {
owner = "agda";
repo = "agda-categories";
rev = "v${version}";
sha256 = "sha256-zPh6RFnky4KsnQx5Y/3FeYZ/jWK+hqJGNyCjEFPPHWQ=";
};
postPatch = ''
# Remove this once agda-categories incorporates this fix or once Agda's
# versioning system gets an overhaul in general. Right now there is no middle
# ground between "no version constraint" and "exact match down to patch". We
# do not want to need to change this postPatch directive on each minor
# version update of the stdlib, so we get rid of the version constraint
# altogether.
sed -Ei 's/standard-library-[0-9.]+/standard-library/' agda-categories.agda-lib
'';
buildInputs = [ standard-library ];
meta = with lib; {
inherit (src.meta) homepage;
description = "New Categories library";
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [
alexarice
turion
];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
mkDerivation,
fetchFromGitHub,
}:
mkDerivation {
version = "unstable-2024-08-22";
pname = "agda-prelude";
src = fetchFromGitHub {
owner = "UlfNorell";
repo = "agda-prelude";
rev = "4230566d3ae229b6a00258587651ac7bfd38d088";
hash = "sha256-ab+KojzRbkUTAFNH5OA78s0F5SUuXTbliai6badveg4=";
};
meta = with lib; {
homepage = "https://github.com/UlfNorell/agda-prelude";
description = "Programming library for Agda";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with maintainers; [
mudri
alexarice
turion
];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
mkDerivation,
haskellPackages,
}:
mkDerivation {
pname = "agda2hs-base";
inherit (haskellPackages.agda2hs) src version;
postUnpack = ''
sourceRoot="$sourceRoot/lib/base"
'';
libraryFile = "base.agda-lib";
meta = with lib; {
homepage = "https://github.com/agda/agda2hs";
description = "Standard library for compiling Agda code to readable Haskell";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with maintainers; [
wrvsrx
];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
mkDerivation,
fetchFromGitHub,
standard-library,
}:
mkDerivation rec {
pname = "agdarsec";
version = "0.4.1";
src = fetchFromGitHub {
owner = "gallais";
repo = "agdarsec";
rev = "v${version}";
sha256 = "02fqkycvicw6m2xsz8p01aq8n3gj2d2gyx8sgj15l46f8434fy0x";
};
buildInputs = [ standard-library ];
meta = with lib; {
homepage = "https://gallais.github.io/agdarsec/";
description = "Total Parser Combinators in Agda";
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ turion ];
broken = true;
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
mkDerivation,
fetchFromGitHub,
ghc,
cabal-install,
}:
mkDerivation {
pname = "cubical-mini";
version = "0.5-unstable-2025-06-13";
src = fetchFromGitHub {
repo = "cubical-mini";
owner = "cmcmA20";
rev = "1776874d13d0b811e6eeb70d0e5a52b4d2a978d2";
hash = "sha256-UxWOS+uzP9aAaMdSueA2CAuzWkImGAoKxroarcgpk+w=";
};
nativeBuildInputs = [
ghc
cabal-install
];
# Makefile uses `cabal run` which tries to write its default config to $HOME and download package
# lists. We need to create an empty config file to make cabal work offline.
buildPhase = ''
runHook preBuild
export HOME=$TMP
mkdir $HOME/.cabal
touch $HOME/.cabal/config
make
runHook postBuild
'';
meta = {
homepage = "https://github.com/cmcmA20/cubical-mini";
description = "Nonstandard library for Cubical Agda";
license = lib.licenses.agpl3Only;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ thelissimus ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
mkDerivation,
fetchFromGitHub,
}:
mkDerivation rec {
pname = "cubical";
version = "0.9";
src = fetchFromGitHub {
repo = "cubical";
owner = "agda";
rev = "v${version}";
hash = "sha256-Lmzofq2rKFmfsAoH3zIFB2QLeUhFmIO44JsF+dDrubw=";
};
meta = with lib; {
description = "Cubical type theory library for use with the Agda compiler";
homepage = src.meta.homepage;
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [
alexarice
ryanorendorff
ncfavier
phijor
];
};
}

View File

@@ -0,0 +1,31 @@
{
fetchFromGitHub,
lib,
mkDerivation,
standard-library,
}:
mkDerivation rec {
version = "0.5.0";
pname = "functional-linear-algebra";
buildInputs = [ standard-library ];
src = fetchFromGitHub {
repo = "functional-linear-algebra";
owner = "ryanorendorff";
rev = "v${version}";
sha256 = "sha256-3nme/eH4pY6bD0DkhL4Dj/Vp/WnZqkQtZTNk+n1oAyY=";
};
meta = with lib; {
homepage = "https://github.com/ryanorendorff/functional-linear-algebra";
description = ''
Formalizing linear algebra in Agda by representing matrices as functions
from one vector space to another.
'';
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ ryanorendorff ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
mkDerivation,
fetchFromGitHub,
standard-library,
}:
mkDerivation rec {
pname = "generic";
version = "0.1.0.2";
src = fetchFromGitHub {
owner = "effectfully";
repo = "Generic";
rev = "v${version}";
sha256 = "05igsd2gaj6h9bkqwp8llhvn4qvc5gmi03x4fnz096ba8m6x8s3n";
};
buildInputs = [
standard-library
];
preBuild = ''
echo "module Everything where" > Everything.agda
find src -name '*.agda' | sed -e 's/src\///;s/\//./g;s/\.agda$//;s/^/import /' >> Everything.agda
'';
meta = with lib; {
# Remove if a version compatible with agda 2.6.2 is made
broken = true;
description = "Library for doing generic programming in Agda";
homepage = src.meta.homepage;
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [
alexarice
turion
];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
mkDerivation,
fetchFromGitHub,
standard-library,
}:
mkDerivation rec {
pname = "generics";
version = "1.0.1";
src = fetchFromGitHub {
owner = "flupe";
repo = "generics";
rev = "v${version}";
sha256 = "sha256-B1eT6F0Dp2zto50ulf+K/KYMlMp8Pgc/tO9qkcqn+O8=";
};
buildInputs = [
standard-library
];
# Agda expects a single .agda-lib file.
preBuild = ''
rm tests.agda-lib
'';
meta = with lib; {
description = "Library for datatype-generic programming in Agda";
homepage = src.meta.homepage;
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ turion ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
mkDerivation,
fetchFromGitHub,
}:
mkDerivation rec {
version = "1.5.0";
pname = "iowa-stdlib";
src = fetchFromGitHub {
owner = "cedille";
repo = "ial";
rev = "v${version}";
sha256 = "0dlis6v6nzbscf713cmwlx8h9n2gxghci8y21qak3hp18gkxdp0g";
};
libraryFile = "";
libraryName = "IAL-1.3";
buildPhase = ''
patchShebangs find-deps.sh
make
'';
meta = {
homepage = "https://github.com/cedille/ial";
description = "Agda standard library developed at Iowa";
license = lib.licenses.free;
platforms = lib.platforms.unix;
# broken since Agda 2.6.1
broken = true;
maintainers = with lib.maintainers; [
alexarice
turion
];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
mkDerivation,
fetchFromGitHub,
nixosTests,
}:
mkDerivation rec {
pname = "standard-library";
version = "2.3";
src = fetchFromGitHub {
repo = "agda-stdlib";
owner = "agda";
rev = "v${version}";
hash = "sha256-JOeoek6OfyIk9vwTj5QUJU6LnRzwfiG0e0ysW6zbhZ8=";
};
passthru.tests = { inherit (nixosTests) agda; };
meta = with lib; {
homepage = "https://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary";
description = "Standard library for use with the Agda compiler";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with maintainers; [
jwiegley
mudri
alexarice
turion
];
};
}

View File

@@ -0,0 +1,80 @@
{
lib,
stdenv,
fetchurl,
autoconf,
automake,
libtool,
pkg-config,
freetype,
SDL,
libX11,
}:
stdenv.mkDerivation rec {
pname = "agg";
version = "2.5";
src = fetchurl {
url = "https://www.antigrain.com/agg-${version}.tar.gz";
sha256 = "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb";
};
nativeBuildInputs = [
pkg-config
autoconf
automake
libtool
];
buildInputs = [
freetype
SDL
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libX11
];
postPatch = ''
substituteInPlace include/agg_renderer_outline_aa.h \
--replace 'line_profile_aa& profile() {' 'const line_profile_aa& profile() {'
'';
# fix build with new automake, from Gentoo ebuild
preConfigure = ''
sed -i '/^AM_C_PROTOTYPES/d' configure.in
sh autogen.sh
'';
configureFlags = [
(lib.enableFeature stdenv.hostPlatform.isLinux "platform")
(lib.enableFeature (!stdenv.hostPlatform.isDarwin) "sdltest")
"--enable-examples=no"
]
++ lib.optionals stdenv.hostPlatform.isLinux [
"--x-includes=${lib.getDev libX11}/include"
"--x-libraries=${lib.getLib libX11}/lib"
];
NIX_CFLAGS_COMPILE = [ "-fpermissive" ];
# libtool --tag=CXX --mode=link g++ -g -O2 libexamples.la ../src/platform/X11/libaggplatformX11.la ../src/libagg.la -o alpha_mask2 alpha_mask2.o
# libtool: error: cannot find the library 'libexamples.la'
enableParallelBuilding = false;
meta = {
description = "High quality rendering engine for C++";
longDescription = ''
Anti-Grain Geometry (AGG) is an Open Source, free of charge
graphic library, written in industrially standard C++. The
terms and conditions of use AGG are described on The License
page. AGG doesn't depend on any graphic API or technology.
Basically, you can think of AGG as of a rendering engine that
produces pixel images in memory from some vectorial data. But
of course, AGG can do much more than that.
'';
license = lib.licenses.gpl2Plus;
homepage = "http://www.antigrain.com/";
platforms = lib.platforms.unix;
hydraPlatforms = lib.platforms.linux; # build hangs on both Darwin platforms, needs investigation
};
}

View File

@@ -0,0 +1,141 @@
{
lib,
alsa-lib,
cmake,
enet,
fetchFromGitHub,
fetchpatch2,
fixDarwinDylibNames,
flac,
freetype,
gitUpdater,
gtk3,
libGL,
libGLU,
libjpeg,
libpng,
libpthreadstubs,
libpulseaudio,
libtheora,
libvorbis,
libwebp,
libX11,
libXcursor,
libXdmcp,
libXext,
libXfixes,
libXi,
libXpm,
libXt,
libXxf86dga,
libXxf86misc,
libXxf86vm,
openal,
physfs,
pkg-config,
stdenv,
texinfo,
xorgproto,
zlib,
# https://github.com/liballeg/allegro5/blob/master/README_sdl.txt
useSDL ? false,
sdl2-compat ? null,
}:
assert useSDL -> sdl2-compat != null;
stdenv.mkDerivation rec {
pname = "allegro";
version = "5.2.10.1";
src = fetchFromGitHub {
owner = "liballeg";
repo = "allegro5";
rev = version;
sha256 = "sha256-agE3K+6VhhG/LO52fiesCsOq1fNYVRhdW7aKdPCbTOo=";
};
patches = [
(fetchpatch2 {
name = "Bump-CMake-minimum-version-to-3.5";
url = "https://github.com/liballeg/allegro5/commit/6e93fcaabaafd81701f4cd1b74f4b69dd598bc9b.patch?full_index=1";
hash = "sha256-IEnn66bS2m6MVFCNf341yLtd7jTl2gflL5EFJFmbEt4=";
})
];
nativeBuildInputs = [
cmake
pkg-config
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
fixDarwinDylibNames
];
buildInputs = [
enet
flac
freetype
gtk3
libGL
libGLU
libjpeg
libpng
libtheora
libvorbis
libwebp
openal
physfs
texinfo
zlib
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libpthreadstubs
libpulseaudio
libX11
libXcursor
libXdmcp
libXext
libXfixes
libXi
libXpm
libXt
libXxf86dga
libXxf86misc
libXxf86vm
xorgproto
]
++ lib.optionals useSDL [
sdl2-compat
];
postPatch = ''
sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt "src/"*.c
sed -e 's@Kernel/IOKit/hidsystem/IOHIDUsageTables.h@IOKit/hid/IOHIDUsageTables.h@g' -i include/allegro5/platform/alosx.h
sed -e 's@OpenAL/@AL/@g' -i addons/audio/openal.c
'';
cmakeFlags = [
"-DCMAKE_SKIP_RPATH=ON"
]
++ lib.optionals useSDL [
"ALLEGRO_SDL=ON"
];
outputs = [
"out"
"dev"
];
strictDeps = true;
passthru.updateScript = gitUpdater { };
meta = with lib; {
description = "Game programming library";
homepage = "https://liballeg.org/";
license = licenses.zlib;
maintainers = [ maintainers.raskin ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
fetchurl,
texinfo,
libXext,
xorgproto,
libX11,
libXpm,
libXt,
libXcursor,
alsa-lib,
cmake,
pkg-config,
zlib,
libpng,
libvorbis,
libXxf86dga,
libXxf86misc,
libXxf86vm,
openal,
libGLU,
libGL,
}:
stdenv.mkDerivation rec {
pname = "allegro";
version = "4.4.3.1";
src = fetchurl {
url = "https://github.com/liballeg/allegro5/releases/download/${version}/allegro-${version}.tar.gz";
sha256 = "1m6lz35nk07dli26kkwz3wa50jsrxs1kb6w1nj14a911l34xn6gc";
};
patches = [
./nix-unstable-sandbox-fix.patch
./encoding.patch
];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
texinfo
libXext
xorgproto
libX11
libXpm
libXt
libXcursor
alsa-lib
zlib
libpng
libvorbis
libXxf86dga
libXxf86misc
libXxf86vm
openal
libGLU
libGL
];
hardeningDisable = [ "format" ];
cmakeFlags = [
"-DCMAKE_SKIP_RPATH=ON"
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
];
meta = with lib; {
description = "Game programming library";
homepage = "https://liballeg.org/";
license = licenses.giftware;
maintainers = [ maintainers.raskin ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,10 @@
--- allegro-4.4.3/docs/src/allegro._tx.orig 2019-02-02 20:28:46.000000000 +0100
+++ allegro-4.4.3/docs/src/allegro._tx 2019-11-04 11:12:39.352699777 +0100
@@ -23,6 +23,7 @@
@man_shortdesc_force1=allegro
@man_shortdesc_force2=Allegro game programming library.
@$\input texinfo
+@$@documentencoding ISO-8859-1
@$@setfilename allegro.inf
@$@settitle Allegro Manual
@$@setchapternewpage odd

View File

@@ -0,0 +1,13 @@
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 32ed053..73ba87f 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -72,7 +72,7 @@ foreach(page ${DOC_SRCS})
string(REPLACE "._tx" "" basename ${basename})
set(page ${CMAKE_CURRENT_SOURCE_DIR}/${page})
- if(${page} MATCHES "/build/")
+ if(${page} MATCHES ".+/build/")
set(txt_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.txt)
set(html_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.html)
else()

View File

@@ -0,0 +1,158 @@
{
lib,
stdenv,
buildPackages,
replaceVars,
fetchFromGitHub,
fetchpatch,
meson,
mesonEmulatorHook,
appstream,
ninja,
pkg-config,
cmake,
gettext,
xmlto,
docbook-xsl-nons,
docbook_xml_dtd_45,
libxslt,
libstemmer,
glib,
xapian,
libxml2,
libxmlb,
libyaml,
gobject-introspection,
itstool,
gperf,
vala,
curl,
cairo,
gdk-pixbuf,
pango,
librsvg,
systemd,
nixosTests,
testers,
withIntrospection ?
lib.meta.availableOn stdenv.hostPlatform gobject-introspection
&& stdenv.hostPlatform.emulatorAvailable buildPackages,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "appstream";
version = "1.0.4";
outputs = [
"out"
"dev"
"installedTests"
];
src = fetchFromGitHub {
owner = "ximion";
repo = "appstream";
rev = "v${finalAttrs.version}";
sha256 = "sha256-UnSJcXH0yWK/dPKgbOx9x3iJjKcKNYFkD2Qs5c3FtM8=";
};
patches = [
# Fix hardcoded paths
(replaceVars ./fix-paths.patch {
libstemmer_includedir = "${lib.getDev libstemmer}/include";
})
# Allow installing installed tests to a separate output.
./installed-tests-path.patch
(fetchpatch {
name = "static.patch";
url = "https://github.com/ximion/appstream/commit/90675d8853188f65897d2453346cb0acd531b58f.patch";
hash = "sha256-d3h5h7B/MP3Sun5YwYCqMHcw4PMMwg1YS/S9vsMzkQ4=";
})
];
strictDeps = true;
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
meson
ninja
pkg-config
cmake
gettext
libxslt
xmlto
docbook-xsl-nons
docbook_xml_dtd_45
glib
itstool
gperf
]
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
]
++ lib.optionals (!lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform) [
appstream
]
++ lib.optionals withIntrospection [
gobject-introspection
vala
];
buildInputs = [
libstemmer
glib
xapian
libxml2
libxmlb
libyaml
curl
cairo
gdk-pixbuf
pango
librsvg
]
++ lib.optionals withSystemd [
systemd
];
mesonFlags = [
"-Dapidocs=false"
"-Dc_args=-Wno-error=missing-include-dirs"
"-Ddocs=false"
"-Dvapi=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
"-Dcompose=true"
(lib.mesonBool "gir" withIntrospection)
]
++ lib.optionals (!withSystemd) [
"-Dsystemd=false"
];
passthru.tests = {
installed-tests = nixosTests.installed-tests.appstream;
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
};
meta = with lib; {
description = "Software metadata handling library";
longDescription = ''
AppStream is a cross-distro effort for building Software-Center applications
and enhancing metadata provided by software components. It provides
specifications for meta-information which is shipped by upstream projects and
can be consumed by other software.
'';
homepage = "https://www.freedesktop.org/wiki/Distributions/AppStream/";
license = licenses.lgpl21Plus;
mainProgram = "appstreamcli";
platforms = platforms.unix;
pkgConfigModules = [ "appstream" ];
};
})

View File

@@ -0,0 +1,17 @@
diff --git a/meson.build b/meson.build
index 5e7f57d5..3fe89e8c 100644
--- a/meson.build
+++ b/meson.build
@@ -171,10 +171,10 @@ endif
stemmer_inc_dirs = include_directories()
if get_option('stemming')
stemmer_lib = cc.find_library('stemmer', required: true)
- stemmer_inc_dirs = include_directories(['/usr/include'])
+ stemmer_inc_dirs = include_directories(['@libstemmer_includedir@'])
if not cc.has_header('libstemmer.h')
if cc.has_header('libstemmer/libstemmer.h')
- stemmer_inc_dirs = include_directories('/usr/include/libstemmer')
+ stemmer_inc_dirs = include_directories('@libstemmer_includedir@/libstemmer')
else
error('Unable to find Snowball header "libstemmer.h". Please ensure libstemmer/Snowball is installed properly in order to continue.')
endif

View File

@@ -0,0 +1,27 @@
diff --git a/meson_options.txt b/meson_options.txt
index 8dd8e0c7..e2a30b06 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -44,6 +44,11 @@ option('install-docs',
value : true,
description : 'Install documentation for API and specification'
)
+option('installed_test_prefix',
+ type : 'string',
+ value : '',
+ description : 'Prefix for installed tests'
+)
#
# For development
diff --git a/tests/installed-tests/meson.build b/tests/installed-tests/meson.build
index 405820ce..f592a753 100644
--- a/tests/installed-tests/meson.build
+++ b/tests/installed-tests/meson.build
@@ -10,5 +10,5 @@ configure_file(
output : 'metainfo-validate.test',
configuration : itconf,
install: true,
- install_dir: join_paths('share', 'installed-tests', 'appstream'),
+ install_dir: join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', 'appstream'),
)

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
appstream,
qtbase,
qttools,
nixosTests,
}:
# TODO: look into using the libraries from the regular appstream derivation as we keep duplicates here
let
qtSuffix = lib.optionalString (lib.versions.major qtbase.version == "5") "5";
in
stdenv.mkDerivation {
pname = "appstream-qt";
inherit (appstream) version src;
outputs = [
"out"
"dev"
"installedTests"
];
buildInputs = appstream.buildInputs ++ [
appstream
qtbase
];
nativeBuildInputs = appstream.nativeBuildInputs ++ [ qttools ];
mesonFlags = appstream.mesonFlags ++ [
(lib.mesonBool "qt" true)
(lib.mesonOption "qt-versions" (lib.versions.major qtbase.version))
];
patches = appstream.patches;
dontWrapQtApps = true;
# AppStreamQt tries to be relocatable, in hacky cmake ways that generally fail
# horribly on NixOS. Just hardcode the paths.
postFixup = ''
sed -i "$dev/lib/cmake/AppStreamQt${qtSuffix}/AppStreamQt${qtSuffix}Config.cmake" \
-e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${PACKAGE_PREFIX_DIR}@$dev@"
sed -i "$dev/lib/cmake/AppStreamQt${qtSuffix}/AppStreamQt${qtSuffix}Config.cmake" \
-e "/IMPORTED_LOCATION/ s@\''${PACKAGE_PREFIX_DIR}@$out@"
'';
passthru = appstream.passthru // {
tests = {
installed-tests = nixosTests.installed-tests.appstream-qt;
};
};
meta = appstream.meta // {
description = "Software metadata handling library - Qt";
};
}

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchurl,
gmp,
gwenhywfar,
libtool,
libxml2,
libxslt,
pkg-config,
gettext,
xmlsec,
zlib,
}:
let
inherit ((import ./sources.nix).aqbanking) hash releaseId version;
in
stdenv.mkDerivation rec {
pname = "aqbanking";
inherit version;
src = fetchurl {
url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/aqbanking-${version}.tar.gz";
inherit hash;
};
# Set the include dir explicitly, this fixes a build error when building
# kmymoney because otherwise the includedir is overwritten by gwenhywfar's
# cmake file
postPatch = ''
sed -i '/^set_and_check(AQBANKING_INCLUDE_DIRS "@aqbanking_headerdir@")/i set_and_check(includedir "@includedir@")' aqbanking-config.cmake.in
sed -i -e '/^aqbanking_plugindir=/ {
c aqbanking_plugindir="\''${libdir}/gwenhywfar/plugins"
}' configure
'';
buildInputs = [
gmp
gwenhywfar
libtool
libxml2
libxslt
xmlsec
zlib
];
nativeBuildInputs = [
pkg-config
gettext
];
meta = with lib; {
description = "Interface to banking tasks, file formats and country information";
homepage = "https://www.aquamaniac.de/rdm/";
hydraPlatforms = [ ];
license = licenses.gpl2Plus;
maintainers = [ ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,96 @@
{
lib,
stdenv,
fetchurl,
gnutls,
openssl,
libgcrypt,
libgpg-error,
pkg-config,
gettext,
which,
# GUI support
gtk3,
qt5,
pluginSearchPaths ? [
"/run/current-system/sw/lib/gwenhywfar/plugins"
".nix-profile/lib/gwenhywfar/plugins"
],
}:
let
inherit ((import ./sources.nix).gwenhywfar) hash releaseId version;
in
stdenv.mkDerivation rec {
pname = "gwenhywfar";
inherit version;
src = fetchurl {
url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/gwenhywfar-${version}.tar.gz";
inherit hash;
};
configureFlags = [
"--with-openssl-includes=${openssl.dev}/include"
"--with-openssl-libs=${lib.getLib openssl}/lib"
];
preConfigure = ''
configureFlagsArray+=("--with-guis=gtk3 qt5")
'';
postPatch =
let
isRelative = path: builtins.substring 0 1 path != "/";
mkSearchPath =
path:
''
p; g; s,\<PLUGINDIR\>,"${path}",g;
''
+ lib.optionalString (isRelative path) ''
s/AddPath(\(.*\));/AddRelPath(\1, GWEN_PathManager_RelModeHome);/g
'';
in
''
sed -i -e '/GWEN_PathManager_DefinePath.*GWEN_PM_PLUGINDIR/,/^#endif/ {
/^#if/,/^#endif/ {
H; /^#endif/ {
${lib.concatMapStrings mkSearchPath pluginSearchPaths}
}
}
}' src/gwenhywfar.c
# Strip off the effective SO version from the path so that for example
# "lib/gwenhywfar/plugins/60" becomes just "lib/gwenhywfar/plugins".
sed -i -e '/^gwenhywfar_plugindir=/s,/\''${GWENHYWFAR_SO_EFFECTIVE},,' \
configure
'';
nativeBuildInputs = [
pkg-config
gettext
which
];
buildInputs = [
gtk3
qt5.qtbase
gnutls
openssl
libgcrypt
libgpg-error
];
dontWrapQtApps = true;
meta = with lib; {
description = "OS abstraction functions used by aqbanking and related tools";
homepage = "https://www.aquamaniac.de/rdm/projects/gwenhywfar";
license = licenses.lgpl21Plus;
maintainers = [ ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
gwenhywfar,
pcsclite,
zlib,
}:
let
inherit ((import ./sources.nix).libchipcard) hash releaseId version;
in
stdenv.mkDerivation rec {
pname = "libchipcard";
inherit version;
src = fetchurl {
url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/libchipcard-${version}.tar.gz";
inherit hash;
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
gwenhywfar
pcsclite
zlib
];
makeFlags = [ "crypttokenplugindir=$(out)/lib/gwenhywfar/plugins/ct" ];
meta = with lib; {
description = "Library for access to chipcards";
homepage = "https://www.aquamaniac.de/rdm/projects/libchipcard";
license = licenses.lgpl21;
maintainers = with maintainers; [ aszlig ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,22 @@
{
# https://www.aquamaniac.de/rdm/projects/gwenhywfar/files
gwenhywfar = {
version = "5.12.1";
hash = "sha256-0YhEi5w6lwlyFCLuATS50Ld5CrdRQFjZngQ5njlGXdo=";
releaseId = "533";
};
# https://www.aquamaniac.de/rdm/projects/libchipcard/files
libchipcard = {
version = "5.1.6";
hash = "sha256-bAf1J0F/dWIHT5kBLaTRHrTbr9M/SeZrRCzNbjuM/SA=";
releaseId = "382";
};
# https://www.aquamaniac.de/rdm/projects/aqbanking/files
aqbanking = {
version = "6.6.1";
hash = "sha256-MlD6bYk/gW0pwZrzX+X8y3TAgOIXU/2eUleaeS3UhWc=";
releaseId = "535";
};
}

View File

@@ -0,0 +1,9 @@
{ callPackage, ... }@args:
callPackage ./generic.nix (
args
// {
version = "1.10.8";
sha256 = "0jgdl4fxw0hwy768rl3lhdc0czz7ak7czf3dg10j21pdpfpfvpi6";
}
)

View File

@@ -0,0 +1,9 @@
{ callPackage, ... }@args:
callPackage ./generic.nix (
args
// {
version = "1.24.0";
sha256 = "sha256-iXaBLCShGGAPb88HGiBgZjCmmv5MCr7jsN6lKOaCxYU=";
}
)

View File

@@ -0,0 +1,32 @@
{
lib,
stdenv,
fetchurl,
boost,
openssl,
version,
sha256,
...
}:
stdenv.mkDerivation {
pname = "asio";
inherit version;
src = fetchurl {
url = "mirror://sourceforge/asio/asio-${version}.tar.bz2";
inherit sha256;
};
propagatedBuildInputs = [ boost ];
buildInputs = [ openssl ];
meta = with lib; {
homepage = "http://asio.sourceforge.net/";
description = "Cross-platform C++ library for network and low-level I/O programming";
license = licenses.boost;
broken = stdenv.hostPlatform.isDarwin && lib.versionOlder version "1.16.1";
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,38 @@
# Create a derivation that contains aspell and selected dictionaries.
# Composition is done using `pkgs.buildEnv`.
# Beware of that `ASPELL_CONF` used by this derivation is not always
# respected by libaspell (#28815) and in some cases, when used as
# dependency by another derivation, the passed dictionaries will be
# missing. However, invoking aspell directly should be fine.
{
aspell,
aspellDicts,
makeWrapper,
buildEnv,
}:
f:
let
# Dictionaries we want
dicts = f aspellDicts;
in
buildEnv {
name = "aspell-env";
nativeBuildInputs = [ makeWrapper ];
paths = [ aspell ] ++ dicts;
postBuild = ''
# Construct wrappers in /bin
unlink "$out/bin"
mkdir -p "$out/bin"
pushd "${aspell}/bin"
for prg in *; do
if [ -f "$prg" ]; then
makeWrapper "${aspell}/bin/$prg" "$out/bin/$prg" --set ASPELL_CONF "dict-dir $out/lib/aspell"
fi
done
popd
'';
}

View File

@@ -0,0 +1,18 @@
--- interfaces/cc/aspell.h 2013-10-13 20:29:33.000000000 +0200
+++ interfaces/cc/aspell.h 2013-10-13 20:30:01.000000000 +0200
@@ -237,6 +237,7 @@
/******************************** errors ********************************/
+#ifndef __cplusplus
extern const struct AspellErrorInfo * const aerror_other;
extern const struct AspellErrorInfo * const aerror_operation_not_supported;
extern const struct AspellErrorInfo * const aerror_cant_copy;
@@ -322,6 +323,7 @@
extern const struct AspellErrorInfo * const aerror_bad_magic;
extern const struct AspellErrorInfo * const aerror_expression;
extern const struct AspellErrorInfo * const aerror_invalid_expression;
+#endif
/******************************* speller *******************************/

View File

@@ -0,0 +1,38 @@
diff --git a/common/info.cpp b/common/info.cpp
index 8291cc7..6216326 100644
--- a/common/info.cpp
+++ b/common/info.cpp
@@ -36,6 +36,7 @@
#include "strtonum.hpp"
#include "lock.hpp"
#include "string_map.hpp"
+#include "file_util.hpp"
#include "gettext.h"
@@ -495,6 +496,25 @@ namespace acommon {
lst.clear();
lst.add(config->retrieve("data-dir"));
lst.add(config->retrieve("dict-dir"));
+ if (config->lookup("data-dir") == NULL && config->lookup("dict-dir") == NULL) {
+ const char* cprofiles = getenv("NIX_PROFILES");
+ if (cprofiles != NULL) {
+ char* profiles = strdup(cprofiles);
+ char* profile = profiles;
+ char* end = profile;
+ while (*end != '\0') {
+ if (*end == ' ') {
+ *end = '\0';
+ lst.add(add_possible_dir(profile, "lib/aspell"));
+ profile = ++end;
+ } else {
+ ++end;
+ }
+ }
+ lst.add(add_possible_dir(profile, "lib/aspell"));
+ free(profiles);
+ }
+ }
}
DictExt::DictExt(ModuleInfo * m, const char * e)

View File

@@ -0,0 +1,98 @@
{
lib,
stdenv,
fetchpatch,
fetchurl,
fetchzip,
perl,
ncurses,
# for tests
aspell,
glibc,
runCommand,
searchNixProfiles ? true,
}:
let
# Source for u-deva.cmap and u-deva.cset: use the Marathi
# dictionary like Debian does.
devaMapsSource = fetchzip {
name = "aspell-u-deva";
url = "https://ftp.gnu.org/gnu/aspell/dict/mr/aspell6-mr-0.10-0.tar.bz2";
sha256 = "1v8cdl8x2j1d4vbvsq1xrqys69bbccd6mi03fywrhkrrljviyri1";
};
in
stdenv.mkDerivation rec {
pname = "aspell";
version = "0.60.8.1";
src = fetchurl {
url = "mirror://gnu/aspell/aspell-${version}.tar.gz";
hash = "sha256-1toSs01C1Ff6YE5DWtSEp0su/80SD/QKzWuz+yiH0hs=";
};
patches = [
# fix gcc-15 / clang-19 build. can remove on next update
(fetchpatch {
name = "fix-gcc-15-build.patch";
url = "https://github.com/GNUAspell/aspell/commit/ee6cbb12ff36a1e6618d7388a78dd4e0a2b44041.patch";
hash = "sha256-rW1FcfARdtT4wX+zGd2x/1K8zRp9JZhdR/zRd8RwPZA=";
})
]
++ lib.optional searchNixProfiles ./data-dirs-from-nix-profiles.patch;
postPatch = ''
patch interfaces/cc/aspell.h < ${./clang.patch}
'';
nativeBuildInputs = [ perl ];
buildInputs = [
ncurses
perl
];
doCheck = true;
preConfigure = ''
configureFlagsArray=(
--enable-pkglibdir=$out/lib/aspell
--enable-pkgdatadir=$out/lib/aspell
);
'';
# Include u-deva.cmap and u-deva.cset in the aspell package
# to avoid conflict between 'mr' and 'hi' dictionaries as they
# both include those files.
postInstall = ''
cp ${devaMapsSource}/u-deva.{cmap,cset} $out/lib/aspell/
'';
passthru.tests = {
uses-curses =
runCommand "aspell-curses"
{
buildInputs = [ glibc ];
}
''
if ! ldd ${aspell}/bin/aspell | grep -q ${ncurses}
then
echo "Test failure: It does not look like aspell picked up the curses dependency."
exit 1
fi
touch $out
'';
};
meta = {
description = "Spell checker for many languages";
homepage = "http://aspell.net/";
license = lib.licenses.lgpl2Plus;
maintainers = [ ];
platforms = with lib.platforms; all;
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,84 @@
{
lib,
stdenv,
source, # this is ./source.nix
glib,
wrapGAppsHook3,
gobject-introspection,
meson,
pkg-config,
ninja,
vala,
wayland,
wayland-scanner,
python3,
}:
let
cleanArgs = lib.flip removeAttrs [
"name"
"sourceRoot"
"nativeBuildInputs"
"buildInputs"
"website-path"
"meta"
];
buildAstalModule =
{
name,
sourceRoot ? "lib/${name}",
nativeBuildInputs ? [ ],
buildInputs ? [ ],
website-path ? name,
meta ? { },
...
}@args:
stdenv.mkDerivation (
finalAttrs:
cleanArgs args
// {
pname = "astal-${name}";
inherit (source) version;
__structuredAttrs = true;
strictDeps = true;
src = source;
sourceRoot = "${finalAttrs.src.name}/${sourceRoot}";
nativeBuildInputs = nativeBuildInputs ++ [
wrapGAppsHook3
gobject-introspection
meson
pkg-config
ninja
vala
wayland
wayland-scanner
python3
];
buildInputs = [ glib ] ++ buildInputs;
meta = {
homepage = "https://aylur.github.io/astal/guide/libraries/${website-path}";
license = lib.licenses.lgpl21;
maintainers = with lib.maintainers; [ perchun ];
platforms = [
"aarch64-linux"
"x86_64-linux"
];
}
// meta;
}
);
in
args:
# to support (finalAttrs: {...})
if builtins.typeOf args == "function" then
buildAstalModule (lib.fix args)
else
buildAstalModule args

View File

@@ -0,0 +1,24 @@
{ wireplumber }:
self: {
source = self.callPackage ./source.nix { };
buildAstalModule = self.callPackage ./buildAstalModule.nix { };
apps = self.callPackage ./modules/apps.nix { };
astal3 = self.callPackage ./modules/astal3.nix { };
astal4 = self.callPackage ./modules/astal4.nix { };
auth = self.callPackage ./modules/auth.nix { };
battery = self.callPackage ./modules/battery.nix { };
bluetooth = self.callPackage ./modules/bluetooth.nix { };
cava = self.callPackage ./modules/cava.nix { };
gjs = self.callPackage ./modules/gjs.nix { };
greet = self.callPackage ./modules/greet.nix { };
hyprland = self.callPackage ./modules/hyprland.nix { };
io = self.callPackage ./modules/io.nix { };
mpris = self.callPackage ./modules/mpris.nix { };
network = self.callPackage ./modules/network.nix { };
notifd = self.callPackage ./modules/notifd.nix { };
powerprofiles = self.callPackage ./modules/powerprofiles.nix { };
river = self.callPackage ./modules/river.nix { };
tray = self.callPackage ./modules/tray.nix { };
wireplumber = self.callPackage ./modules/wireplumber.nix { inherit wireplumber; };
}

View File

@@ -0,0 +1,9 @@
{
buildAstalModule,
json-glib,
}:
buildAstalModule {
name = "apps";
buildInputs = [ json-glib ];
meta.description = "Astal module for application query";
}

View File

@@ -0,0 +1,16 @@
{
buildAstalModule,
gtk3,
gtk-layer-shell,
io,
}:
buildAstalModule {
name = "astal3";
sourceRoot = "lib/astal/gtk3";
buildInputs = [ io ];
propagatedBuildInputs = [
gtk3
gtk-layer-shell
];
meta.description = "Astal module for GTK3 widgets";
}

View File

@@ -0,0 +1,16 @@
{
buildAstalModule,
gtk4,
gtk4-layer-shell,
io,
}:
buildAstalModule {
name = "astal4";
sourceRoot = "lib/astal/gtk4";
buildInputs = [
io
gtk4
gtk4-layer-shell
];
meta.description = "Astal module for GTK4 widgets";
}

View File

@@ -0,0 +1,9 @@
{
buildAstalModule,
pam,
}:
buildAstalModule {
name = "auth";
buildInputs = [ pam ];
meta.description = "Astal module for authentication using pam";
}

View File

@@ -0,0 +1,9 @@
{
buildAstalModule,
json-glib,
}:
buildAstalModule {
name = "battery";
buildInputs = [ json-glib ];
meta.description = "Astal module for upowerd devices (DBus proxy)";
}

View File

@@ -0,0 +1,5 @@
{ buildAstalModule }:
buildAstalModule {
name = "bluetooth";
meta.description = "Astal module for bluez using DBus";
}

View File

@@ -0,0 +1,13 @@
{
buildAstalModule,
libcava,
fftw,
}:
buildAstalModule {
name = "cava";
buildInputs = [
libcava
fftw
];
meta.description = "Astal module for audio visualization using cava";
}

View File

@@ -0,0 +1,27 @@
{
buildAstalModule,
astal3,
io,
meson,
ninja,
pkg-config,
}:
(buildAstalModule {
name = "gjs";
sourceRoot = "lang/gjs";
meta.description = "Astal module for GJS";
}).overrideAttrs
{
# Remove all unused here inputs
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
astal3
io
];
propagatedBuildInputs = [ ];
}

View File

@@ -0,0 +1,6 @@
{ buildAstalModule, json-glib }:
buildAstalModule {
name = "greet";
buildInputs = [ json-glib ];
meta.description = "Astal module for greetd using IPC";
}

View File

@@ -0,0 +1,6 @@
{ buildAstalModule, json-glib }:
buildAstalModule {
name = "hyprland";
buildInputs = [ json-glib ];
meta.description = "Astal module for Hyprland using IPC";
}

View File

@@ -0,0 +1,6 @@
{ buildAstalModule }:
buildAstalModule {
name = "io";
sourceRoot = "lib/astal/io";
meta.description = "Astal core library";
}

View File

@@ -0,0 +1,13 @@
{
buildAstalModule,
gvfs,
json-glib,
}:
buildAstalModule {
name = "mpris";
buildInputs = [
gvfs
json-glib
];
meta.description = "Astal module for mpris players";
}

View File

@@ -0,0 +1,6 @@
{ buildAstalModule, networkmanager }:
buildAstalModule {
name = "network";
buildInputs = [ networkmanager ];
meta.description = "Astal module for NetworkManager";
}

View File

@@ -0,0 +1,13 @@
{
buildAstalModule,
json-glib,
gdk-pixbuf,
}:
buildAstalModule {
name = "notifd";
buildInputs = [
json-glib
gdk-pixbuf
];
meta.description = "Astal module for notification daemon";
}

View File

@@ -0,0 +1,6 @@
{ buildAstalModule, json-glib }:
buildAstalModule {
name = "powerprofiles";
buildInputs = [ json-glib ];
meta.description = "Astal module for upowerd profiles using DBus";
}

View File

@@ -0,0 +1,12 @@
{ buildAstalModule, json-glib }:
buildAstalModule {
name = "river";
buildInputs = [ json-glib ];
meta.description = "Astal module for River using IPC";
postUnpack = ''
rm -rf $sourceRoot/subprojects
mkdir -p $sourceRoot/subprojects
cp -r --remove-destination $src/lib/wayland-glib $sourceRoot/subprojects/wayland-glib
'';
}

View File

@@ -0,0 +1,13 @@
{
buildAstalModule,
json-glib,
appmenu-glib-translator,
}:
buildAstalModule {
name = "tray";
buildInputs = [
json-glib
appmenu-glib-translator
];
meta.description = "Astal module for StatusNotifierItem";
}

View File

@@ -0,0 +1,6 @@
{ buildAstalModule, wireplumber }:
buildAstalModule {
name = "wireplumber";
buildInputs = [ wireplumber ];
meta.description = "Astal module for wireplumber";
}

View File

@@ -0,0 +1,36 @@
{
lib,
nix-update-script,
fetchFromGitHub,
}:
let
originalDrv = fetchFromGitHub {
owner = "Aylur";
repo = "astal";
rev = "12c15b44608422e494c387aba6adc1ab6315d925";
hash = "sha256-EfTrJse33t3RP//DqESkTMCpMSdIi/wxxfa12+eP5jo=";
};
in
originalDrv.overrideAttrs (
final: prev: {
name = "${final.pname}-${final.version}"; # fetchFromGitHub already defines name
pname = "astal-source";
version = "0-unstable-2025-10-05";
meta = prev.meta // {
description = "Building blocks for creating custom desktop shells (source)";
longDescription = ''
Please don't use this package directly, use one of subpackages in
`astal` namespace. This package is just a `fetchFromGitHub`, which is
reused between all subpackages.
'';
maintainers = with lib.maintainers; [ perchun ];
platforms = lib.platforms.linux;
};
passthru = prev.passthru // {
updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
src = originalDrv;
};
}
)

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchurl,
atk,
glibmm_2_68,
pkg-config,
gnome,
meson,
ninja,
python3,
}:
stdenv.mkDerivation rec {
pname = "atkmm";
version = "2.36.3";
src = fetchurl {
url = "mirror://gnome/sources/atkmm/${lib.versions.majorMinor version}/atkmm-${version}.tar.xz";
sha256 = "sha256-bsJk6qDE3grbcgLGABcL3pp/vk1Ga/vpQOr3+qpsWXQ=";
};
outputs = [
"out"
"dev"
];
propagatedBuildInputs = [
atk
glibmm_2_68
];
nativeBuildInputs = [
pkg-config
meson
ninja
python3
];
doCheck = true;
passthru = {
updateScript = gnome.updateScript {
attrPath = "atkmm_2_36";
packageName = "atkmm";
versionPolicy = "odd-unstable";
};
};
meta = {
description = "C++ wrappers for ATK accessibility toolkit";
license = lib.licenses.lgpl21Plus;
homepage = "https://gtkmm.org";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchurl,
atk,
glibmm,
pkg-config,
gnome,
meson,
ninja,
python3,
}:
stdenv.mkDerivation rec {
pname = "atkmm";
version = "2.28.4";
src = fetchurl {
url = "mirror://gnome/sources/atkmm/${lib.versions.majorMinor version}/atkmm-${version}.tar.xz";
sha256 = "sha256-ChQqgSj4PAAe+4AU7kY+mnZgVO+EaGr5UxNeBNKP2rM=";
};
outputs = [
"out"
"dev"
];
propagatedBuildInputs = [
atk
glibmm
];
nativeBuildInputs = [
pkg-config
meson
python3
ninja
];
doCheck = true;
passthru = {
updateScript = gnome.updateScript {
packageName = "atkmm";
versionPolicy = "odd-unstable";
freeze = true;
};
};
meta = {
description = "C++ wrappers for ATK accessibility toolkit";
license = lib.licenses.lgpl21Plus;
homepage = "https://gtkmm.org";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchurl,
gettext,
}:
# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
stdenv.mkDerivation rec {
pname = "attr";
version = "2.5.2";
src = fetchurl {
url = "mirror://savannah/attr/attr-${version}.tar.gz";
sha256 = "sha256-Ob9nRS+kHQlIwhl2AQU/SLPXigKTiXNDMqYwmmgMbIc=";
};
outputs = [
"bin"
"dev"
"out"
"man"
"doc"
];
nativeBuildInputs = [ gettext ];
patches = [ ./musl.patch ];
postPatch = ''
for script in install-sh include/install-sh; do
patchShebangs $script
done
'';
meta = with lib; {
homepage = "https://savannah.nongnu.org/projects/attr/";
description = "Library and tools for manipulating extended attributes";
platforms = platforms.linux;
badPlatforms = platforms.microblaze;
license = licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,27 @@
From 8a80d895dfd779373363c3a4b62ecce5a549efb2 Mon Sep 17 00:00:00 2001
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
Date: Sat, 30 Mar 2024 10:17:10 +0100
Subject: tools/attr.c: Add missing libgen.h include for basename(3)
Fixes compilation issue with musl and modern C99 compilers.
See: https://bugs.gentoo.org/926294
---
tools/attr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/attr.c b/tools/attr.c
index f12e4af..6a3c1e9 100644
--- a/tools/attr.c
+++ b/tools/attr.c
@@ -28,6 +28,7 @@
#include <errno.h>
#include <string.h>
#include <locale.h>
+#include <libgen.h>
#include <attr/attributes.h>
--
cgit v1.1

View File

@@ -0,0 +1,111 @@
{
lib,
stdenv,
unzip,
fetchurl,
}:
# Upstream changes files in-place, to update:
# 1. Check latest version at http://www.un4seen.com/
# 2. Update `version`s and `hash` sums.
# See also http://www.un4seen.com/forum/?topic=18614.0
# Internet Archive used due to upstream URLs being unstable
let
allBass = {
bass = {
h = "bass.h";
version = "2.4.17";
so = {
i686_linux = "libs/x86/libbass.so";
x86_64-linux = "libs/x86_64/libbass.so";
armv7l-linux = "libs/armhf/libbass.so";
aarch64-linux = "libs/aarch64/libbass.so";
};
url = "https://web.archive.org/web/20240501180538/http://www.un4seen.com/files/bass24-linux.zip";
hash = "sha256-/JAlvtZtnzuzZjWy3n1WT8Q5ZVLO0BJJAJT7/dELS3o=";
};
bass_fx = {
h = "C/bass_fx.h";
version = "2.4.12.1";
so = {
i686_linux = "libs/x86/libbass_fx.so";
x86_64-linux = "libs/x86_64/libbass_fx.so";
armv7l-linux = "libs/armhf/libbass_fx.so";
aarch64-linux = "libs/aarch64/libbass_fx.so";
};
url = "https://web.archive.org/web/20240926184106/https://www.un4seen.com/files/z/0/bass_fx24-linux.zip";
hash = "sha256-Hul2ELwnaDV8TDRMDXoFisle31GATDkf3PdkR2K9QTs=";
};
bassmidi = {
h = "bassmidi.h";
version = "2.4.15.3";
so = {
i686_linux = "libs/x86/libbassmidi.so";
x86_64-linux = "libs/x86_64/libbassmidi.so";
armv7l-linux = "libs/armhf/libbassmidi.so";
aarch64-linux = "libs/aarch64/libbassmidi.so";
};
url = "https://web.archive.org/web/20240501180447/http://www.un4seen.com/files/bassmidi24-linux.zip";
hash = "sha256-HrF1chhGk32bKN3jwal44Tz/ENGe/zORsrLPeGAv1OE=";
};
bassmix = {
h = "bassmix.h";
version = "2.4.12";
so = {
i686_linux = "libs/x86/libbassmix.so";
x86_64-linux = "libs/x86_64/libbassmix.so";
armv7l-linux = "libs/armhf/libbassmix.so";
aarch64-linux = "libs/aarch64/libbassmix.so";
};
url = "https://web.archive.org/web/20240930183631/https://www.un4seen.com/files/bassmix24-linux.zip";
hash = "sha256-oxxBhsjeLvUodg2SOMDH4wUy5na3nxLTqYkB+iXbOgA=";
};
};
dropBass =
name: bass:
stdenv.mkDerivation {
pname = "lib${name}";
inherit (bass) version;
src = fetchurl {
inherit (bass) hash url;
};
unpackCmd = ''
mkdir out
${unzip}/bin/unzip $curSrc -d out
'';
lpropagatedBuildInputs = [ unzip ];
dontBuild = true;
installPhase =
let
so =
if bass.so ? ${stdenv.hostPlatform.system} then
bass.so.${stdenv.hostPlatform.system}
else
throw "${name} not packaged for ${stdenv.hostPlatform.system} (yet).";
in
''
mkdir -p $out/{lib,include}
install -m644 -t $out/lib/ ${so}
install -m644 -t $out/include/ ${bass.h}
'';
meta = with lib; {
description = "Shareware audio library";
homepage = "https://www.un4seen.com/";
license = licenses.unfreeRedistributable;
platforms = builtins.attrNames bass.so;
maintainers = with maintainers; [ poz ];
};
};
in
lib.mapAttrs dropBass allBass

View File

@@ -0,0 +1,53 @@
{
stdenv,
lib,
config,
fetchFromGitHub,
cmake,
pkg-config,
alsaSupport ? stdenv.hostPlatform.isLinux,
alsa-lib,
pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux,
libpulseaudio,
jackSupport ? true,
jack,
coreaudioSupport ? stdenv.hostPlatform.isDarwin,
}:
stdenv.mkDerivation rec {
pname = "rtaudio";
version = "5.2.0";
# nixpkgs-update: no auto update
src = fetchFromGitHub {
owner = "thestk";
repo = "rtaudio";
rev = version;
sha256 = "0xvahlfj3ysgsjsp53q81hayzw7f99n1g214gh7dwdr52kv2l987";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs =
lib.optional alsaSupport alsa-lib
++ lib.optional pulseaudioSupport libpulseaudio
++ lib.optional jackSupport jack;
cmakeFlags = [
"-DRTAUDIO_API_ALSA=${if alsaSupport then "ON" else "OFF"}"
"-DRTAUDIO_API_PULSE=${if pulseaudioSupport then "ON" else "OFF"}"
"-DRTAUDIO_API_JACK=${if jackSupport then "ON" else "OFF"}"
"-DRTAUDIO_API_CORE=${if coreaudioSupport then "ON" else "OFF"}"
];
meta = with lib; {
description = "Set of C++ classes that provide a cross platform API for realtime audio input/output";
homepage = "https://www.music.mcgill.ca/~gary/rtaudio/";
license = licenses.mit;
maintainers = with maintainers; [ magnetophon ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,46 @@
{
stdenv,
lib,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
alsaSupport ? stdenv.hostPlatform.isLinux,
alsa-lib,
jackSupport ? true,
jack,
coremidiSupport ? stdenv.hostPlatform.isDarwin,
}:
stdenv.mkDerivation rec {
pname = "rtmidi";
version = "6.0.0";
src = fetchFromGitHub {
owner = "thestk";
repo = "rtmidi";
tag = version;
hash = "sha256-QuUeFx8rPpe0+exB3chT6dUceDa/7ygVy+cQYykq7e0=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = lib.optional alsaSupport alsa-lib ++ lib.optional jackSupport jack;
cmakeFlags = [
"-DRTMIDI_API_ALSA=${if alsaSupport then "ON" else "OFF"}"
"-DRTMIDI_API_JACK=${if jackSupport then "ON" else "OFF"}"
"-DRTMIDI_API_CORE=${if coremidiSupport then "ON" else "OFF"}"
];
meta = {
description = "Set of C++ classes that provide a cross platform API for realtime MIDI input/output";
homepage = "https://www.music.mcgill.ca/~gary/rtmidi/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ magnetophon ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,247 @@
{
fetchurl,
fetchpatch,
lib,
config,
stdenv,
pkg-config,
libdaemon,
dbus,
libpcap,
expat,
gettext,
glib,
autoreconfHook,
libiconv,
libevent,
nixosTests,
gtk3Support ? false,
gtk3,
qt5,
qt5Support ? false,
withLibdnssdCompat ? false,
python ? null,
withPython ? false,
}:
stdenv.mkDerivation rec {
pname = "avahi${lib.optionalString withLibdnssdCompat "-compat"}";
version = "0.8";
src = fetchurl {
url = "https://github.com/lathiat/avahi/releases/download/v${version}/avahi-${version}.tar.gz";
sha256 = "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6";
};
outputs = [
"out"
"dev"
"man"
];
patches = [
# CVE-2021-36217 / CVE-2021-3502
(fetchpatch {
name = "CVE-2021-3502.patch";
url = "https://github.com/lathiat/avahi/commit/9d31939e55280a733d930b15ac9e4dda4497680c.patch";
sha256 = "sha256-BXWmrLWUvDxKPoIPRFBpMS3T4gijRw0J+rndp6iDybU=";
})
# CVE-2021-3468
(fetchpatch {
name = "CVE-2021-3468.patch";
url = "https://github.com/lathiat/avahi/commit/447affe29991ee99c6b9732fc5f2c1048a611d3b.patch";
sha256 = "sha256-qWaCU1ZkCg2PmijNto7t8E3pYRN/36/9FrG8okd6Gu8=";
})
(fetchpatch {
name = "CVE-2023-1981.patch";
url = "https://github.com/lathiat/avahi/commit/a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f.patch";
sha256 = "sha256-BEYFGCnQngp+OpiKIY/oaKygX7isAnxJpUPCUvg+efc=";
})
# CVE-2023-38470
# https://github.com/lathiat/avahi/pull/457 merged Sep 19
(fetchpatch {
name = "CVE-2023-38470.patch";
url = "https://github.com/lathiat/avahi/commit/94cb6489114636940ac683515417990b55b5d66c.patch";
sha256 = "sha256-Fanh9bvz+uknr5pAmltqijuUAZIG39JR2Lyq5zGKJ58=";
})
# https://github.com/avahi/avahi/pull/480 merged Sept 19
(fetchpatch {
name = "bail-out-unless-escaped-labels-fit.patch";
url = "https://github.com/avahi/avahi/commit/20dec84b2480821704258bc908e7b2bd2e883b24.patch";
sha256 = "sha256-p/dOuQ/GInIcUwuFhQR3mGc5YBL5J8ho+1gvzcqEN0c=";
})
# CVE-2023-38473
# https://github.com/lathiat/avahi/pull/486 merged Oct 18
(fetchpatch {
name = "CVE-2023-38473.patch";
url = "https://github.com/lathiat/avahi/commit/b448c9f771bada14ae8de175695a9729f8646797.patch";
sha256 = "sha256-/ZVhsBkf70vjDWWG5KXxvGXIpLOZUXdRkn3413iSlnI=";
})
# CVE-2023-38472
# https://github.com/lathiat/avahi/pull/490 merged Oct 19
(fetchpatch {
name = "CVE-2023-38472.patch";
url = "https://github.com/lathiat/avahi/commit/b024ae5749f4aeba03478e6391687c3c9c8dee40.patch";
sha256 = "sha256-FjR8fmhevgdxR9JQ5iBLFXK0ILp2OZQ8Oo9IKjefCqk=";
})
# CVE-2023-38471
# https://github.com/lathiat/avahi/pull/494 merged Oct 24
(fetchpatch {
name = "CVE-2023-38471.patch";
url = "https://github.com/lathiat/avahi/commit/894f085f402e023a98cbb6f5a3d117bd88d93b09.patch";
sha256 = "sha256-4dG+5ZHDa+A4/CszYS8uXWlpmA89m7/jhbZ7rheMs7U=";
})
# https://github.com/lathiat/avahi/pull/499 merged Oct 25
(fetchpatch {
name = "CVE-2023-38471-2.patch";
url = "https://github.com/avahi/avahi/commit/b675f70739f404342f7f78635d6e2dcd85a13460.patch";
sha256 = "sha256-uDtMPWuz1lsu7n0Co/Gpyh369miQ6GWGyC0UPQB/yI8=";
})
# CVE-2023-38469
# https://github.com/lathiat/avahi/pull/500 merged Oct 25
(fetchpatch {
name = "CVE-2023-38469.patch";
url = "https://github.com/avahi/avahi/commit/61b9874ff91dd20a12483db07df29fe7f35db77f.patch";
sha256 = "sha256-qR7scfQqhRGxg2n4HQsxVxCLkXbwZi+PlYxrOSEPsL0=";
excludes = [ ".github/workflows/smoke-tests.sh" ];
})
# https://github.com/avahi/avahi/pull/515 merged Nov 3
(fetchpatch {
name = "fix-compare-rrs-with-zero-length-rdata.patch";
url = "https://github.com/avahi/avahi/commit/177d75e8c43be45a8383d794ce4084dd5d600a9e.patch";
sha256 = "sha256-uwIyruAWgiWt0yakRrvMdYjjhEhUk5cIGKt6twyXbHw=";
})
# https://github.com/avahi/avahi/pull/519 merged Nov 8
(fetchpatch {
name = "reject-non-utf-8-service-names.patch";
url = "https://github.com/avahi/avahi/commit/2b6d3e99579e3b6e9619708fad8ad8e07ada8218.patch";
sha256 = "sha256-lwSA3eEQgH0g51r0i9/HJMJPRXrhQnTIEDxcYqUuLdI=";
excludes = [ "fuzz/fuzz-domain.c" ];
})
# https://github.com/avahi/avahi/pull/523 merged Nov 12
(fetchpatch {
name = "core-no-longer-supply-bogus-services-to-callbacks.patch";
url = "https://github.com/avahi/avahi/commit/93b14365c1c1e04efd1a890e8caa01a2a514bfd8.patch";
sha256 = "sha256-VBm8vsBZkTbbWAK8FI71SL89lZuYd1yFNoB5o+FvlEU=";
excludes = [
".github/workflows/smoke-tests.sh"
"fuzz/fuzz-packet.c"
];
})
# https://github.com/avahi/avahi/pull/659 merged Nov 19
(fetchpatch {
name = "CVE-2024-52616.patch";
url = "https://github.com/avahi/avahi/commit/f8710bdc8b29ee1176fe3bfaeabebbda1b7a79f7.patch";
hash = "sha256-BUQOQ4evKLBzV5UV8xW8XL38qk1rg6MJ/vcT5NBckfA=";
})
# https://github.com/avahi/avahi/pull/265 merged Mar 3, 2020
(fetchpatch {
name = "fix-requires-in-pc-file.patch";
url = "https://github.com/avahi/avahi/commit/366e3798bdbd6b7bf24e59379f4a9a51af575ce9.patch";
hash = "sha256-9AdhtzrimmcpMmeyiFcjmDfG5nqr/S8cxWTaM1mzCWA=";
})
];
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
pkg-config
gettext
glib
autoreconfHook
];
buildInputs = [
libdaemon
dbus
glib
expat
libiconv
libevent
]
++ lib.optionals stdenv.hostPlatform.isFreeBSD [
libpcap
]
++ lib.optionals gtk3Support [
gtk3
]
++ lib.optionals qt5Support [
qt5
];
propagatedBuildInputs = lib.optionals withPython (
with python.pkgs;
[
python
pygobject3
dbus-python
]
);
configureFlags = [
"--disable-gdbm"
"--disable-mono"
# Use non-deprecated path https://github.com/lathiat/avahi/pull/376
"--with-dbus-sys=${placeholder "out"}/share/dbus-1/system.d"
(lib.enableFeature gtk3Support "gtk3")
(lib.enableFeature qt5Support "qt5")
(lib.enableFeature withPython "python")
"--localstatedir=/var"
"--runstatedir=/run"
"--sysconfdir=/etc"
"--with-distro=${with stdenv.hostPlatform; if isBSD then parsed.kernel.name else "none"}"
# A systemd unit is provided by the avahi-daemon NixOS module
"--with-systemdsystemunitdir=no"
]
++ lib.optionals withLibdnssdCompat [
"--enable-compat-libdns_sd"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# autoipd won't build on darwin
"--disable-autoipd"
];
installFlags = [
# Override directories to install into the package.
# Replace with runstatedir once is merged https://github.com/lathiat/avahi/pull/377
"avahi_runtime_dir=${placeholder "out"}/run"
"sysconfdir=${placeholder "out"}/etc"
];
preBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
sed -i '20 i\
#define __APPLE_USE_RFC_2292' \
avahi-core/socket.c
'';
postInstall =
# Maintain compat for mdnsresponder
lib.optionalString withLibdnssdCompat ''
ln -s avahi-compat-libdns_sd/dns_sd.h "$dev/include/dns_sd.h"
'';
passthru.tests = {
smoke-test = nixosTests.avahi;
smoke-test-resolved = nixosTests.avahi-with-resolved;
};
meta = with lib; {
description = "mDNS/DNS-SD implementation";
homepage = "http://avahi.org";
license = licenses.lgpl2Plus;
platforms = platforms.unix;
maintainers = with maintainers; [
lovek323
globin
];
longDescription = ''
Avahi is a system which facilitates service discovery on a local
network. It is an implementation of the mDNS (for "Multicast
DNS") and DNS-SD (for "DNS-Based Service Discovery")
protocols.
'';
};
}

View File

@@ -0,0 +1,31 @@
{ callPackage, fetchFromGitHub }:
callPackage ./generic.nix {
variant = "3.2";
version = "2019-07-27";
branch = "master";
src = fetchFromGitHub {
owner = "bashup";
repo = "events";
rev = "83744c21bf720afb8325343674c62ab46a8f3d94";
hash = "sha256-0VDjd+1T1JBmSDGovWOOecUZmNztlwG32UcstfdigbI=";
};
fake = {
# Note: __ev.encode is actually defined, but it happens in a
# quoted arg to eval, which resholve currently doesn't (and may
# never) parse into. See abathur/resholve/issues/2.
function = [ "__ev.encode" ];
};
keep = {
# allow vars in eval
eval = [
"e"
"f"
"q"
"r"
];
# allow vars executed as commands
"$f" = true;
"$n" = true;
};
}

View File

@@ -0,0 +1,24 @@
{ callPackage, fetchFromGitHub }:
callPackage ./generic.nix {
variant = "4.4";
version = "2020-04-04";
branch = "bash44";
src = fetchFromGitHub {
owner = "bashup";
repo = "events";
rev = "e97654f5602fc4e31083b27afa18dcc89b3e8296";
hash = "sha256-51OSIod3mEg3MKs4rrMgRcOimDGC+3UIr4Bl/cTRyGM=";
};
keep = {
# allow vars in eval
eval = [
"e"
"bashup_ev"
"n"
];
# allow vars executed as commands
"$f" = true;
"$n" = true;
};
}

View File

@@ -0,0 +1,6 @@
{ callPackage }:
{
bashup-events32 = callPackage ./3.2.nix { };
bashup-events44 = callPackage ./4.4.nix { };
}

View File

@@ -0,0 +1,87 @@
{
# general
lib,
resholve,
bash,
doCheck ? true,
doInstallCheck ? true,
# variant-specific
variant,
version,
branch,
src,
fake ? false,
keep,
}:
let
# extracting this so that it's trivial to test in other shells
installCheck = shell: ''
echo "testing bashup.events in ${shell}"
${shell} <<'EOF'
source $out/bin/bashup.events
neat(){
echo $0: Hi from event \'test event\'. I can have both $1 and $2 arguments.
exit 0
}
event on "test event" @2 neat curried
echo event registered
event emit "test event" runtime
exit 1 # fail if emitting event didn't exit clean
EOF
'';
in
resholve.mkDerivation {
# bashup.events doesn't version yet but it has two variants with
# differing features/performance characteristics:
# - branch master: a variant for bash 3.2+
# - branch bash44: a variant for bash 4.4+
pname = "bashup-events${variant}-unstable";
# should be YYYY-MM-DD
inherit version;
inherit src;
installPhase = ''
runHook preInstall
install -Dt $out/bin bashup.events
runHook postInstall
'';
inherit doCheck;
nativeCheckInputs = [ bash ];
checkPhase = ''
runHook preCheck
${bash}/bin/bash -n ./bashup.events
${bash}/bin/bash ./bashup.events
runHook postCheck
'';
solutions = {
events = {
inputs = [ ];
interpreter = "none";
scripts = [ "bin/bashup.events" ];
inherit keep;
}
// lib.optionalAttrs (lib.isAttrs fake) { inherit fake; };
};
inherit doInstallCheck;
nativeInstallCheckInputs = [ bash ];
installCheckPhase = ''
runHook preInstallCheck
${installCheck "${bash}/bin/bash"}
runHook postInstallCheck
'';
meta = with lib; {
inherit branch;
description = "Event listener/callback API for creating extensible bash programs";
mainProgram = "bashup.events";
homepage = "https://github.com/bashup/events";
license = licenses.cc0;
maintainers = with maintainers; [ abathur ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,19 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./generic.nix (
args
// rec {
version = "1.77.0";
src = fetchurl {
urls = [
"mirror://sourceforge/boost/boost_${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.bz2"
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.bz2"
];
# SHA256 from http://www.boost.org/users/history/version_1_77_0.html
sha256 = "sha256-/J+F/AMOIzFCkIJBr3qEbmBjCqc4jeml+vsfOiaECFQ=";
};
}
)

View File

@@ -0,0 +1,19 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./generic.nix (
args
// rec {
version = "1.78.0";
src = fetchurl {
urls = [
"mirror://sourceforge/boost/boost_${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.bz2"
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.bz2"
];
# SHA256 from http://www.boost.org/users/history/version_1_78_0.html
sha256 = "8681f175d4bdb26c52222665793eef08490d7758529330f98d3b29dd0735bccc";
};
}
)

View File

@@ -0,0 +1,19 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./generic.nix (
args
// rec {
version = "1.79.0";
src = fetchurl {
urls = [
"mirror://sourceforge/boost/boost_${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.bz2"
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.bz2"
];
# SHA256 from http://www.boost.org/users/history/version_1_79_0.html
sha256 = "475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39";
};
}
)

View File

@@ -0,0 +1,19 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./generic.nix (
args
// rec {
version = "1.80.0";
src = fetchurl {
urls = [
"mirror://sourceforge/boost/boost_${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.bz2"
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.bz2"
];
# SHA256 from http://www.boost.org/users/history/version_1_80_0.html
sha256 = "1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0";
};
}
)

View File

@@ -0,0 +1,19 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./generic.nix (
args
// rec {
version = "1.81.0";
src = fetchurl {
urls = [
"mirror://sourceforge/boost/boost_${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.bz2"
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.bz2"
];
# SHA256 from http://www.boost.org/users/history/version_1_81_0.html
sha256 = "71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa";
};
}
)

View File

@@ -0,0 +1,19 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./generic.nix (
args
// rec {
version = "1.82.0";
src = fetchurl {
urls = [
"mirror://sourceforge/boost/boost_${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.bz2"
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.bz2"
];
# SHA256 from http://www.boost.org/users/history/version_1_82_0.html
sha256 = "a6e1ab9b0860e6a2881dd7b21fe9f737a095e5f33a3a874afc6a345228597ee6";
};
}
)

View File

@@ -0,0 +1,19 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./generic.nix (
args
// rec {
version = "1.83.0";
src = fetchurl {
urls = [
"mirror://sourceforge/boost/boost_${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.bz2"
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.bz2"
];
# SHA256 from http://www.boost.org/users/history/version_1_83_0.html
sha256 = "6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e";
};
}
)

View File

@@ -0,0 +1,19 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./generic.nix (
args
// rec {
version = "1.86.0";
src = fetchurl {
urls = [
"mirror://sourceforge/boost/boost_${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.bz2"
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.bz2"
];
# SHA256 from http://www.boost.org/users/history/version_1_86_0.html
sha256 = "1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b";
};
}
)

View File

@@ -0,0 +1,19 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./generic.nix (
args
// rec {
version = "1.87.0";
src = fetchurl {
urls = [
"mirror://sourceforge/boost/boost_${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.bz2"
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.bz2"
];
# SHA256 from http://www.boost.org/users/history/version_1_87_0.html
sha256 = "af57be25cb4c4f4b413ed692fe378affb4352ea50fbe294a11ef548f4d527d89";
};
}
)

View File

@@ -0,0 +1,19 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./generic.nix (
args
// rec {
version = "1.88.0";
src = fetchurl {
urls = [
"mirror://sourceforge/boost/boost_${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.bz2"
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.bz2"
];
# SHA256 from http://www.boost.org/users/history/version_1_88_0.html
sha256 = "46d9d2c06637b219270877c9e16155cbd015b6dc84349af064c088e9b5b12f7b";
};
}
)

View File

@@ -0,0 +1,19 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./generic.nix (
args
// rec {
version = "1.89.0";
src = fetchurl {
urls = [
"mirror://sourceforge/boost/boost_${builtins.replaceStrings [ "." ] [ "_" ] version}.tar.bz2"
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.bz2"
];
# SHA256 from http://www.boost.org/users/history/version_1_89_0.html
sha256 = "85a33fa22621b4f314f8e85e1a5e2a9363d22e4f4992925d4bb3bc631b5a0c7a";
};
}
)

View File

@@ -0,0 +1,22 @@
diff --git a/tools/boost_install/boost-install.jam b/tools/boost_install/boost-install.jam
index 4238f921e..8fc1ea269 100644
--- a/tools/boost_install/boost-install.jam
+++ b/tools/boost_install/boost-install.jam
@@ -649,7 +649,7 @@ rule generate-cmake-config- ( target : sources * : properties * )
""
"# Compute the include and library directories relative to this file."
""
- "get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
+ "get_filename_component(_BOOST_REAL_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
: true ;
if [ path.is-rooted $(cmakedir) ]
@@ -668,6 +668,8 @@ rule generate-cmake-config- ( target : sources * : properties * )
" unset(_BOOST_CMAKEDIR_ORIGINAL)"
"endif()"
""
+ "# Assume that the installer actually did know where the libs were to be installed"
+ "get_filename_component(_BOOST_CMAKEDIR \"$(cmakedir-native)\" REALPATH)"
: true ;
}

View File

@@ -0,0 +1,21 @@
diff --color -ur boost_1_88_0-unpatched/tools/boost_install/boost-install.jam boost_1_88_0/tools/boost_install/boost-install.jam
--- boost_1_88_0-unpatched/tools/boost_install/boost-install.jam 2025-07-29 21:46:33.010181683 +0800
+++ boost_1_88_0/tools/boost_install/boost-install.jam 2025-07-29 21:47:34.346642613 +0800
@@ -794,7 +794,7 @@
""
"# Compute the include and library directories relative to this file."
""
- "get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
+ "get_filename_component(_BOOST_REAL_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
: true ;
if [ path.is-rooted $(cmakedir) ]
@@ -813,6 +813,8 @@
" unset(_BOOST_CMAKEDIR_ORIGINAL)"
"endif()"
""
+ "# Assume that the installer actually did know where the libs were to be installed"
+ "get_filename_component(_BOOST_CMAKEDIR \"$(cmakedir-native)\" REALPATH)"
: true ;
}

View File

@@ -0,0 +1,45 @@
diff --git a/tools/build/src/tools/python.jam b/tools/build/src/tools/python.jam
index 273b28a..2d2031e 100644
--- a/tools/build/src/tools/python.jam
+++ b/tools/build/src/tools/python.jam
@@ -428,13 +428,7 @@ local rule windows-installed-pythons ( version ? )
local rule darwin-installed-pythons ( version ? )
{
- version ?= $(.version-countdown) ;
-
- local prefix
- = [ GLOB /System/Library/Frameworks /Library/Frameworks
- : Python.framework ] ;
-
- return $(prefix)/Versions/$(version)/bin/python ;
+ return ;
}
@@ -890,25 +884,6 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
# See if we can find a framework directory on darwin.
local framework-directory ;
- if $(target-os) = darwin
- {
- # Search upward for the framework directory.
- local framework-directory = $(libraries[-1]) ;
- while $(framework-directory:D=) && $(framework-directory:D=) != Python.framework
- {
- framework-directory = $(framework-directory:D) ;
- }
-
- if $(framework-directory:D=) = Python.framework
- {
- debug-message framework directory is \"$(framework-directory)\" ;
- }
- else
- {
- debug-message "no framework directory found; using library path" ;
- framework-directory = ;
- }
- }
local dll-path = $(libraries) ;

View File

@@ -0,0 +1,34 @@
{
lib,
callPackage,
boost-build,
fetchurl,
}:
let
makeBoost =
file:
lib.fix (
self:
callPackage file {
boost-build = boost-build.override {
# useBoost allows us passing in src and version from
# the derivation we are building to get a matching b2 version.
useBoost = self;
};
}
);
in
{
boost177 = makeBoost ./1.77.nix;
boost178 = makeBoost ./1.78.nix;
boost179 = makeBoost ./1.79.nix;
boost180 = makeBoost ./1.80.nix;
boost181 = makeBoost ./1.81.nix;
boost182 = makeBoost ./1.82.nix;
boost183 = makeBoost ./1.83.nix;
boost186 = makeBoost ./1.86.nix;
boost187 = makeBoost ./1.87.nix;
boost188 = makeBoost ./1.88.nix;
boost189 = makeBoost ./1.89.nix;
}

View File

@@ -0,0 +1,14 @@
--- a/tools/build/src/tools/clang.jam 2024-07-25 10:38:16.278401900 -0700
+++ b/tools/build/src/tools/clang.jam 2024-07-25 10:38:52.659750666 -0700
@@ -90,11 +90,6 @@
case x86-64 : arch = x86_64 ;
case x86-32 : arch = i386 ;
}
-
- toolset.flags $(toolset)
- OPTIONS $(condition)/<target-os>$(target-os)/<architecture>$(_architecture_)/<address-model>$(_address-model_)
- : "--target=$(arch)-$(vendor-sys)"
- : unchecked ;
}
}
}

View File

@@ -0,0 +1,405 @@
{
lib,
stdenv,
icu,
zlib,
bzip2,
zstd,
xz,
python ? null,
fixDarwinDylibNames,
libiconv,
libxcrypt,
makePkgconfigItem,
copyPkgconfigItems,
boost-build,
fetchpatch,
which,
toolset ?
if stdenv.cc.isClang then
"clang"
else if stdenv.cc.isGNU then
"gcc"
else
null,
enableRelease ? true,
enableDebug ? false,
enableSingleThreaded ? false,
enableMultiThreaded ? true,
enableShared ? !(with stdenv.hostPlatform; isStatic || isMinGW), # problems for now
enableStatic ? !enableShared,
enablePython ? false,
enableNumpy ? false,
enableIcu ? stdenv.hostPlatform == stdenv.buildPlatform,
taggedLayout ? (
(enableRelease && enableDebug)
|| (enableSingleThreaded && enableMultiThreaded)
|| (enableShared && enableStatic)
),
patches ? [ ],
boostBuildPatches ? [ ],
useMpi ? false,
mpi,
extraB2Args ? [ ],
# Attributes inherit from specific versions
version,
src,
...
}:
# We must build at least one type of libraries
assert enableShared || enableStatic;
assert enableNumpy -> enablePython;
let
variant = lib.concatStringsSep "," (
lib.optional enableRelease "release" ++ lib.optional enableDebug "debug"
);
threading = lib.concatStringsSep "," (
lib.optional enableSingleThreaded "single" ++ lib.optional enableMultiThreaded "multi"
);
link = lib.concatStringsSep "," (
lib.optional enableShared "shared" ++ lib.optional enableStatic "static"
);
runtime-link = if enableShared then "shared" else "static";
# To avoid library name collisions
layout = if taggedLayout then "tagged" else "system";
needUserConfig =
stdenv.hostPlatform != stdenv.buildPlatform
|| useMpi
|| (stdenv.hostPlatform.isDarwin && enableShared);
b2Args = lib.concatStringsSep " " (
[
"--includedir=$dev/include"
"--libdir=$out/lib"
"-j$NIX_BUILD_CORES"
"--layout=${layout}"
"variant=${variant}"
"threading=${threading}"
"link=${link}"
]
++ lib.optionals (lib.versionAtLeast version "1.85") [
(
# The stacktrace from exception feature causes memory leaks when built
# with libc++. For all other standard library implementations, i.e.
# libstdc++, we must acknowledge this or stacktrace refuses to compile.
# Issue upstream: https://github.com/boostorg/stacktrace/issues/163
if (stdenv.cc.libcxx != null) then
"boost.stacktrace.from_exception=off"
else
"define=BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK"
)
]
# TODO: make this unconditional
++
lib.optionals
(
stdenv.hostPlatform != stdenv.buildPlatform
||
# required on mips; see 61d9f201baeef4c4bb91ad8a8f5f89b747e0dfe4
(stdenv.hostPlatform.isMips && lib.versionAtLeast version "1.79")
)
[
"address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}"
"architecture=${
if stdenv.hostPlatform.isMips64 then
if lib.versionOlder version "1.78" then "mips1" else "mips"
else if stdenv.hostPlatform.isS390 then
"s390x"
else
toString stdenv.hostPlatform.parsed.cpu.family
}"
# env in host triplet for Mach-O is "macho", but boost binary format for Mach-O is "mach-o"
"binary-format=${
if stdenv.hostPlatform.isMacho then
"mach-o"
else
toString stdenv.hostPlatform.parsed.kernel.execFormat.name
}"
"target-os=${toString stdenv.hostPlatform.parsed.kernel.name}"
# adapted from table in boost manual
# https://www.boost.org/doc/libs/1_66_0/libs/context/doc/html/context/architectures.html
"abi=${
if stdenv.hostPlatform.parsed.cpu.family == "arm" then
"aapcs"
else if stdenv.hostPlatform.isWindows then
"ms"
else if stdenv.hostPlatform.isMips32 then
"o32"
else if stdenv.hostPlatform.isMips64n64 then
"n64"
else
"sysv"
}"
]
++ lib.optional (link != "static") "runtime-link=${runtime-link}"
++ lib.optional (variant == "release") "debug-symbols=off"
++ lib.optional (toolset != null) "toolset=${toolset}"
++ lib.optional (!enablePython) "--without-python"
++ lib.optional needUserConfig "--user-config=user-config.jam"
++ lib.optional (stdenv.buildPlatform.isDarwin && stdenv.hostPlatform.isLinux) "pch=off"
++ lib.optionals stdenv.hostPlatform.isMinGW [
"threadapi=win32"
]
++ extraB2Args
);
in
stdenv.mkDerivation {
pname = "boost";
inherit src version;
patchFlags = [ ];
patches =
patches
++ lib.optional (
lib.versionOlder version "1.88" && stdenv.hostPlatform.isDarwin
) ./darwin-no-system-python.patch
++ lib.optional (lib.versionOlder version "1.88") ./cmake-paths-173.patch
++ lib.optional (lib.versionAtLeast version "1.88") ./cmake-paths-188.patch
++ lib.optional (version == "1.77.0") (fetchpatch {
url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch";
relative = "include";
sha256 = "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4=";
})
# Fixes ABI detection
++ lib.optional (version == "1.83.0") (fetchpatch {
url = "https://github.com/boostorg/context/commit/6fa6d5c50d120e69b2d8a1c0d2256ee933e94b3b.patch";
stripLen = 1;
extraPrefix = "libs/context/";
sha256 = "sha256-bCfLL7bD1Rn4Ie/P3X+nIcgTkbXdCX6FW7B9lHsmVW8=";
})
# This fixes another issue regarding ill-formed constant expressions, which is a default error
# in clang 16 and will be a hard error in clang 17.
++ lib.optional (lib.versionOlder version "1.80") (fetchpatch {
url = "https://github.com/boostorg/log/commit/77f1e20bd69c2e7a9e25e6a9818ae6105f7d070c.patch";
relative = "include";
hash = "sha256-6qOiGJASm33XzwoxVZfKJd7sTlQ5yd+MMFQzegXm5RI=";
})
++ lib.optionals (lib.versionOlder version "1.81") [
# libc++ 15 dropped support for `std::unary_function` and `std::binary_function` in C++17+.
# C++17 is the default for clang 16, but clang 15 is also affected in that language mode.
# This patch is for Boost 1.80, but it also applies to earlier versions.
(fetchpatch {
url = "https://www.boost.org/patches/1_80_0/0005-config-libcpp15.patch";
hash = "sha256-ULFMzKphv70unvPZ3o4vSP/01/xbSM9a2TlIV67eXDQ=";
})
# This fixes another ill-formed contant expressions issue flagged by clang 16.
(fetchpatch {
url = "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a.patch";
relative = "include";
hash = "sha256-dq4SVgxkPJSC7Fvr59VGnXkM4Lb09kYDaBksCHo9C0s=";
})
# This fixes an issue in Python 3.11 about Py_TPFLAGS_HAVE_GC
(fetchpatch {
name = "python311-compatibility.patch";
url = "https://github.com/boostorg/python/commit/a218babc8daee904a83f550fb66e5cb3f1cb3013.patch";
hash = "sha256-IHxLtJBx0xSy7QEr8FbCPofsjcPuSYzgtPwDlx1JM+4=";
stripLen = 1;
extraPrefix = "libs/python/";
})
]
++ lib.optional (
lib.versionAtLeast version "1.81" && lib.versionOlder version "1.88" && stdenv.cc.isClang
) ./fix-clang-target.patch
++ lib.optional (lib.versionAtLeast version "1.86" && lib.versionOlder version "1.87") [
# Backport fix for NumPy 2 support.
(fetchpatch {
name = "boost-numpy-2-compatibility.patch";
url = "https://github.com/boostorg/python/commit/0474de0f6cc9c6e7230aeb7164af2f7e4ccf74bf.patch";
stripLen = 1;
extraPrefix = "libs/python/";
hash = "sha256-0IHK55JSujYcwEVOuLkwOa/iPEkdAKQlwVWR42p/X2U=";
})
]
++ lib.optional (version == "1.87.0") [
# Fix operator<< for shared_ptr and intrusive_ptr
# https://github.com/boostorg/smart_ptr/issues/115
(fetchpatch {
url = "https://github.com/boostorg/smart_ptr/commit/e7433ba54596da97cb7859455cd37ca140305a9c.patch";
relative = "include";
hash = "sha256-9JvKQOAB19wQpWLNAhuB9eL8qKqXWTQHAJIXdLYMNG8=";
})
# Fixes ABI detection on some platforms (like loongarch64)
(fetchpatch {
url = "https://github.com/boostorg/context/commit/63996e427b4470c7b99b0f4cafb94839ea3670b6.patch";
stripLen = 1;
extraPrefix = "libs/context/";
hash = "sha256-Z8uw2+4IEybqVcU25i/0XJKS16hi/+3MXUxs53ghjL0=";
})
];
meta = with lib; {
homepage = "http://boost.org/";
description = "Collection of C++ libraries";
license = licenses.boost;
platforms = platforms.unix ++ platforms.windows;
# boost-context lacks support for the N32 ABI on mips64. The build
# will succeed, but packages depending on boost-context will fail with
# a very cryptic error message.
badPlatforms = [ lib.systems.inspect.patterns.isMips64n32 ];
broken =
enableNumpy && lib.versionOlder version "1.86" && lib.versionAtLeast python.pkgs.numpy.version "2";
};
passthru = {
inherit boostBuildPatches;
};
preConfigure =
lib.optionalString useMpi ''
cat << EOF >> user-config.jam
using mpi : ${lib.getDev mpi}/bin/mpiCC ;
EOF
''
# On darwin we need to add the `$out/lib` to the libraries' rpath explicitly,
# otherwise the dynamic linker is unable to resolve the reference to @rpath
# when the boost libraries want to load each other at runtime.
+ lib.optionalString (stdenv.hostPlatform.isDarwin && enableShared) ''
cat << EOF >> user-config.jam
using clang-darwin : : ${stdenv.cc.targetPrefix}c++
: <linkflags>"-rpath $out/lib/"
<archiver>$AR
<ranlib>$RANLIB
;
EOF
''
# b2 has trouble finding the correct compiler and tools for cross compilation
# since it apparently ignores $CC, $AR etc. Thus we need to set everything
# in user-config.jam. To keep things simple we just set everything in an
# uniform way for clang and gcc (which works thanks to our cc-wrapper).
# We pass toolset later which will make b2 invoke everything in the right
# way -- the other toolset in user-config.jam will be ignored.
+ lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
cat << EOF >> user-config.jam
using gcc : cross : ${stdenv.cc.targetPrefix}c++
: <archiver>$AR
<ranlib>$RANLIB
;
using clang : cross : ${stdenv.cc.targetPrefix}c++
: <archiver>$AR
<ranlib>$RANLIB
;
EOF
''
# b2 needs to be explicitly told how to find Python when cross-compiling
+ lib.optionalString enablePython ''
cat << EOF >> user-config.jam
using python : : ${python.pythonOnBuildForHost.interpreter}
: ${python}/include/python${python.pythonVersion}
: ${python}/lib
;
EOF
'';
# Fix compilation to 32-bit ARM with clang in downstream packages
# https://github.com/ned14/outcome/pull/308
# https://github.com/boostorg/json/pull/1064
postPatch = lib.optionalString (version == "1.87.0") ''
substituteInPlace \
boost/outcome/outcome_gdb.h \
boost/outcome/experimental/status-code/status_code.hpp \
boost/json/detail/gdb_printers.hpp \
boost/unordered/unordered_printers.hpp \
boost/interprocess/interprocess_printers.hpp \
libs/json/pretty_printers/generate-gdb-header.py \
--replace-fail ",@progbits,1" ",%progbits,1"
'';
env = {
NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names";
# copyPkgconfigItems will substitute these in the pkg-config file
includedir = "${placeholder "dev"}/include";
libdir = "${placeholder "out"}/lib";
};
pkgconfigItems = [
(makePkgconfigItem {
name = "boost";
inherit version;
# Exclude other variables not needed by meson
variables = {
includedir = "@includedir@";
libdir = "@libdir@";
};
})
];
enableParallelBuilding = true;
nativeBuildInputs = [
which
boost-build
copyPkgconfigItems
]
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [
zlib
bzip2
libiconv
]
++ lib.optional (lib.versionAtLeast version "1.69") zstd
++ [ xz ]
++ lib.optional enableIcu icu
++ lib.optionals enablePython [
libxcrypt
python
]
++ lib.optional enableNumpy python.pkgs.numpy;
configureScript = "./bootstrap.sh";
configurePlatforms = [ ];
dontDisableStatic = true;
dontAddStaticConfigureFlags = true;
configureFlags = [
"--includedir=$(dev)/include"
"--libdir=$(out)/lib"
"--with-bjam=b2" # prevent bootstrapping b2 in configurePhase
]
++ lib.optional (toolset != null) "--with-toolset=${toolset}"
++ [ (if enableIcu then "--with-icu=${icu.dev}" else "--without-icu") ];
buildPhase = ''
runHook preBuild
b2 ${b2Args}
runHook postBuild
'';
installPhase = ''
runHook preInstall
# boostbook is needed by some applications
mkdir -p $dev/share/boostbook
cp -a tools/boostbook/{xsl,dtd} $dev/share/boostbook/
# Let boost install everything else
b2 ${b2Args} install
runHook postInstall
'';
postFixup = lib.optionalString stdenv.hostPlatform.isMinGW ''
$RANLIB "$out/lib/"*.a
'';
outputs = [
"out"
"dev"
];
setOutputFlags = false;
}

View File

@@ -0,0 +1,176 @@
{
lib,
stdenv,
fetchurl,
pkgsStatic,
python3,
docutils,
bzip2,
zlib,
jitterentropy,
darwin,
esdm,
tpm2-tss,
static ? stdenv.hostPlatform.isStatic, # generates static libraries *only*
windows,
# build ESDM RNG plugin
withEsdm ? false,
# useful, but have to disable tests for now, as /dev/tpmrm0 is not accessible
withTpm2 ? false,
policy ? null,
}:
assert lib.assertOneOf "policy" policy [
# no explicit policy is given. The defaults by the library are used
null
# only allow BSI approved algorithms, FFI and SHAKE for XMSS
"bsi"
# only allow NIST approved algorithms in FIPS 140
"fips140"
# only allow "modern" algorithms
"modern"
];
let
common =
{
version,
hash,
patches ? [ ],
}:
stdenv.mkDerivation (finalAttrs: {
pname = "botan";
inherit version;
__structuredAttrs = true;
enableParallelBuilding = true;
strictDeps = true;
outputs = [
"bin"
"out"
"dev"
"doc"
"man"
];
src = fetchurl {
url = "http://botan.randombit.net/releases/Botan-${finalAttrs.version}.tar.xz";
inherit hash;
};
inherit patches;
nativeBuildInputs = [
python3
docutils
];
buildInputs = [
bzip2
zlib
]
++ lib.optionals (stdenv.hostPlatform.isLinux && withTpm2) [
tpm2-tss
]
++ lib.optionals (lib.versionAtLeast version "3.6.0" && !stdenv.hostPlatform.isMinGW) [
jitterentropy
]
++ lib.optionals (lib.versionAtLeast version "3.7.0" && withEsdm && !stdenv.hostPlatform.isMinGW) [
esdm
]
++ lib.optionals (stdenv.hostPlatform.isMinGW) [
windows.pthreads
];
buildTargets = [
"cli"
]
++ lib.optionals finalAttrs.finalPackage.doCheck [ "tests" ]
++ lib.optionals static [ "static" ]
++ lib.optionals (!static) [ "shared" ];
botanConfigureFlags = [
"--prefix=${placeholder "out"}"
"--bindir=${placeholder "bin"}/bin"
"--docdir=${placeholder "doc"}/share/doc"
"--mandir=${placeholder "man"}/share/man"
"--no-install-python-module"
"--build-targets=${lib.concatStringsSep "," finalAttrs.buildTargets}"
"--with-bzip2"
"--with-zlib"
"--with-rst2man"
"--cpu=${stdenv.hostPlatform.parsed.cpu.name}"
]
++ lib.optionals stdenv.cc.isClang [
"--cc=clang"
]
++ lib.optionals (stdenv.hostPlatform.isLinux && withTpm2) [
"--with-tpm2"
]
++ lib.optionals (lib.versionAtLeast version "3.6.0" && !stdenv.hostPlatform.isMinGW) [
"--enable-modules=jitter_rng"
]
++ lib.optionals (lib.versionAtLeast version "3.7.0" && withEsdm && !stdenv.hostPlatform.isMinGW) [
"--enable-modules=esdm_rng"
]
++ lib.optionals (lib.versionAtLeast version "3.8.0" && policy != null) [
"--module-policy=${policy}"
]
++ lib.optionals (lib.versionAtLeast version "3.8.0" && policy == "bsi") [
"--enable-module=ffi"
"--enable-module=shake"
]
++ lib.optionals (stdenv.hostPlatform.isMinGW) [
"--os=mingw"
];
configurePhase = ''
runHook preConfigure
python configure.py ''${botanConfigureFlags[@]}
runHook postConfigure
'';
preInstall = ''
if [ -d src/scripts ]; then
patchShebangs src/scripts
fi
'';
postInstall = ''
cd "$out"/lib/pkgconfig
ln -s botan-*.pc botan.pc || true
'';
doCheck = true;
passthru.tests = lib.optionalAttrs (lib.versionAtLeast version "3") {
static = pkgsStatic.botan3;
};
meta = with lib; {
description = "Cryptographic algorithms library";
homepage = "https://botan.randombit.net";
mainProgram = "botan";
maintainers = with maintainers; [
raskin
thillux
nikstur
];
platforms = platforms.unix ++ lib.optionals (lib.versionAtLeast version "3.0") platforms.windows;
license = licenses.bsd2;
};
});
in
{
botan3 = common {
version = "3.9.0";
hash = "sha256-jD8oS1jd1C6OQ+n6hqcSnYfqfD93aoDT2mPsIHIrCIM=";
};
botan2 = common {
version = "2.19.5";
hash = "sha256-3+6g4KbybWckxK8B2pp7iEh62y2Bunxy/K9S21IsmtQ=";
};
}

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
fetchurl,
updateAutotoolsGnuConfigScriptsHook,
withCMake ? true,
cmake,
# sensitive downstream packages
curl,
grpc, # consumes cmake config
}:
# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
stdenv.mkDerivation rec {
pname = "c-ares";
version = "1.34.5";
src = fetchurl {
# Note: tag name varies in some versions, e.g. v1.30.0, c-ares-1_17_0.
url = "https://github.com/c-ares/c-ares/releases/download/v${version}/c-ares-${version}.tar.gz";
hash = "sha256-fZNXkOmvCBwlxJX9E8LPzaR5KYNBjpY1jvbnMg7gY0Y=";
};
outputs = [
"out"
"dev"
"man"
];
nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ] ++ lib.optionals withCMake [ cmake ];
cmakeFlags =
[ ]
++ lib.optionals stdenv.hostPlatform.isStatic [
"-DCARES_SHARED=OFF"
"-DCARES_STATIC=ON"
];
enableParallelBuilding = true;
passthru.tests = {
inherit grpc;
curl = (curl.override { c-aresSupport = true; }).tests.withCheck;
};
preFixup = lib.optionalString withCMake ''
substituteInPlace $out/lib/pkgconfig/libcares.pc --replace-fail \''${prefix}/ ""
'';
meta = with lib; {
description = "C library for asynchronous DNS requests";
homepage = "https://c-ares.haxx.se";
changelog = "https://c-ares.org/changelog.html#${lib.replaceStrings [ "." ] [ "_" ] version}";
license = licenses.mit;
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
testers,
static ? stdenv.hostPlatform.isStatic,
lz4,
zlib,
zstd,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "c-blosc";
version = "1.21.6";
src = fetchFromGitHub {
owner = "Blosc";
repo = "c-blosc";
rev = "v${finalAttrs.version}";
sha256 = "sha256-YelKkEXAh27J0Mq1BExGuKNCYBgJCc3nwmmWLr4ZfVI=";
};
patches = [
# backport patch for cmake 4 compatibility
(fetchpatch {
url = "https://github.com/Blosc/c-blosc/commit/051b9d2cb9437e375dead8574f66d80ebce47bee.patch";
hash = "sha256-90dUd8KQqq+uVbngfoKF45rmFxbLVVgZjg0Xfc/vpcc=";
})
];
# https://github.com/NixOS/nixpkgs/issues/144170
postPatch = ''
sed -i -E \
-e '/^libdir[=]/clibdir=@CMAKE_INSTALL_FULL_LIBDIR@' \
-e '/^includedir[=]/cincludedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@' \
blosc.pc.in
'';
nativeBuildInputs = [ cmake ];
buildInputs = [
lz4
zlib
zstd
];
cmakeFlags = [
"-DBUILD_STATIC=${if static then "ON" else "OFF"}"
"-DBUILD_SHARED=${if static then "OFF" else "ON"}"
"-DPREFER_EXTERNAL_LZ4=ON"
"-DPREFER_EXTERNAL_ZLIB=ON"
"-DPREFER_EXTERNAL_ZSTD=ON"
"-DBUILD_EXAMPLES=OFF"
"-DBUILD_BENCHMARKS=OFF"
"-DBUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
];
doCheck = !static;
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "Blocking, shuffling and loss-less compression library";
homepage = "https://www.blosc.org";
changelog = "https://github.com/Blosc/c-blosc/releases/tag/v${finalAttrs.version}";
pkgConfigModules = [ "blosc" ];
license = licenses.bsd3;
platforms = platforms.all;
maintainers = with maintainers; [ ris ];
};
})

View File

@@ -0,0 +1,76 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
testers,
static ? stdenv.hostPlatform.isStatic,
lz4,
zlib-ng,
zstd,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "c-blosc2";
version = "2.21.3";
src = fetchFromGitHub {
owner = "Blosc";
repo = "c-blosc2";
rev = "v${finalAttrs.version}";
sha256 = "sha256-jHp3l9sV5SiIOUjY2NUd5G+rH/8wr3TLZ+q/F8TAVhU=";
};
# https://github.com/NixOS/nixpkgs/issues/144170
postPatch = ''
sed -i -E \
-e '/^libdir[=]/clibdir=@CMAKE_INSTALL_FULL_LIBDIR@' \
-e '/^includedir[=]/cincludedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@' \
blosc2.pc.in
'';
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [
lz4
zlib-ng
zstd
];
cmakeFlags = [
"-DBUILD_STATIC=${if static then "ON" else "OFF"}"
"-DBUILD_SHARED=${if static then "OFF" else "ON"}"
"-DPREFER_EXTERNAL_LZ4=ON"
"-DPREFER_EXTERNAL_ZLIB=ON"
"-DPREFER_EXTERNAL_ZSTD=ON"
"-DBUILD_EXAMPLES=OFF"
"-DBUILD_BENCHMARKS=OFF"
"-DBUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
];
doCheck = !static;
# possibly https://github.com/Blosc/c-blosc2/issues/432
enableParallelChecking = false;
passthru.tests = {
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
cmake-config = testers.hasCmakeConfigModules {
moduleNames = [ "Blosc2" ];
package = finalAttrs.finalPackage;
};
};
meta = with lib; {
description = "Fast, compressed, persistent binary data store library for C";
homepage = "https://www.blosc.org";
changelog = "https://github.com/Blosc/c-blosc2/releases/tag/v${finalAttrs.version}";
pkgConfigModules = [ "blosc2" ];
license = licenses.bsd3;
platforms = platforms.all;
maintainers = with maintainers; [ ris ];
};
})

View File

@@ -0,0 +1,5 @@
{ callPackage }:
{
c-blosc = callPackage ./1.nix { };
c-blosc2 = callPackage ./2.nix { };
}

View File

@@ -0,0 +1,61 @@
{
stdenv,
lib,
fetchurl,
boost,
meson,
ninja,
pkg-config,
cairo,
fontconfig,
libsigcxx30,
}:
stdenv.mkDerivation rec {
pname = "cairomm";
version = "1.18.0";
outputs = [
"out"
"dev"
];
src = fetchurl {
url = "https://www.cairographics.org/releases/cairomm-${version}.tar.xz";
sha256 = "uBJVOU4+qOiqiHJ20ir6iYX8ja72BpLrJAfSMEnwPPs=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
boost # for tests
fontconfig
];
propagatedBuildInputs = [
cairo
libsigcxx30
];
mesonFlags = [
"-Dbuild-tests=true"
];
# Tests fail on Darwin, possibly because of sandboxing.
doCheck = !stdenv.hostPlatform.isDarwin;
meta = with lib; {
description = "C++ bindings for the Cairo vector graphics library";
homepage = "https://www.cairographics.org/";
license = with licenses; [
lgpl2Plus
mpl10
];
teams = [ teams.gnome ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,59 @@
{
fetchurl,
stdenv,
lib,
pkg-config,
boost,
cairo,
fontconfig,
libsigcxx,
meson,
ninja,
}:
stdenv.mkDerivation rec {
pname = "cairomm";
version = "1.14.5";
outputs = [
"out"
"dev"
];
src = fetchurl {
url = "https://www.cairographics.org/releases/cairomm-${version}.tar.xz";
sha256 = "cBNiA1QMiE6Jzhye37Y2m5lTk39s1ZbZfHjJdYpdSNs=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
boost # for tests
fontconfig
];
propagatedBuildInputs = [
cairo
libsigcxx
];
mesonFlags = [
"-Dbuild-tests=true"
];
doCheck = !stdenv.hostPlatform.isDarwin;
meta = with lib; {
description = "C++ bindings for the Cairo vector graphics library";
homepage = "https://www.cairographics.org/";
license = with licenses; [
lgpl2Plus
mpl10
];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
cmake,
fetchFromGitHub,
fixDarwinDylibNames,
}:
stdenv.mkDerivation rec {
pname = "capstone";
version = "4.0.2";
src = fetchFromGitHub {
owner = "capstone-engine";
repo = "capstone";
rev = version;
sha256 = "sha256-XMwQ7UaPC8YYu4yxsE4bbR3leYPfBHu5iixSLz05r3g=";
};
nativeBuildInputs = [
cmake
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
fixDarwinDylibNames
];
doCheck = true;
meta = {
description = "Advanced disassembly library";
homepage = "http://www.capstone-engine.org";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
thoughtpolice
ris
];
mainProgram = "cstool";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
cmake,
fetchFromGitHub,
fixDarwinDylibNames,
}:
stdenv.mkDerivation rec {
pname = "capstone";
version = "5.0.6";
src = fetchFromGitHub {
owner = "capstone-engine";
repo = "capstone";
rev = version;
hash = "sha256-ovIvsxVq+/q5UUMzP4WpxzaE0898uayNc1g2Coignnc=";
};
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ (lib.cmakeBool "CAPSTONE_BUILD_MACOS_THIN" true) ];
nativeBuildInputs = [
cmake
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
fixDarwinDylibNames
];
doCheck = true;
meta = {
description = "Advanced disassembly library";
homepage = "http://www.capstone-engine.org";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
thoughtpolice
ris
];
mainProgram = "cstool";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,54 @@
{
fetchFromGitHub,
lib,
stdenv,
cmake,
zlib,
libuv,
openssl,
pkg-config,
examples ? false,
}:
stdenv.mkDerivation rec {
pname = "cassandra-cpp-driver";
version = "2.17.1";
src = fetchFromGitHub {
owner = "datastax";
repo = "cpp-driver";
tag = version;
sha256 = "sha256-GuvmKHJknudyn7ahrn/8+kKUA4NW5UjCfkYoX3aTE+Q=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
zlib
libuv
openssl.dev
];
cmakeFlags =
(lib.attrsets.mapAttrsToList
(name: value: "-DCASS_BUILD_${name}:BOOL=${if value then "ON" else "OFF"}")
{
EXAMPLES = examples;
}
)
++ [ "-DLIBUV_INCLUDE_DIR=${lib.getDev libuv}/include" ];
meta = with lib; {
description = "DataStax CPP cassandra driver";
longDescription = ''
A modern, feature-rich and highly tunable C/C++ client
library for Apache Cassandra 2.1+ using exclusively Cassandras
binary protocol and Cassandra Query Language v3.
'';
license = with licenses; [ asl20 ];
platforms = platforms.x86_64;
homepage = "https://docs.datastax.com/en/developer/cpp-driver/";
maintainers = [ maintainers.npatsakula ];
};
}

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