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,40 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
nodejs,
nix-update-script,
nixosTests,
}:
buildNpmPackage rec {
pname = "db-rest";
version = "6.1.0";
inherit nodejs;
src = fetchFromGitHub {
owner = "derhuerst";
repo = "db-rest";
rev = version;
hash = "sha256-1iJ26l6C6GevNkoDVMztPHiH3YsutJa3xWAsfYvgR9U=";
};
npmDepsHash = "sha256-ELVVsysNjkXuX4i6i5P3irn6twVDu6YiPYqy2hbIlIs=";
preConfigure = ''
patchShebangs ./build/index.js
'';
passthru.updateScript = nix-update-script { };
passthru.tests = {
inherit (nixosTests) db-rest;
};
meta = {
description = "Clean REST API wrapping around the Deutsche Bahn API";
homepage = "https://v6.db.transport.rest/";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ marie ];
mainProgram = "db-rest";
};
}

View File

@@ -0,0 +1,23 @@
{
fetchurl,
lib,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "dbacl";
version = "1.14";
src = fetchurl {
url = "https://www.lbreyer.com/gpl/dbacl-${version}.tar.gz";
sha256 = "0224g6x71hyvy7jikfxmgcwww1r5lvk0jx36cva319cb9nmrbrq7";
};
meta = {
homepage = "https://dbacl.sourceforge.net/";
longDescription = "a digramic Bayesian classifier for text recognition.";
maintainers = [ ];
license = lib.licenses.gpl3;
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,85 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
mpiCheckPhaseHook,
pkg-config,
fypp,
gfortran,
blas,
lapack,
python3,
libxsmm,
mpi,
}:
stdenv.mkDerivation rec {
pname = "dbcsr";
version = "2.8.0";
src = fetchFromGitHub {
owner = "cp2k";
repo = "dbcsr";
rev = "v${version}";
hash = "sha256-YXySNw3+DiY7E57W1ypeWLyawwcWVGlmTM4Kgj7Nnmo=";
};
postPatch = ''
patchShebangs .
# Force build of shared library, otherwise just static.
substituteInPlace src/CMakeLists.txt \
--replace 'add_library(dbcsr ''${DBCSR_SRCS})' 'add_library(dbcsr SHARED ''${DBCSR_SRCS})' \
--replace 'add_library(dbcsr_c ''${DBCSR_C_SRCS})' 'add_library(dbcsr_c SHARED ''${DBCSR_C_SRCS})'
# Avoid calling the fypp wrapper script with python again. The nix wrapper took care of that.
substituteInPlace cmake/fypp-sources.cmake \
--replace 'COMMAND ''${Python_EXECUTABLE} ''${FYPP_EXECUTABLE}' 'COMMAND ''${FYPP_EXECUTABLE}'
'';
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
gfortran
python3
cmake
pkg-config
fypp
];
buildInputs = [
blas
lapack
libxsmm
];
propagatedBuildInputs = [ mpi ];
cmakeFlags = [
"-DUSE_OPENMP=ON"
"-DUSE_SMM=libxsmm"
"-DWITH_C_API=ON"
"-DBUILD_TESTING=ON"
"-DTEST_OMP_THREADS=2"
"-DTEST_MPI_RANKS=2"
"-DENABLE_SHARED=ON"
"-DUSE_MPI=ON"
];
checkInputs = [
mpiCheckPhaseHook
];
doCheck = true;
meta = with lib; {
description = "Distributed Block Compressed Sparse Row matrix library";
license = licenses.gpl2Only;
homepage = "https://github.com/cp2k/dbcsr";
maintainers = [ maintainers.sheepforce ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "dbd";
version = "1.50-unstable-2016-01-04";
src = fetchFromGitHub {
owner = "gitdurandal";
repo = "dbd";
rev = "8cf5350781b6753fcdd863148a5dcc6976e693ca";
hash = "sha256-b2yBZ2/Ab+SviKNlyZgdfiZ7GGZ1sonZnblD0i+vuFw=";
};
makeFlags = [
"PREFIX=${placeholder "out"}"
"CC=${stdenv.cc.targetPrefix}cc"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ "darwin" ]
++ lib.optionals (stdenv.hostPlatform.isUnix && !stdenv.hostPlatform.isDarwin) [ "unix" ];
meta = with lib; {
description = "Netcat-clone, designed to be portable and offer strong encryption";
mainProgram = "dbd";
homepage = "https://github.com/gitdurandal/dbd";
maintainers = with maintainers; [ d3vil0p3r ];
platforms = platforms.unix;
license = licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,155 @@
{
lib,
stdenvNoCC,
fetchurl,
undmg,
makeWrapper,
openjdk21,
gnused,
autoPatchelfHook,
autoSignDarwinBinariesHook,
wrapGAppsHook3,
gtk3,
glib,
webkitgtk_4_1,
glib-networking,
override_xmx ? "1024m",
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbeaver-bin";
version = "25.2.2";
src =
let
inherit (stdenvNoCC.hostPlatform) system;
selectSystem = attrs: attrs.${system} or (throw "Unsupported system: ${system}");
suffix = selectSystem {
x86_64-linux = "linux.gtk.x86_64-nojdk.tar.gz";
aarch64-linux = "linux.gtk.aarch64-nojdk.tar.gz";
x86_64-darwin = "macos-x86_64.dmg";
aarch64-darwin = "macos-aarch64.dmg";
};
hash = selectSystem {
x86_64-linux = "sha256-e0xIFoDmhX1+VetCEJoDZqu6+wrFwTwgIzU8hQ/mXnI=";
aarch64-linux = "sha256-80HW2GGBAuCYo+fxz+XZG3sZm0/QW5krHLS4jSGgGvU=";
x86_64-darwin = "sha256-w1b22Uce2PmX3f6UMrrkVxSxT/E5rFhiSgb3PjYaYvY=";
aarch64-darwin = "sha256-oQ10VB4puNBxFcFRdOtFFF+FcN9I7CUbWMc56V1Z90E=";
};
in
fetchurl {
url = "https://github.com/dbeaver/dbeaver/releases/download/${finalAttrs.version}/dbeaver-ce-${finalAttrs.version}-${suffix}";
inherit hash;
};
sourceRoot = lib.optional stdenvNoCC.hostPlatform.isDarwin "DBeaver.app";
nativeBuildInputs = [
makeWrapper
]
++ lib.optionals (!stdenvNoCC.hostPlatform.isDarwin) [
gnused
wrapGAppsHook3
autoPatchelfHook
]
++ lib.optionals stdenvNoCC.hostPlatform.isDarwin [
undmg
autoSignDarwinBinariesHook
];
dontConfigure = true;
dontBuild = true;
prePatch = ''
substituteInPlace ${lib.optionalString stdenvNoCC.hostPlatform.isDarwin "Contents/Eclipse/"}dbeaver.ini \
--replace-fail '-Xmx1024m' '-Xmx${override_xmx}'
''
# remove the bundled JRE configuration on Darwin
# dont use substituteInPlace here because it would match "-vmargs"
+ lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
sed -i -e '/^-vm$/ { N; d; }' Contents/Eclipse/dbeaver.ini
'';
preInstall = ''
# most directories are for different architectures, only keep what we need
shopt -s extglob
pushd ${lib.optionalString stdenvNoCC.hostPlatform.isDarwin "Contents/Eclipse/"}plugins/com.sun.jna_*/com/sun/jna/
rm -r !(ptr|internal|linux-x86-64|linux-aarch64|darwin-x86-64|darwin-aarch64)/
popd
''
# remove the bundled JRE on Darwin
+ lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
rm -r Contents/Eclipse/jre/
'';
installPhase =
if !stdenvNoCC.hostPlatform.isDarwin then
''
runHook preInstall
mkdir -p $out/opt/dbeaver $out/bin
cp -r * $out/opt/dbeaver
makeWrapper $out/opt/dbeaver/dbeaver $out/bin/dbeaver \
--prefix PATH : "${openjdk21}/bin" \
--set JAVA_HOME "${openjdk21.home}" \
--prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules" \
--prefix LD_LIBRARY_PATH : "$out/lib:${
lib.makeLibraryPath [
gtk3
glib
webkitgtk_4_1
glib-networking
]
}"
mkdir -p $out/share/icons/hicolor/256x256/apps
ln -s $out/opt/dbeaver/dbeaver.png $out/share/icons/hicolor/256x256/apps/dbeaver.png
mkdir -p $out/share/applications
ln -s $out/opt/dbeaver/dbeaver-ce.desktop $out/share/applications/dbeaver.desktop
substituteInPlace $out/opt/dbeaver/dbeaver-ce.desktop \
--replace-fail "/usr/share/dbeaver-ce/dbeaver.png" "dbeaver" \
--replace-fail "/usr/share/dbeaver-ce/dbeaver" "$out/bin/dbeaver"
sed -i '/^Path=/d' $out/share/applications/dbeaver.desktop
runHook postInstall
''
else
''
runHook preInstall
mkdir -p $out/{Applications/dbeaver.app,bin}
cp -R . $out/Applications/dbeaver.app
wrapProgram $out/Applications/dbeaver.app/Contents/MacOS/dbeaver \
--prefix PATH : "${openjdk21}/bin" \
--set JAVA_HOME "${openjdk21.home}"
makeWrapper $out/{Applications/dbeaver.app/Contents/MacOS/dbeaver,bin/dbeaver}
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = {
homepage = "https://dbeaver.io/";
changelog = "https://github.com/dbeaver/dbeaver/releases/tag/${finalAttrs.version}";
description = "Universal SQL Client for developers, DBA and analysts. Supports MySQL, PostgreSQL, MariaDB, SQLite, and more";
longDescription = ''
Free multi-platform database tool for developers, SQL programmers, database
administrators and analysts. Supports all popular databases: MySQL,
PostgreSQL, MariaDB, SQLite, Oracle, DB2, SQL Server, Sybase, MS Access,
Teradata, Firebird, Derby, etc.
'';
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.asl20;
platforms = with lib.platforms; linux ++ darwin;
maintainers = with lib.maintainers; [
gepbird
mkg20001
yzx9
];
mainProgram = "dbeaver";
};
})

View File

@@ -0,0 +1,27 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
BASEDIR="$(dirname "$0")/../../../.."
latestVersion=$(curl "https://api.github.com/repos/dbeaver/dbeaver/tags" | jq -r '.[0].name')
currentVersion=$(nix-instantiate --eval -E "with import ${BASEDIR} {}; lib.getVersion dbeaver-bin" | tr -d '"')
echo "latest version: $latestVersion"
echo "current version: $currentVersion"
if [[ "$latestVersion" == "$currentVersion" ]]; then
echo "package is up-to-date"
exit 0
fi
for i in \
"x86_64-linux linux.gtk.x86_64-nojdk.tar.gz" \
"aarch64-linux linux.gtk.aarch64-nojdk.tar.gz" \
"x86_64-darwin macos-x86_64.dmg" \
"aarch64-darwin macos-aarch64.dmg"
do
set -- $i
prefetch=$(nix-prefetch-url "https://github.com/dbeaver/dbeaver/releases/download/$latestVersion/dbeaver-ce-$latestVersion-$2")
hash=$(nix-hash --type sha256 --to-sri $prefetch)
(cd "$BASEDIR" && update-source-version dbeaver-bin $latestVersion $hash --system=$1 --ignore-same-version)
done

View File

@@ -0,0 +1,96 @@
{
lib,
stdenv,
appimageTools,
fetchurl,
_7zz,
}:
let
pname = "dbgate";
version = "6.6.4";
src =
fetchurl
{
aarch64-linux = {
url = "https://github.com/dbgate/dbgate/releases/download/v${version}/dbgate-${version}-linux_arm64.AppImage";
hash = "sha256-pwG+muAEVmyIK9eiCrydZ0glxPK5FGl7b3ps/8xeFgE=";
};
x86_64-linux = {
url = "https://github.com/dbgate/dbgate/releases/download/v${version}/dbgate-${version}-linux_x86_64.AppImage";
hash = "sha256-4xsxYbVbbfxJ70CaB3z/reRoPgBom/XX6/YfT30uDpY=";
};
x86_64-darwin = {
url = "https://github.com/dbgate/dbgate/releases/download/v${version}/dbgate-${version}-mac_x64.dmg";
hash = "sha256-plG9n/JtPmyUcJoP4kcAttKpzpT7ytt2M82CT0zZ4tA=";
};
aarch64-darwin = {
url = "https://github.com/dbgate/dbgate/releases/download/v${version}/dbgate-${version}-mac_universal.dmg";
hash = "sha256-cId3K8m+XRlYHD4NyjSEyFR6c4Yvk6UzGAkdHt0bQUs=";
};
}
.${stdenv.hostPlatform.system} or (throw "dbgate: ${stdenv.hostPlatform.system} is unsupported.");
passthru.updateScript = ./update.sh;
meta = {
description = "Database manager for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite and others";
homepage = "https://dbgate.org/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
changelog = "https://github.com/dbgate/dbgate/releases/tag/v${version}";
mainProgram = "dbgate";
platforms = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
in
if stdenv.hostPlatform.isDarwin then
stdenv.mkDerivation {
inherit
pname
version
src
passthru
meta
;
sourceRoot = ".";
nativeBuildInputs = [ _7zz ];
unpackPhase = "7zz x ${src}";
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r *.app $out/Applications
runHook postInstall
'';
}
else
let
appimageContents = appimageTools.extract { inherit pname src version; };
in
appimageTools.wrapType2 {
inherit
pname
version
src
passthru
meta
;
extraInstallCommands = ''
install -Dm644 ${appimageContents}/dbgate.desktop -t $out/share/applications
substituteInPlace $out/share/applications/dbgate.desktop \
--replace-warn "Exec=AppRun --no-sandbox" "Exec=dbgate"
cp -r ${appimageContents}/usr/share/icons $out/share
'';
}

View File

@@ -0,0 +1,22 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash nix-update common-updater-scripts nix
set -euo pipefail
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; dbgate.version or (lib.getVersion dbgate)" | tr -d '"')
nix-update dbgate
latestVersion=$(nix-instantiate --eval -E "with import ./. {}; dbgate.version or (lib.getVersion dbgate)" | tr -d '"')
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "package is up-to-date: $currentVersion"
exit 0
fi
for system in \
x86_64-linux \
aarch64-linux \
x86_64-darwin \
aarch64-darwin; do
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import ./. {}; dbgate.src.url" --system "$system" | tr -d '"')))
update-source-version dbgate $latestVersion $hash --system=$system --ignore-same-version
done

View File

@@ -0,0 +1,35 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbip-asn-lite";
version = "2025-09";
src = fetchurl {
url = "https://download.db-ip.com/free/dbip-asn-lite-${finalAttrs.version}.mmdb.gz";
hash = "sha256-QQO2dIKBphkOYoFlYUBqgk9FKSkUF2PTlgwFgFqGCCI=";
};
dontUnpack = true;
installPhase = ''
runHook preBuild
gzip -c -d "$src" > dbip-asn-lite.mmdb
install -Dm444 dbip-asn-lite.mmdb "$out/share/dbip/dbip-asn-lite.mmdb"
runHook postBuild
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-asn-lite.mmdb";
meta = {
description = "Free IP to ASN Lite database by DB-IP";
homepage = "https://db-ip.com/db/download/ip-to-asn-lite";
license = lib.licenses.cc-by-40;
maintainers = with lib.maintainers; [ Guanran928 ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,35 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbip-city-lite";
version = "2025-09";
src = fetchurl {
url = "https://download.db-ip.com/free/dbip-city-lite-${finalAttrs.version}.mmdb.gz";
hash = "sha256-/PSE1mKx3QEovL09cvkh932uH3RJWdUr+HUaBOeQvSE=";
};
dontUnpack = true;
installPhase = ''
runHook preInstall
gzip -c -d "$src" > dbip-city-lite.mmdb
install -Dm444 dbip-city-lite.mmdb "$out/share/dbip/dbip-city-lite.mmdb"
runHook postInstall
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-city-lite.mmdb";
meta = {
description = "Free IP to City Lite database by DB-IP";
homepage = "https://db-ip.com/db/download/ip-to-city-lite";
license = lib.licenses.cc-by-40;
maintainers = with lib.maintainers; [ Guanran928 ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,35 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbip-country-lite";
version = "2025-09";
src = fetchurl {
url = "https://download.db-ip.com/free/dbip-country-lite-${finalAttrs.version}.mmdb.gz";
hash = "sha256-l15K01Sx24Fs4BJWs2nK7UnJIDWAtxsvq7ayfVX7xZo=";
};
dontUnpack = true;
installPhase = ''
runHook preInstall
gzip -c -d "$src" > dbip-country-lite.mmdb
install -Dm444 dbip-country-lite.mmdb "$out/share/dbip/dbip-country-lite.mmdb"
runHook postInstall
'';
passthru.mmdb = "${finalAttrs.finalPackage}/share/dbip/dbip-country-lite.mmdb";
meta = {
description = "Free IP to Country Lite database by DB-IP";
homepage = "https://db-ip.com/db/download/ip-to-country-lite";
license = lib.licenses.cc-by-40;
maintainers = with lib.maintainers; [ nickcao ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,31 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "dblab";
version = "0.33.0";
src = fetchFromGitHub {
owner = "danvergara";
repo = "dblab";
rev = "v${version}";
hash = "sha256-PFS/9/UdoClktsTnkcILUdjLC9yjvMf60Tgb70lQ5pE=";
};
vendorHash = "sha256-WxIlGdd3Si3Lyf9FZOCAepDlRo2F3EDRy00EawkZATY=";
ldflags = [ "-s -w -X main.version=${version}" ];
# some tests require network access
doCheck = false;
meta = with lib; {
description = "Database client every command line junkie deserves";
homepage = "https://github.com/danvergara/dblab";
license = licenses.mit;
maintainers = with maintainers; [ dit7ya ];
};
}

View File

@@ -0,0 +1,115 @@
{
lib,
stdenv,
fetchurl,
python311,
libxslt,
texliveBasic,
enableAllFeatures ? false,
imagemagick,
fig2dev,
inkscape,
fontconfig,
ghostscript,
tex ? texliveBasic.withPackages (
ps: with ps; [
# satisfy all packages that ./configure mentions
epstopdf
anysize
appendix
changebar
fancybox
fancyvrb
float
footmisc
listings
jknapltx # for mathrsfs.sty
multirow
overpic
pdfpages
pdflscape
graphics
stmaryrd
subfigure
titlesec
wasysym
# pkgs below don't seem requested by dblatex, but our manual fails without them
ec
zapfding
symbol
eepic
times
rsfs
cs
tex4ht
courier
helvetic
ly1
]
),
}:
# NOTE: enableAllFeatures just purifies the expression, it doesn't actually
# enable any extra features.
stdenv.mkDerivation rec {
pname = "dblatex${lib.optionalString enableAllFeatures "-full"}";
version = "0.3.12";
src = fetchurl {
url = "mirror://sourceforge/dblatex/${pname}3-${version}.tar.bz2";
sha256 = "0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n";
};
buildInputs = [
python311
libxslt
tex
]
++ lib.optionals enableAllFeatures [
imagemagick
fig2dev
];
# TODO: dblatex tries to execute texindy command, but nixpkgs doesn't have
# that yet. In Ubuntu, texindy is a part of the xindy package.
preConfigure = ''
sed -i 's|self.install_layout == "deb"|False|' setup.py
''
+ lib.optionalString enableAllFeatures ''
for file in $(find -name "*.py"); do
sed -e 's|cmd = \["xsltproc|cmd = \["${libxslt.bin}/bin/xsltproc|g' \
-e 's|Popen(\["xsltproc|Popen(\["${libxslt.bin}/bin/xsltproc|g' \
-e 's|cmd = \["texindy|cmd = ["nixpkgs_is_missing_texindy|g' \
-e 's|cmd = "epstopdf|cmd = "${tex}/bin/epstopdf|g' \
-e 's|cmd = \["makeindex|cmd = ["${tex}/bin/makeindex|g' \
-e 's|doc.program = "pdflatex"|doc.program = "${tex}/bin/pdflatex"|g' \
-e 's|self.program = "latex"|self.program = "${tex}/bin/latex"|g' \
-e 's|Popen("pdflatex|Popen("${tex}/bin/pdflatex|g' \
-e 's|"fc-match"|"${fontconfig.bin}/bin/fc-match"|g' \
-e 's|"fc-list"|"${fontconfig.bin}/bin/fc-list"|g' \
-e 's|cmd = "inkscape|cmd = "${inkscape}/bin/inkscape|g' \
-e 's|cmd = "fig2dev|cmd = "${fig2dev}/bin/fig2dev|g' \
-e 's|cmd = \["ps2pdf|cmd = ["${ghostscript}/bin/ps2pdf|g' \
-e 's|cmd = "convert|cmd = "${imagemagick.out}/bin/convert|g' \
-i "$file"
done
'';
dontBuild = true;
installPhase = ''
${python311.interpreter} ./setup.py install --prefix="$out" --use-python-path --verbose
'';
passthru = { inherit tex; };
meta = {
description = "Program to convert DocBook to DVI, PostScript or PDF via LaTeX or ConTeXt";
mainProgram = "dblatex";
homepage = "https://dblatex.sourceforge.net/";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "dbmate";
version = "2.28.0";
src = fetchFromGitHub {
owner = "amacneil";
repo = "dbmate";
tag = "v${version}";
hash = "sha256-DQTeLqlZmzfTQoJBTFTX8x3iplkmrl1cplDQQcCGCZM=";
};
vendorHash = "sha256-Js0hiRt6l3ur7+pfeYa35C17gr77NHvapaSrgF9cP8c=";
doCheck = false;
meta = {
description = "Database migration tool";
mainProgram = "dbmate";
homepage = "https://github.com/amacneil/dbmate";
changelog = "https://github.com/amacneil/dbmate/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ manveru ];
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
aircrack-ng,
fetchFromGitHub,
iproute2,
networkmanager,
python3,
tshark,
wirelesstools,
}:
python3.pkgs.buildPythonApplication {
pname = "dbmonster";
version = "0-unstable-2022-09-17";
format = "other";
src = fetchFromGitHub {
owner = "90N45-d3v";
repo = "dBmonster";
rev = "4c79549079782a2991309120a55c8158701a9b70";
hash = "sha256-9RP3LmZF7P2c0+Jt/kMSVPb4cBtyH6P3FZ5UrQpBP0I=";
};
propagatedBuildInputs = [
aircrack-ng
iproute2
networkmanager
tshark
wirelesstools
]
++ (with python3.pkgs; [
matplotlib
]);
dontBuild = true;
installPhase = ''
runHook preInstall
install -vD dBmonster.py $out/bin/$pname.py
makeWrapper ${python3.interpreter} $out/bin/$pname \
--set PYTHONPATH "$PYTHONPATH:$out/bin/$pname" \
--add-flags "-O $out/bin/$pname.py"
runHook postInstall
'';
# Only script available
doCheck = false;
meta = with lib; {
description = "Tool to track WiFi devices by signal strength";
homepage = "https://github.com/90N45-d3v/dBmonster";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,83 @@
{
lib,
stdenv,
fetchFromGitHub,
jdk,
makeWrapper,
buildNativeImage ? false,
}:
stdenv.mkDerivation rec {
pname = "dbqn" + lib.optionalString buildNativeImage "-native";
version = "0.2.2";
src = fetchFromGitHub {
owner = "dzaima";
repo = "BQN";
rev = "v${version}";
hash = "sha256-AUfT7l7zr/pyG63wX8FMej8RUg7tXC1aroCrunjyw/8=";
};
nativeBuildInputs = [
jdk
makeWrapper
];
dontConfigure = true;
postPatch = ''
patchShebangs --build ./build8
'';
buildPhase = ''
runHook preBuild
./build8
''
+ lib.optionalString buildNativeImage ''
native-image --report-unsupported-elements-at-runtime \
-H:CLibraryPath=${lib.getLib jdk}/lib -J-Dfile.encoding=UTF-8 \
-jar BQN.jar dbqn
''
+ ''
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
''
+ (
if buildNativeImage then
''
mv dbqn $out/bin
''
else
''
mkdir -p $out/share/dbqn
mv BQN.jar $out/share/dbqn/
makeWrapper "${lib.getBin jdk}/bin/java" "$out/bin/dbqn" \
--add-flags "-jar $out/share/dbqn/BQN.jar"
''
)
+ ''
ln -s $out/bin/dbqn $out/bin/bqn
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/dzaima/BQN";
description =
"BQN implementation in Java" + lib.optionalString buildNativeImage ", compiled as a native image";
license = licenses.mit;
maintainers = with maintainers; [
sternenseemann
];
inherit (jdk.meta) platforms;
broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dbqn-native.x86_64-darwin
};
}

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
buildPackages,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "dbtpl";
version = "1.1.0";
src = fetchFromGitHub {
owner = "xo";
repo = "dbtpl";
tag = "v${finalAttrs.version}";
hash = "sha256-r0QIgfDSt7HWnIDnJWGbwkqkXWYWGXoF5H/+zS6gEtE=";
};
vendorHash = "sha256-scJRJaaccQovxhzC+/OHuPR4NRaE8+u57S1JY40bif8=";
nativeBuildInputs = [
installShellFiles
];
modPostBuild = ''
substituteInPlace vendor/github.com/xo/ox/ox.go \
--replace-warn "ver := \"(devel)\"" "ver := \"${finalAttrs.version}\""
'';
postInstall =
let
exe =
if stdenv.buildPlatform.canExecute stdenv.hostPlatform then
"$out/bin/dbtpl"
else
lib.getExe buildPackages.dbtpl;
in
''
installShellCompletion --cmd dbtpl \
--bash <(${exe} completion bash) \
--fish <(${exe} completion fish) \
--zsh <(${exe} completion zsh)
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server";
homepage = "https://github.com/xo/dbtpl";
changelog = "https://github.com/xo/dbtpl/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
xiaoxiangmoe
shellhazard
];
mainProgram = "dbtpl";
};
})

View File

@@ -0,0 +1,14 @@
diff --git a/src/meson.build b/src/meson.build
index 4b9bc71..221ed5c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -202,9 +202,6 @@ test('Error Handling', test_error, suite: 'unit')
test_fdlist = executable('test-fdlist', sources: ['util/test-fdlist.c'], kwargs: test_kwargs)
test('Utility File-Desciptor Lists', test_fdlist, suite: 'unit')
-test_fs = executable('test-fs', sources: ['util/test-fs.c'], kwargs: test_kwargs)
-test('File System Helpers', test_fs, suite: 'unit')
-
test_match = executable('test-match', sources: ['bus/test-match.c'], kwargs: test_kwargs)
test('D-Bus Match Handling', test_match, suite: 'unit')

View File

@@ -0,0 +1,176 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
docutils,
meson,
ninja,
pkg-config,
dbus,
linuxHeaders,
systemd,
}:
let
meta = {
maintainers = with lib.maintainers; [
peterhoeg
rvdp
];
platforms = lib.platforms.linux;
};
dep =
{
pname,
version,
hash,
rev ? "v${version}",
buildInputs ? [ ],
}:
stdenv.mkDerivation {
inherit pname version;
src = fetchFromGitHub {
owner = "c-util";
repo = pname;
inherit hash rev;
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
inherit buildInputs;
meta = meta // {
description = "C-Util Project is a collection of utility libraries for the C11 language";
homepage = "https://c-util.github.io/";
license = [
lib.licenses.asl20
lib.licenses.lgpl21Plus
];
};
};
# These libraries are not used outside of dbus-broker.
#
# If that changes, we can always break them out, but they are essentially
# part of the dbus-broker project, just in separate repositories.
c-dvar = dep {
pname = "c-dvar";
version = "1.2.0";
hash = "sha256-OlV6yR1tNWFN+rxPPGmbfbh7WyB6FwORyZR1V553iYE=";
buildInputs = [
c-stdaux
c-utf8
];
};
c-ini = dep {
pname = "c-ini";
version = "1.1.0";
hash = "sha256-wa7aNl20hkb/83c4AkQ/0YFDdmBs4XGW+WLUtBWIC98=";
buildInputs = [
c-list
c-rbtree
c-stdaux
c-utf8
];
};
c-list = dep {
pname = "c-list";
version = "3.1.0";
hash = "sha256-fp3EAqcbFCLaT2EstLSzwP2X13pi2EFpFAullhoCtpw=";
};
c-rbtree = dep {
pname = "c-rbtree";
version = "3.2.0";
hash = "sha256-dTMeawhPLRtHvMXfXCrT5iCdoh7qS3v+raC6c+t+X38=";
buildInputs = [ c-stdaux ];
};
c-shquote = dep {
pname = "c-shquote";
version = "1.1.0";
hash = "sha256-z6hpQ/kpCYAngMNfxLkfsxaGtvP4yBMigX1lGpIIzMQ=";
buildInputs = [ c-stdaux ];
};
c-stdaux = dep {
pname = "c-stdaux";
version = "1.6.0";
hash = "sha256-/15lop+WUkTW9v9h7BBdwRSpJgcBXaJNtMM7LXgcQE4=";
};
c-utf8 = dep {
pname = "c-utf8";
version = "1.1.0";
hash = "sha256-9vBYylbt1ypJwIAQJd/oiAueh+4VYcn/KzofQuhUea0=";
buildInputs = [ c-stdaux ];
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "dbus-broker";
version = "37";
src = fetchFromGitHub {
owner = "bus1";
repo = "dbus-broker";
rev = "v${finalAttrs.version}";
hash = "sha256-a9ydcJKZP8MLzu9lv40p9sTyo8IsU++9HOFeGU3+Tok=";
};
patches = [
./paths.patch
./disable-test.patch
(fetchpatch {
name = "backport-test-sockopt-6.16-fix.patch";
url = "https://github.com/bus1/dbus-broker/commit/fd5c6e191bffcf5b3e6c9abb8b0b03479accc04b.patch";
hash = "sha256-+QgZzm/qRnVSr0wDNw9Np3LRreRKl6CQXJextLPy6fc=";
})
];
nativeBuildInputs = [
docutils
meson
ninja
pkg-config
];
buildInputs = [
c-dvar
c-ini
c-list
c-rbtree
c-shquote
c-stdaux
c-utf8
dbus
linuxHeaders
systemd
];
mesonFlags = [
# while we technically support 4.9 and 4.14, the NixOS module will throw an
# error when using a kernel that's too old
"-D=linux-4-17=true"
"-D=system-console-users=gdm,sddm,lightdm"
];
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
PKG_CONFIG_SYSTEMD_CATALOGDIR = "${placeholder "out"}/lib/systemd/catalog";
postInstall = ''
install -Dm444 $src/README.md $out/share/doc/dbus-broker/README
sed -i $out/lib/systemd/{system,user}/dbus-broker.service \
-e 's,^ExecReload.*busctl,ExecReload=${systemd}/bin/busctl,'
'';
doCheck = true;
meta = meta // {
description = "Linux D-Bus Message Broker";
homepage = "https://github.com/bus1/dbus-broker/wiki";
license = lib.licenses.asl20;
};
})

View File

@@ -0,0 +1,27 @@
diff --git a/src/launch/launcher.c b/src/launch/launcher.c
index 7b1fb19..6bc2c46 100644
--- a/src/launch/launcher.c
+++ b/src/launch/launcher.c
@@ -945,9 +945,7 @@ static int launcher_load_standard_system_services(Launcher *launcher, NSSCache *
static const char *default_data_dirs[] = {
"/etc",
"/run",
- "/usr/local/share",
- "/usr/share",
- "/lib",
+ "/run/current-system/sw/share",
NULL,
};
const char *suffix = "dbus-1/system-services";
@@ -1033,9 +1031,9 @@ static int launcher_parse_config(Launcher *launcher, ConfigRoot **rootp, NSSCach
if (launcher->configfile)
configfile = launcher->configfile;
else if (launcher->user_scope)
- configfile = "/usr/share/dbus-1/session.conf";
+ configfile = "/etc/dbus-1/session.conf";
else
- configfile = "/usr/share/dbus-1/system.conf";
+ configfile = "/etc/dbus-1/system.conf";
config_parser_init(&parser);

View File

@@ -0,0 +1,116 @@
{
stdenv,
lib,
fetchFromGitLab,
gitUpdater,
testers,
boost186,
cmake,
dbus,
doxygen,
graphviz,
gtest,
libxml2,
lomiri,
pkg-config,
process-cpp,
properties-cpp,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dbus-cpp";
version = "5.0.5";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/lib-cpp/dbus-cpp";
tag = finalAttrs.version;
hash = "sha256-+QqmZsBFmYRwaAFqRyMBxVFFrjZGBDdMaW4YD/7D2gU=";
};
outputs = [
"out"
"dev"
"doc"
"examples"
];
postPatch = ''
substituteInPlace doc/CMakeLists.txt \
--replace-fail 'DESTINATION share/''${CMAKE_PROJECT_NAME}/doc' 'DESTINATION ''${CMAKE_INSTALL_DOCDIR}'
# Warning on aarch64-linux breaks build due to -Werror
substituteInPlace CMakeLists.txt \
--replace-fail '-Werror' ""
# pkg-config output patching hook expects prefix variable here
substituteInPlace data/dbus-cpp.pc.in \
--replace-fail 'includedir=''${exec_prefix}' 'includedir=''${prefix}'
''
+ lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
substituteInPlace CMakeLists.txt \
--replace-fail 'add_subdirectory(tests)' '# add_subdirectory(tests)'
'';
strictDeps = true;
nativeBuildInputs = [
cmake
doxygen
graphviz
pkg-config
];
buildInputs = [
boost186 # uses boost/asio/io_service.hpp
lomiri.cmake-extras
dbus
libxml2
process-cpp
properties-cpp
];
nativeCheckInputs = [
dbus
];
checkInputs = [
gtest
];
cmakeFlags = [
(lib.cmakeBool "DBUS_CPP_ENABLE_DOC_GENERATION" true)
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
# DBus, parallelism messes with communication
enableParallelChecking = false;
preFixup = ''
moveToOutput libexec/examples $examples
'';
passthru = {
tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
# Not bumped for 5.0.5: https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/issues/9
# Try again on next bump.
versionCheck = finalAttrs.version != "5.0.5";
};
updateScript = gitUpdater { };
};
meta = {
description = "Dbus-binding leveraging C++-11";
homepage = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp";
changelog = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/blob/${finalAttrs.version}/ChangeLog";
license = lib.licenses.lgpl3Only;
maintainers = with lib.maintainers; [ OPNA2608 ];
mainProgram = "dbus-cppc";
platforms = lib.platforms.linux;
pkgConfigModules = [
"dbus-cpp"
];
};
})

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchurl,
buildPackages,
pkg-config,
expat,
gettext,
libiconv,
dbus,
glib,
}:
stdenv.mkDerivation rec {
pname = "dbus-glib";
version = "0.114";
src = fetchurl {
url = "${meta.homepage}/releases/dbus-glib/dbus-glib-${version}.tar.gz";
sha256 = "sha256-wJxcCFsqDjkbjufXg6HWP+RE6WcXzBgU1htej8KCenw=";
};
outputs = [
"out"
"dev"
"devdoc"
];
outputBin = "dev";
nativeBuildInputs = [
pkg-config
gettext
glib
];
buildInputs = [
expat
libiconv
];
propagatedBuildInputs = [
dbus
glib
];
configureFlags = [
"--exec-prefix=${placeholder "dev"}"
]
++ lib.optional (
stdenv.buildPlatform != stdenv.hostPlatform
) "--with-dbus-binding-tool=${buildPackages.dbus-glib.dev}/bin/dbus-binding-tool";
doCheck = false;
passthru = { inherit dbus glib; };
meta = {
homepage = "https://dbus.freedesktop.org";
license = with lib.licenses; [
afl21
gpl2Plus
];
description = "Obsolete glib bindings for D-Bus lightweight IPC mechanism";
mainProgram = "dbus-binding-tool";
maintainers = [ ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,90 @@
{
stdenv,
lib,
fetchbzr,
testers,
autoreconfHook,
bash,
dbus,
dbus-glib,
glib,
intltool,
pkg-config,
python3,
xvfb-run,
gettext,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dbus-test-runner";
version = "unstable-2019-10-02";
src = fetchbzr {
url = "lp:dbus-test-runner";
rev = "109";
sha256 = "sha256-4yH19X98SVqpviCBIWzIX6FYHWxCbREpuKCNjQuTFDk=";
};
patches = [
# glib gettext is deprecated and broken, so use regular gettext instead
./use-regular-gettext.patch
];
postPatch = ''
patchShebangs tests/test-wait-outputer
# Tests `cat` together build shell scripts
# true is a PATHable call, bash a shebang
substituteInPlace tests/Makefile.am \
--replace '/bin/true' 'true' \
--replace '/bin/bash' '${lib.getExe bash}'
'';
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
glib # for autoconf macro, gtester, gdbus
gettext
intltool
pkg-config
];
buildInputs = [
dbus-glib
glib
];
nativeCheckInputs = [
bash
dbus
(python3.withPackages (
ps: with ps; [
python-dbusmock
]
))
xvfb-run
];
enableParallelBuilding = true;
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
checkFlags = [
"XVFB_RUN=${lib.getExe xvfb-run}"
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "Small little utility to run a couple of executables under a new DBus session for testing";
mainProgram = "dbus-test-runner";
homepage = "https://launchpad.net/dbus-test-runner";
license = licenses.gpl3Only;
platforms = platforms.unix;
teams = [ teams.lomiri ];
pkgConfigModules = [
"dbustest-1"
];
};
})

View File

@@ -0,0 +1,12 @@
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,8 @@ GETTEXT_PACKAGE=dbus-test-runner
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the default gettext domain])
-AM_GLIB_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.21])
###########################
# gcov coverage reporting

View File

@@ -0,0 +1,84 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
dbus,
glib,
pkg-config,
expat,
}:
stdenv.mkDerivation rec {
pname = "dbus-cplusplus";
version = "0.9.0";
src = fetchurl {
url = "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/0.9.0/libdbus-c%2B%2B-0.9.0.tar.gz";
name = "${pname}-${version}.tar.gz";
sha256 = "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw";
};
patches = [
(fetchurl {
name = "gcc-4.7.patch";
url =
"https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/"
+ "dbus-c++/files/dbus-c++-0.9.0-gcc-4.7.patch?id=dec60bb6900d6ebdaaa6aa1dcb845b30b739f9b5";
sha256 = "0rwcz9pvc13b3yfr0lkifnfz0vb5q6dg240bzgf37ni4s8rpc72g";
})
(fetchpatch {
name = "writechar.patch"; # since gcc7
url = "https://src.fedoraproject.org/rpms/dbus-c++/raw/9f515ace0594c8b2b9f0d41ffe71bc5b78d30eee/f/dbus-c++-writechar.patch";
sha256 = "1kkg4gbpm4hp87l25zw2a3r9c58g7vvgzcqgiman734i66zsbb9l";
})
(fetchpatch {
name = "threading.patch"; # since gcc7
url = "https://src.fedoraproject.org/rpms/dbus-c++/raw/9f515ace0594c8b2b9f0d41ffe71bc5b78d30eee/f/dbus-c++-threading.patch";
sha256 = "1h362anx3wyxm5lq0v8girmip1jmkdbijrmbrq7k5pp47zkhwwrq";
})
(fetchpatch {
name = "template-operators.patch"; # since gcc12
url = "https://src.fedoraproject.org/rpms/dbus-c++/raw/9f515ace0594c8b2b9f0d41ffe71bc5b78d30eee/f/dbus-c++-template-operators.patch";
hash = "sha256-B8S7z/YH2YEQgaRsBJBBVTx8vHQhHW7z171TZmogpL8=";
})
(fetchpatch {
name = "0001-src-eventloop.cpp-use-portable-method-for-initializi.patch";
url = "https://github.com/openembedded/meta-openembedded/raw/119e75e48dbf0539b4e440417901458ffff79b38/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0001-src-eventloop.cpp-use-portable-method-for-initializi.patch";
hash = "sha256-GJWvp5F26c88OCGLrFcXaqUl2FMSDCluppMrRQO3rzc=";
})
(fetchpatch {
name = "0002-tools-generate_proxy.cpp-avoid-possibly-undefined-ui.patch";
url = "https://github.com/openembedded/meta-openembedded/raw/119e75e48dbf0539b4e440417901458ffff79b38/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0002-tools-generate_proxy.cpp-avoid-possibly-undefined-ui.patch";
hash = "sha256-P9JuG/6k5L6NTiAGH9JRfNcwpNVOV29RQC6fTj0fKZE=";
})
(fetchpatch {
name = "0003-Fixed-undefined-ssize_t-for-clang-3.8.0-on-FreeBSD.patch";
url = "https://github.com/openembedded/meta-openembedded/raw/119e75e48dbf0539b4e440417901458ffff79b38/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0003-Fixed-undefined-ssize_t-for-clang-3.8.0-on-FreeBSD.patch";
hash = "sha256-/RCpDvaLIw0kmuBvUGbfnVEvgTKjIQWcSKWheCfgSmM=";
})
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
dbus
glib
expat
];
configureFlags = [
"--disable-ecore"
"--disable-tests"
]
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
"--disable-examples"
];
meta = with lib; {
homepage = "https://dbus-cplusplus.sourceforge.net";
description = "C++ API for D-BUS";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchurl,
gettext,
jdk8,
libmatthew_java,
}:
stdenv.mkDerivation rec {
pname = "dbus-java";
version = "2.7";
src = fetchurl {
url = "https://dbus.freedesktop.org/releases/dbus-java/dbus-java-${version}.tar.gz";
sha256 = "0cyaxd8x6sxmi6pklkkx45j311a6w51fxl4jc5j3inc4cailwh5y";
};
JAVA_HOME = jdk8;
JAVA = "${jdk8}/bin/java";
PREFIX = "\${out}";
JAVAUNIXLIBDIR = "${libmatthew_java}/lib/jni";
JAVAUNIXJARDIR = "${libmatthew_java}/share/java";
buildInputs = [
gettext
jdk8
];
# I'm too lazy to build the documentation
preBuild = ''
sed -i -e "s|all: bin doc man|all: bin|" \
-e "s|install: install-bin install-man install-doc|install: install-bin|" Makefile
'';
meta = with lib; {
platforms = platforms.linux;
maintainers = [ maintainers.sander ];
license = licenses.afl21;
};
}

View File

@@ -0,0 +1,74 @@
{
lib,
copyDesktopItems,
fetchurl,
makeDesktopItem,
makeWrapper,
openjdk17,
stdenv,
}:
let
pname = "dbvisualizer";
in
stdenv.mkDerivation (finalAttrs: {
inherit pname;
version = "25.1.5";
src =
let
underscoreVersion = builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version;
in
fetchurl {
url = "https://www.dbvis.com/product_download/dbvis-${finalAttrs.version}/media/dbvis_linux_${underscoreVersion}.tar.gz";
hash = "sha256-PLYolzwQa9xj6z+r/8jS9tbiR8zVTQKOhtJJBN8dNhI=";
};
strictDeps = true;
nativeBuildInputs = [
copyDesktopItems
makeWrapper
];
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "DB Visualizer";
tryExec = "dbvis";
exec = "dbvis";
icon = "dbvisualizer";
categories = [ "Development" ];
terminal = false;
keywords = [
"Database"
"SQL"
];
})
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -a . $out
mkdir -p $out/share/icons/hicolor/128x128/apps
ln -s $out/resources/images/tool/dbvis-icon128x128.png \
$out/share/icons/hicolor/128x128/apps/dbvisualizer.png
ln -s $out/dbvis $out/bin/
wrapProgram $out/bin/dbvis --set INSTALL4J_JAVA_HOME ${openjdk17}
runHook postInstall
'';
meta = {
description = "Universal database tool";
homepage = "https://www.dbvis.com/";
maintainers = with lib.maintainers; [ boldikoller ];
license = lib.licenses.unfree;
mainProgram = "dbvis";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
};
})

View File

@@ -0,0 +1,162 @@
{
lib,
stdenv,
python3,
fetchFromGitHub,
# tests
addBinToPathHook,
gitMinimal,
versionCheckHook,
writableTmpDirAsHomeHook,
}:
let
python = python3.override {
self = python;
packageOverrides = self: super: {
pydantic = super.pydantic_1;
# python-on-whales is the only aiohttp dependency that is incompatible with pydantic_1
# Override aiohttp to remove this dependency
aiohttp = super.aiohttp.overridePythonAttrs (old: {
# Remove python-on-whales from nativeCheckInputs
nativeCheckInputs = lib.filter (p: (p.pname or "") != "python-on-whales") old.nativeCheckInputs;
disabledTestPaths = [
# Requires python-on-whales
"tests/autobahn/test_autobahn.py"
]
++ (old.disabledTestPaths or [ ]);
});
databricks-sdk = super.databricks-sdk.overridePythonAttrs (old: {
# Tests require langchain-openai which is incompatible with pydantic_1
doCheck = false;
});
versioningit = super.versioningit.overridePythonAttrs (old: {
# Tests fail with pydantic_1
# AttributeError: type object 'CaseDetails' has no attribute 'model_validate_...
doCheck = false;
});
};
};
in
python.pkgs.buildPythonApplication rec {
pname = "dbx";
version = "0.8.19";
pyproject = true;
src = fetchFromGitHub {
owner = "databrickslabs";
repo = "dbx";
tag = "v${version}";
hash = "sha256-DNVJcCDHyWCorTxNN6RR6TWNF2MrysXT44UbwegROTU=";
};
postPatch = ''
# Probably a typo
substituteInPlace src/dbx/custom.py \
--replace-fail "_make_rich_rext" "_make_rich_text"
# dbx pins an old version of typer.
# In newer versions of typer, `callback` does not accept the 'name' argument anymore.
substituteInPlace src/dbx/cli.py \
--replace-fail 'name="dbx",' ""
# Fixes: TypeError: 'NoneType' object is not iterable
substituteInPlace src/dbx/utils/common.py \
--replace-fail \
'[t.split("=") for t in multiple_argument]' \
'[t.split("=") for t in multiple_argument] if multiple_argument else []'
'';
pythonRelaxDeps = [
"cryptography"
"databricks-cli"
"pydantic"
"rich"
"tenacity"
"typer"
];
pythonRemoveDeps = [ "mlflow-skinny" ];
build-system = with python.pkgs; [
hatch-vcs
hatchling
];
dependencies = with python.pkgs; [
aiohttp
click
cookiecutter
cryptography
databricks-cli
jinja2
mlflow
pathspec
pydantic
pyyaml
requests
retry
rich
setuptools
tenacity
typer
watchdog
];
optional-dependencies = with python.pkgs; {
aws = [ boto3 ];
azure = [
azure-storage-blob
azure-identity
];
gcp = [ google-cloud-storage ];
};
nativeCheckInputs = [
addBinToPathHook
gitMinimal
versionCheckHook
writableTmpDirAsHomeHook
]
++ (with python.pkgs; [
pytest-asyncio
pytest-mock
pytest-timeout
pytest-xdist
pytestCheckHook
]);
versionCheckProgramArg = "--version";
disabledTests = [
# Fails because of dbfs CLI wrong call
"test_dbfs_unknown_user"
"test_dbfs_no_root"
# Requires pylint, prospector, pydocstyle
"test_python_basic_sanity_check"
# FileNotFoundError: [Errno 2] No such file or directory: '/build/tmph3veuluv...
"test_load_file"
"test_storage_serde"
];
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
# ERROR fsevents:fsevents.py:310 Unhandled exception in FSEventsEmitter
# SystemError: Cannot start fsevents stream. Use a kqueue or polling observer instead.
"tests/unit/sync/test_event_handler.py"
];
pythonImportsCheck = [ "dbx" ];
meta = {
description = "CLI tool for advanced Databricks jobs management";
homepage = "https://github.com/databrickslabs/dbx";
changelog = "https://github.com/databrickslabs/dbx/blob/v${version}/CHANGELOG.md";
license = lib.licenses.databricks-dbx;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,59 @@
diff -urN dbxml-6.1.4.orig/dbxml/src/dbxml/nodeStore/NsUpdate.cpp dbxml-6.1.4/dbxml/src/dbxml/nodeStore/NsUpdate.cpp
--- dbxml-6.1.4.orig/dbxml/src/dbxml/nodeStore/NsUpdate.cpp 2017-05-01 16:05:29.000000000 +0100
+++ dbxml-6.1.4/dbxml/src/dbxml/nodeStore/NsUpdate.cpp 2017-09-04 11:50:20.000000000 +0100
@@ -1359,21 +1359,13 @@
void NsUpdate::attributeRemoved(const DbXmlNodeImpl &node)
{
string key = makeKey(node);
-#if defined(_MSC_VER) && (_MSC_VER>1600)
attrMap_.insert(make_pair(key,node.getIndex()));
-#else
- attrMap_.insert(make_pair<const std::string, int>(key,node.getIndex()));
-#endif
}
void NsUpdate::textRemoved(const DbXmlNodeImpl &node)
{
string key = makeKey(node);
-#if defined(_MSC_VER) && (_MSC_VER>1600)
textDeleteMap_.insert(make_pair(key,node.getIndex()));
-#else
- textDeleteMap_.insert(make_pair<const std::string, int>(key,node.getIndex()));
-#endif
}
void NsUpdate::textRemoved(int index, const NsNid &nid,
@@ -1381,21 +1373,13 @@
const std::string &cname)
{
string key = makeKey(nid, did, cname);
-#if defined(_MSC_VER) && (_MSC_VER>1600)
textDeleteMap_.insert(make_pair(key,index));
-#else
- textDeleteMap_.insert(make_pair<const std::string, int>(key,index));
-#endif
}
void NsUpdate::textInserted(int index, const DbXmlNodeImpl &node)
{
string key = makeKey(node);
-#if defined(_MSC_VER) && (_MSC_VER>1600)
textInsertMap_.insert(make_pair(key,index));
-#else
- textInsertMap_.insert(make_pair<const std::string, int>(key,index));
-#endif
}
void NsUpdate::textInserted(int index, const NsNid &nid,
@@ -1403,11 +1387,7 @@
const std::string &cname)
{
string key = makeKey(nid, did, cname);
-#if defined(_MSC_VER) && (_MSC_VER>1600)
textInsertMap_.insert(make_pair(key,index));
-#else
- textInsertMap_.insert(make_pair<const std::string, int>(key,index));
-#endif
}
//

View File

@@ -0,0 +1,34 @@
Patch provided by Lauren Foutz. See:
https://community.oracle.com/thread/4093422
--- dbxml-6.1.4-orig/dbxml/src/dbxml/query/ParentOfChildJoinQP.cpp
+++ dbxml-6.1.4/dbxml/src/dbxml/query/ParentOfChildJoinQP.cpp
@@ -139,28 +139,16 @@ bool ParentOfChildIterator::doJoin(Dynam
// Invarient 4: When ancestorStack_ is empty we can output the
// buffered results_, since any more results will come after them in
// document order.
while(true) {
context->testInterrupt();
- /*
- * If current parent's node level already be larger than
- * childen's, abandon current parent and move to next one.
- */
- if (parents_ != NULL &&
- parents_->getNodeLevel() > children_->getNodeLevel()) {
- if(!parents_->next(context)) {
- delete parents_;
- parents_ = 0;
- }
- }
-
int cmp = parents_ == 0 ? -1 : isDescendantOf(children_, parents_, /*orSelf*/false);
if(cmp < 0) {
if(!ancestorStack_.empty()) {
// We've found the closest ancestor - is it a parent?
if(ancestorStack_.back()->getNodeLevel() == (children_->getNodeLevel() - 1)) {
// Maintain invarient 3
if(results_.empty() || NodeInfo::compare(results_.back(), ancestorStack_.back()) < 0)
results_.push_back(ancestorStack_.back());

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchurl,
db62,
xercesc,
xqilla,
}:
stdenv.mkDerivation rec {
pname = "dbxml";
version = "6.1.4";
src = fetchurl {
url = "http://download.oracle.com/berkeley-db/${pname}-${version}.tar.gz";
sha256 = "a8fc8f5e0c3b6e42741fa4dfc3b878c982ff8f5e5f14843f6a7e20d22e64251a";
};
outputs = [
"bin"
"dev"
"out"
];
patches = [
./cxx11.patch
./incorrect-optimization.patch
];
buildInputs = [
xercesc
xqilla
];
propagatedBuildInputs = [
db62
];
configureFlags = [
"--with-berkeleydb=${db62.out}"
"--with-xerces=${xercesc}"
"--with-xqilla=${xqilla}"
# code uses register storage specifier
"CXXFLAGS=-std=c++14"
];
preConfigure = ''
cd dbxml
'';
meta = with lib; {
homepage = "https://www.oracle.com/database/berkeley-db/xml.html";
description = "Embeddable XML database based on Berkeley DB";
license = licenses.agpl3Only;
maintainers = [ ];
platforms = platforms.unix;
};
}