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,61 @@
{
lib,
stdenv,
fetchFromGitLab,
fetchpatch,
libGL,
libX11,
}:
stdenv.mkDerivation rec {
pname = "libstrangle";
version = "unstable-202202022";
buildInputs = [
libGL
libX11
];
src = fetchFromGitLab {
owner = "torkel104";
repo = pname;
rev = "0273e318e3b0cc759155db8729ad74266b74cb9b";
hash = "sha256-h10QA7m7hIQHq1g/vCYuZsFR2NVbtWBB46V6OWP5wgM=";
};
makeFlags = [
"prefix="
"DESTDIR=$(out)"
];
patches = [
./nixos.patch
# Pull the fix pending upstream inclusion for gcc-13:
# https://gitlab.com/torkel104/libstrangle/-/merge_requests/29
(fetchpatch {
name = "gcc-13.patch";
url = "https://gitlab.com/torkel104/libstrangle/-/commit/4e17025071de1d99630febe7270b4f63056d0dfa.patch";
hash = "sha256-AKMHAZhCPcn62pi4fBGhw2r8SNSkCDMUCpR3IlmJ7wQ=";
})
];
postPatch = ''
substituteAllInPlace src/strangle.sh
substituteAllInPlace src/stranglevk.sh
'';
postInstall = ''
substitute $out/share/vulkan/implicit_layer.d/libstrangle_vk.json $out/share/vulkan/implicit_layer.d/libstrangle_vk.x86.json \
--replace "libstrangle_vk.so" "$out/lib/libstrangle/lib32/libstrangle_vk.so"
substituteInPlace $out/share/vulkan/implicit_layer.d/libstrangle_vk.json \
--replace "libstrangle_vk.so" "$out/lib/libstrangle/lib64/libstrangle_vk.so"
'';
meta = with lib; {
homepage = "https://gitlab.com/torkel104/libstrangle";
description = "Frame rate limiter for Linux/OpenGL";
license = licenses.gpl3;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ aske ];
mainProgram = "strangle";
};
}

View File

@@ -0,0 +1,43 @@
diff --git a/makefile b/makefile
--- a/makefile
+++ b/makefile
@@ -86,10 +86,6 @@ install-common:
install -m 0755 -D -T $(SOURCEDIR)/stranglevk.sh $(DESTDIR)$(bindir)/stranglevk
install -m 0644 -D -T $(SOURCEDIR)/vulkan/libstrangle_vk.json $(DESTDIR)$(datarootdir)/vulkan/implicit_layer.d/libstrangle_vk.json
-install-ld: ld
- install -m 0644 -D -T $(BUILDDIR)/libstrangle.conf $(DESTDIR)/etc/ld.so.conf.d/libstrangle.conf
- if [ -z "$(DESTDIR)" ]; then ldconfig; fi
-
install-32: 32-bit
install -m 0755 -D -T $(BUILDDIR)/libstrangle32.so $(DESTDIR)$(LIB32_PATH)/libstrangle.so
install -m 0755 -D -T $(BUILDDIR)/libstrangle32_nodlsym.so $(DESTDIR)$(LIB32_PATH)/libstrangle_nodlsym.so
@@ -109,8 +105,7 @@ install: \
all \
install-common \
install-32 \
- install-64 \
- install-ld
+ install-64
clean:
rm -f $(BUILDDIR)/libstrangle64.so
diff --git a/src/strangle.sh b/src/strangle.sh
--- a/src/strangle.sh
+++ b/src/strangle.sh
@@ -130,6 +130,5 @@ if [ "$STRANGLE_VKONLY" != "1" ]; then
fi
fi
-# Execute the strangled program under a clean environment
# pass through the FPS and overriden LD_PRELOAD environment variables
-exec env ENABLE_VK_LAYER_TORKEL104_libstrangle=1 LD_PRELOAD="${LD_PRELOAD}" "$@"
+ENABLE_VK_LAYER_TORKEL104_libstrangle=1 XDG_DATA_DIRS="${XDG_DATA_DIRS}${XDG_DATA_DIRS:+:}@out@/share" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}@out@/lib/libstrangle/lib64:@out@/lib/libstrangle/lib32" LD_PRELOAD="${LD_PRELOAD}" exec "$@"
diff --git a/src/stranglevk.sh b/src/stranglevk.sh
--- a/src/stranglevk.sh
+++ b/src/stranglevk.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-ENABLE_VK_LAYER_TORKEL104_libstrangle=1 STRANGLE_VKONLY=1 strangle "$@"
+ENABLE_VK_LAYER_TORKEL104_libstrangle=1 STRANGLE_VKONLY=1 @out@/bin/strangle "$@"

View File

@@ -0,0 +1,45 @@
{
stdenv,
lib,
virtualglLib,
virtualglLib_i686 ? null,
makeWrapper,
vulkan-loader,
addDriverRunpath,
}:
stdenv.mkDerivation {
pname = "virtualgl";
version = lib.getVersion virtualglLib;
paths = [ virtualglLib ];
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
mkdir -p $out/bin
for i in ${virtualglLib}/bin/* ${virtualglLib}/bin/.vglrun*; do
ln -s "$i" $out/bin
done
wrapProgram $out/bin/vglrun \
--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath [
virtualglLib
virtualglLib_i686
addDriverRunpath.driverLink
# Needed for vulkaninfo to work
vulkan-loader
]
}"
''
+ lib.optionalString (virtualglLib_i686 != null) ''
ln -sf ${virtualglLib_i686}/bin/.vglrun.vars32 $out/bin
'';
meta = {
platforms = lib.platforms.linux;
inherit (virtualglLib.meta) license;
};
}

View File

@@ -0,0 +1,76 @@
{
lib,
stdenv,
fetchurl,
cmake,
libGL,
libGLU,
libXv,
libXtst,
libXi,
libjpeg_turbo,
fltk,
xorg,
opencl-headers,
opencl-clhpp,
ocl-icd,
}:
stdenv.mkDerivation rec {
pname = "virtualgl-lib";
version = "3.0.2";
src = fetchurl {
url = "mirror://sourceforge/virtualgl/VirtualGL-${version}.tar.gz";
sha256 = "sha256-OIEbwAQ71yOuHIzM+iaK7QkUJrKg6sXpGuFQOUPjM2w=";
};
postPatch = ''
# the unit tests take significant hacks to build and can't run anyway due to the lack
# of a 3D X server in the build sandbox. so we just chop out their build instructions.
head -n $(grep -n 'UNIT TESTS' server/CMakeLists.txt | cut -d : -f 1) server/CMakeLists.txt > server/CMakeLists2.txt
mv server/CMakeLists2.txt server/CMakeLists.txt
'';
cmakeFlags = [
"-DVGL_SYSTEMFLTK=1"
"-DTJPEG_LIBRARY=${libjpeg_turbo.out}/lib/libturbojpeg.so"
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "4.0")
];
makeFlags = [ "PREFIX=$(out)" ];
nativeBuildInputs = [ cmake ];
buildInputs = [
libjpeg_turbo
libGL
libGLU
fltk
libXv
libXtst
libXi
xorg.xcbutilkeysyms
opencl-headers
opencl-clhpp
ocl-icd
];
fixupPhase = ''
substituteInPlace $out/bin/vglrun \
--replace "LD_PRELOAD=libvglfaker" "LD_PRELOAD=$out/lib/libvglfaker" \
--replace "LD_PRELOAD=libdlfaker" "LD_PRELOAD=$out/lib/libdlfaker" \
--replace "LD_PRELOAD=libgefaker" "LD_PRELOAD=$out/lib/libgefaker"
'';
meta = with lib; {
homepage = "https://www.virtualgl.org/";
description = "X11 GL rendering in a remote computer with full 3D hw acceleration";
license = with licenses; [
lgpl2Plus
wxWindowsException31
];
platforms = platforms.linux;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,2 @@
[xbindkeys-config.1]
trim_trailing_whitespace = unset

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchurl,
gtk2,
pkg-config,
procps,
makeWrapper,
...
}:
stdenv.mkDerivation rec {
pname = "xbindkeys-config";
version = "0.1.3";
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10.
env.NIX_CFLAGS_COMPILE = "-fcommon";
nativeBuildInputs = [
pkg-config
makeWrapper
];
buildInputs = [ gtk2 ];
src = fetchurl {
url = "mirror://debian/pool/main/x/xbindkeys-config/xbindkeys-config_${version}.orig.tar.gz";
sha256 = "1rs3li2hyig6cdzvgqlbz0vw6x7rmgr59qd6m0cvrai8xhqqykda";
};
hardeningDisable = [ "format" ];
meta = {
homepage = "https://packages.debian.org/source/xbindkeys-config";
description = "Graphical interface for configuring xbindkeys";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ benley ];
platforms = with lib.platforms; linux;
mainProgram = "xbindkeys-config";
};
patches = [ ./xbindkeys-config-patch1.patch ];
# killall is dangerous on non-gnu platforms. Use pkill instead.
postPatch = ''
substituteInPlace middle.c --replace "killall" "pkill -x"
'';
installPhase = ''
mkdir -p $out/bin $out/share/man/man1
gzip -c ${./xbindkeys-config.1} > $out/share/man/man1/xbindkeys-config.1.gz
cp xbindkeys_config $out/bin/xbindkeys-config
wrapProgram $out/bin/xbindkeys-config --prefix PATH ":" "${procps}/bin"
'';
}

View File

@@ -0,0 +1,108 @@
---
Makefile | 6 +++---
menu.c | 11 ++++++++---
middle.c | 9 +++++++--
xbindkeys_config.c | 3 ++-
4 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index 602875c..28e46cd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
# makefile cr<63>e par Laurent VUIBERT
-CC= gcc -O3 -Wall
+CC= gcc $(CFLAGS)
STD= _GNU_SOURCE
-GTK= `gtk-config --cflags --libs`
-GTK2= `gtk-config --cflags`
+GTK= `pkg-config --cflags --libs gtk+-2.0`
+GTK2= `pkg-config --cflags gtk+-2.0`
OBJS= xbindkeys_config.o menu.o middle.o speedc.o
NOM= xbindkeys_config
diff --git a/menu.c b/menu.c
index ed3e7ec..f11526d 100644
--- a/menu.c
+++ b/menu.c
@@ -283,6 +283,8 @@ void menu_manual (GtkMenuItem *menuitem, gpointer user_data)
GtkWidget *window;
GtkWidget *text;
GtkWidget *vbox;
+ GtkTextBuffer *textbuffer;
+ GtkTextIter iter;
window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_window_set_title(GTK_WINDOW(window),
@@ -293,10 +295,13 @@ void menu_manual (GtkMenuItem *menuitem, gpointer user_data)
text = gtk_label_new("\nManual\n");
gtk_box_pack_start(GTK_BOX(vbox), text, FALSE, FALSE, 0);
- text = gtk_text_new(NULL,NULL);
+/* BDD - FIXME */
+/* text = gtk_text_new(NULL,NULL); */
+ text = gtk_text_view_new();
+ textbuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+ gtk_text_buffer_get_iter_at_offset (textbuffer, &iter, 0);
-
- gtk_text_insert (GTK_TEXT(text), NULL, NULL, NULL,
+ gtk_text_buffer_insert (textbuffer, &iter,
MANUAL_TEXT, sizeof(MANUAL_TEXT)-1);
gtk_box_pack_start(GTK_BOX(vbox), text, TRUE, TRUE, 0);
gtk_widget_set_usize(text,300,250);
diff --git a/middle.c b/middle.c
index daa61aa..605ab10 100644
--- a/middle.c
+++ b/middle.c
@@ -551,6 +551,8 @@ void view_generated_file()
GtkWidget *window;
GtkWidget *text;
GtkWidget *src;
+ GtkTextBuffer *textbuffer;
+ GtkTextIter iter;
char line [1024];
unlink(TEMP_FILE);
@@ -561,11 +563,13 @@ void view_generated_file()
gtk_window_set_title(GTK_WINDOW(window), "Generated File");
src = gtk_scrolled_window_new ( NULL, NULL );
gtk_widget_set_usize(src,500,400);
- text = gtk_text_new (NULL, NULL);
+ text = gtk_text_view_new ();
+ textbuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+ gtk_text_buffer_get_iter_at_offset (textbuffer, &iter, 0);
gtk_container_add (GTK_CONTAINER(src), text);
while (fgets (line, sizeof(line), f))
- gtk_text_insert (GTK_TEXT(text), NULL, NULL, NULL,
+ gtk_text_buffer_insert (textbuffer, &iter,
line, strlen(line));
gtk_container_add(GTK_CONTAINER(window),src);
@@ -610,6 +614,7 @@ void save_file(char file_out[])
fprintf(f, "# m:xxx + c:xxx \n");
fprintf(f, "# Shift+... \n\n\n\n\n");
+
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Flag_NumLock)))
fprintf(f,"keystate_numlock = enable\n");
else
diff --git a/xbindkeys_config.c b/xbindkeys_config.c
index 75bad30..3c02a2b 100644
--- a/xbindkeys_config.c
+++ b/xbindkeys_config.c
@@ -95,7 +95,8 @@ int main (int argc, char *argv[])
accel_group = gtk_accel_group_new();
menu=xbindkeys_config_menu(accel_group);
gtk_box_pack_start(GTK_BOX(vbox),menu,FALSE,FALSE,0);
- gtk_accel_group_attach(accel_group, GTK_OBJECT(window));
+/* BDD - FIXME - Don't need this? */
+/* gtk_accel_group_attach(accel_group, GTK_OBJECT(window)); */
middle= xbindkeys_config_middle();
gtk_box_pack_start(GTK_BOX(vbox),middle,TRUE,TRUE,0);
--
2.1.3

View File

@@ -0,0 +1,21 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.27.
.TH XBINDKEYS_CONFIG "1" "April 2002" "xbindkeys-config" "User Commands"
.SH NAME
xbindkeys-config \- GTK+ configuration tool for xbindkeys
.SH "SYNOPSIS"
xbindkeys-config
[\-\-file|\-f file]
[\-\-help|\-h]
[\-\-show|\-s]
.TP
\fB\-h\fR, \fB\-\-help\fR
This Help
.TP
\fB\-f\fR, \fB\-\-file\fR
Use an alternative rc file
.TP
\fB\-s\fR, \fB\-\-show\fR
show only the rc file
.SH AUTHOR
This manual page was written by Joerg Jaspert <joerg@debian.org>,
for the Debian GNU/Linux system (but may be used by others).

View File

@@ -0,0 +1,53 @@
{
lib,
buildPythonApplication,
fetchFromGitHub,
fetchpatch,
setuptools,
boto3,
}:
buildPythonApplication rec {
pname = "aws-mfa";
version = "0.0.12";
pyproject = true;
src = fetchFromGitHub {
owner = "broamski";
repo = "aws-mfa";
rev = version;
hash = "sha256-XhnDri7QV8esKtx0SttWAvevE3SH2Yj2YMq/P4K6jK4=";
};
patches = [
# https://github.com/broamski/aws-mfa/pull/87
(fetchpatch {
name = "remove-duplicate-script.patch";
url = "https://github.com/broamski/aws-mfa/commit/0d1624022c71cb92bb4436964b87f0b2ffd677ec.patch";
hash = "sha256-Bv8ffPbDysz87wLg2Xip+0yxaBfbEmu+x6fSXI8BVjA=";
})
];
build-system = [
setuptools
];
dependencies = [
boto3
];
# package has no tests
doCheck = false;
pythonImportsCheck = [
"awsmfa"
];
meta = with lib; {
description = "Manage AWS MFA Security Credentials";
mainProgram = "aws-mfa";
homepage = "https://github.com/broamski/aws-mfa";
license = licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,70 @@
{
lib,
buildPythonApplication,
fetchFromGitea,
six,
sphinxHook,
sphinx-rtd-theme,
}:
buildPythonApplication rec {
pname = "cdist";
version = "7.0.0";
format = "setuptools";
outputs = [
"out"
"man"
"doc"
];
src = fetchFromGitea {
domain = "code.ungleich.ch";
owner = "ungleich-public";
repo = "cdist";
rev = version;
hash = "sha256-lIx0RtGQJdY2e00azI9yS6TV+5pCegpKOOD0dQmgMqA=";
};
nativeBuildInputs = [
six
sphinxHook
sphinx-rtd-theme
];
sphinxRoot = "docs/src";
# "make man" creates symlinks in docs/src needed by sphinxHook.
postPatch = ''
echo "VERSION = '$version'" > cdist/version.py
make man
'';
preConfigure = ''
export HOME=/tmp
'';
# Test suite requires either non-chrooted environment or root.
#
# When "machine_type" explorer figures out that it is running inside
# chroot, it assumes that it has enough privileges to escape it.
doCheck = false;
pythonImportsCheck = [ "cdist" ];
postInstall = ''
mkdir -p $out/share
mv docs/dist/man $out/share
'';
meta = with lib; {
description = "Minimalistic configuration management system";
homepage = "https://www.sdi.st";
changelog = "https://code.ungleich.ch/ungleich-public/cdist/src/tag/${version}/docs/changelog";
# Mostly. There are still couple types that are gpl3-only.
license = licenses.gpl3Plus;
maintainers = with maintainers; [ kaction ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,84 @@
{
lib,
stdenv,
fetchurl,
installShellFiles,
writableTmpDirAsHomeHook,
}:
let
arch =
with stdenv.hostPlatform;
if isx86_64 then
"amd64"
else if isAarch64 then
"arm64"
else if isi686 then
"386"
else if isPower64 && isLittleEndian then
"ppc64le"
else if isS390x then
"s390x"
else
throw "Unsupported arch: ${stdenv.hostPlatform.system}";
platform =
if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then
"macos_arm64"
else if stdenv.hostPlatform.isDarwin then
"macos"
else
"linux_${arch}";
in
stdenv.mkDerivation (finalAttrs: {
pname = "ibmcloud-cli";
version = "2.36.0";
src = fetchurl {
url = "https://download.clis.cloud.ibm.com/ibm-cloud-cli/${finalAttrs.version}/binaries/IBM_Cloud_CLI_${finalAttrs.version}_${platform}.tgz";
hash =
{
"x86_64-darwin" = "sha256-hIHFfUxAhpA+YIN7Bq65khFFj+3BCuYRtMq2WjQwqYQ=";
"aarch64-darwin" = "sha256-ZZ500RWagqhf63zwiQpV8y+gtCxGfbA36F97x67coUE=";
"x86_64-linux" = "sha256-+ZKlFvrDPm3ERq8/r7cjgsJWjUr8+sGFqYXdiSUPeXo=";
"aarch64-linux" = "sha256-ER/Ey3Jux3i8tC30/65awHdEd6efscUVjX/bFAk1b7c=";
"i686-linux" = "sha256-5A0kUegKVHSTZ+jRg5+07wvV4PkCvOPddvyC1ZLCbmI=";
"powerpc64le-linux" = "sha256-XcHrdA9i3Euc0yIjUtFrmIFMJi+onXRK+tHzNxmQwHg=";
"s390x-linux" = "sha256-loGQxvUqp9ngieVOVuZ6IhOKgyrVGBd+y9LdZtKEPwc=";
}
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
nativeBuildInputs = [
installShellFiles
writableTmpDirAsHomeHook
];
installPhase = ''
runHook preInstall
install -Dm755 ibmcloud $out/bin/ibmcloud
mkdir -p $out/share/ibmcloud
cp LICENSE NOTICE $out/share/ibmcloud
installShellCompletion --cmd ibmcloud --bash <($out/bin/ibmcloud --generate-bash-completion)
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = {
description = "Command line client for IBM Cloud";
homepage = "https://cloud.ibm.com/docs/cli";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ emilytrau ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"i686-linux"
"powerpc64le-linux"
"s390x-linux"
]
++ lib.platforms.darwin;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
mainProgram = "ibmcloud";
};
})

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash nix-update common-updater-scripts nix jq
set -euo pipefail
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; ibmcloud-cli.version or (lib.getVersion ibmcloud-cli)" | tr -d '"')
latestVersion=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/IBM-Cloud/ibm-cloud-cli-release/releases/latest | jq --raw-output .tag_name | sed 's/^v//')
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "package is up-to-date: $currentVersion"
exit 0
fi
update-source-version ibmcloud-cli $latestVersion || true
for system in \
x86_64-linux \
aarch64-linux \
i686-linux \
powerpc64le-linux \
s390x-linux \
x86_64-darwin \
aarch64-darwin; do
tmp=$(mktemp -d)
curl -fsSL -o $tmp/ibmcloud-cli $(nix-instantiate --eval -E "with import ./. {}; ibmcloud-cli.src.url" --system "$system" | tr -d '"')
hash=$(nix --extra-experimental-features nix-command hash file $tmp/ibmcloud-cli)
update-source-version ibmcloud-cli $latestVersion $hash --system=$system --ignore-same-version
rm -rf $tmp
done

View File

@@ -0,0 +1,61 @@
{
lib,
argcomplete,
jinja2,
meraki,
rich,
fetchPypi,
buildPythonApplication,
pytestCheckHook,
requests-mock,
setuptools,
}:
buildPythonApplication rec {
pname = "meraki-cli";
version = "1.5.1";
pyproject = true;
src = fetchPypi {
pname = "meraki_cli";
inherit version;
hash = "sha256-FHcKgppclc0L6yuCkpVYfr+jq8hNkt7Hq/44mpHMR20=";
};
disabledTests = [
# requires files not in PyPI tarball
"TestDocVersions"
"TestHelps"
# requires running "pip install"
"TestUpgrade"
];
build-system = [
setuptools
];
dependencies = [
argcomplete
jinja2
meraki
rich
];
nativeCheckInputs = [
pytestCheckHook
requests-mock
];
pythonImportsCheck = [
"meraki_cli"
];
meta = with lib; {
homepage = "https://github.com/PackeTsar/meraki-cli";
description = "Simple CLI tool to automate and control your Cisco Meraki Dashboard";
license = licenses.mit;
maintainers = with maintainers; [ dylanmtaylor ];
platforms = platforms.unix;
mainProgram = "meraki";
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
fetchzip,
fetchYarnDeps,
yarn2nix-moretea,
nodejs_20,
dos2unix,
}:
yarn2nix-moretea.mkYarnPackage {
version = "1.1.51";
src = fetchzip {
url = "https://registry.npmjs.org/meshcentral/-/meshcentral-1.1.51.tgz";
sha256 = "1l3x1rhcw38pg0rh27qyfg2dm5biwnyzicdd6l07c3km4x6xi5pr";
};
patches = [
./fix-js-include-paths.patch
];
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
offlineCache = fetchYarnDeps {
yarnLock = ./yarn.lock;
hash = "sha256-jmsRlHJgSrUtXwRcfX+tMH4SmrKVtD7gEK1+oW5mYIs=";
};
# Tarball has CRLF line endings. This makes patching difficult, so let's convert them.
nativeBuildInputs = [ dos2unix ];
prePatch = ''
find . -name '*.js' -exec dos2unix {} +
ln -snf meshcentral.js bin/meshcentral
'';
preFixup = ''
mkdir -p $out/bin
chmod a+x $out/libexec/meshcentral/deps/meshcentral/meshcentral.js
sed -i '1i#!${nodejs_20}/bin/node' $out/libexec/meshcentral/deps/meshcentral/meshcentral.js
ln -s $out/libexec/meshcentral/deps/meshcentral/meshcentral.js $out/bin/meshcentral
'';
publishBinsFor = [ ];
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Computer management web app";
homepage = "https://meshcentral.com/";
maintainers = with maintainers; [ ma27 ];
license = licenses.asl20;
mainProgram = "meshcentral";
};
}

View File

@@ -0,0 +1,31 @@
diff --git a/pkcs7-modified.js b/pkcs7-modified.js
index 661904a6..932a41ad 100644
--- a/pkcs7-modified.js
+++ b/pkcs7-modified.js
@@ -31,16 +31,16 @@ try {
} catch (ex) { }
if (forge == null) {
- forge = require('./node_modules/node-forge/lib/forge');
- require('./node_modules/node-forge/lib/aes');
- require('./node_modules/node-forge/lib/asn1');
- require('./node_modules/node-forge/lib/des');
- require('./node_modules/node-forge/lib/oids');
- require('./node_modules/node-forge/lib/pem');
- require('./node_modules/node-forge/lib/pkcs7asn1');
- require('./node_modules/node-forge/lib/random');
- require('./node_modules/node-forge/lib/util');
- require('./node_modules/node-forge/lib/x509');
+ forge = require('node-forge/lib/forge');
+ require('node-forge/lib/aes');
+ require('node-forge/lib/asn1');
+ require('node-forge/lib/des');
+ require('node-forge/lib/oids');
+ require('node-forge/lib/pem');
+ require('node-forge/lib/pkcs7asn1');
+ require('node-forge/lib/random');
+ require('node-forge/lib/util');
+ require('node-forge/lib/x509');
}
// shortcut for ASN.1 API

View File

@@ -0,0 +1,142 @@
{
"name": "meshcentral",
"version": "1.1.51",
"keywords": [
"Remote Device Management",
"Remote Device Monitoring",
"Remote Desktop",
"Remote Terminal",
"Remote File Access",
"KVM",
"2FA",
"Two-Factor Authentication",
"Intel Active Management Technology",
"Intel AMT"
],
"homepage": "https://meshcentral.com",
"description": "Web based remote computer management server",
"author": "Ylian Saint-Hilaire <ylianst@gmail.com>",
"main": "meshcentral.js",
"bin": {
"meshcentral": "bin/meshcentral"
},
"license": "Apache-2.0",
"files": [
"*.js",
"amt",
"bin",
"rdp",
"views",
"emails",
"agents",
"public",
"translate",
"readme.txt",
"license.txt",
"sample-config.json",
"sample-config-advanced.json"
],
"dependencies": {
"@seald-io/nedb": "4.0.4",
"archiver": "7.0.1",
"body-parser": "1.20.3",
"cbor": "5.2.0",
"compression": "1.8.1",
"cookie-session": "2.1.1",
"express": "4.21.2",
"express-handlebars": "7.1.3",
"express-ws": "5.0.2",
"ipcheck": "0.1.0",
"minimist": "1.2.8",
"multiparty": "4.2.3",
"node-forge": "1.3.1",
"ua-client-hints-js": "0.1.2",
"ua-parser-js": "1.0.40",
"ws": "8.18.0",
"yauzl": "2.10.0"
},
"engines": {
"node": ">=16.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/Ylianst/MeshCentral.git"
},
"readme": "readme.md",
"optionalDependencies": {
"passport": "*",
"connect-flash": "*",
"passport-twitter": "*",
"passport-google-oauth20": "*",
"passport-github2": "*",
"passport-azure-oauth2": "*",
"jwt-simple": "*",
"openid-client": "5.7.1",
"passport-saml": "*",
"@duosecurity/duo_universal": "2.1.0",
"archiver": "7.0.1",
"body-parser": "1.20.3",
"cbor": "5.2.0",
"compression": "1.8.1",
"cookie-session": "2.1.1",
"express": "4.21.2",
"express-handlebars": "7.1.3",
"express-ws": "5.0.2",
"ipcheck": "0.1.0",
"minimist": "1.2.8",
"multiparty": "4.2.3",
"@seald-io/nedb": "*",
"node-forge": "1.3.1",
"ua-parser-js": "1.0.40",
"ua-client-hints-js": "0.1.2",
"ws": "8.18.0",
"yauzl": "2.10.0",
"node-windows": "0.1.14",
"loadavg-windows": "1.1.1",
"node-sspi": "0.2.10",
"ldapauth-fork": "5.0.5",
"ssh2": "1.16.0",
"svg-captcha": "1.4.0",
"image-size": "2.0.2",
"acme-client": "4.2.5",
"aedes": "0.39.0",
"mysql2": "3.11.4",
"@mysql/xdevapi": "8.0.33",
"mongodb": "4.17.2",
"pg": "8.14.1",
"mariadb": "3.4.0",
"acebase": "1.29.5",
"sqlite3": "5.1.7",
"node-vault": "0.10.2",
"https-proxy-agent": "7.0.2",
"mongojs": "3.1.0",
"nodemailer": "6.10.1",
"@sendgrid/mail": "*",
"jsdom": "22.1.0",
"esprima": "4.0.1",
"html-minifier-terser": "7.2.0",
"@crowdsec/express-bouncer": "0.1.0",
"prom-client": "*",
"archiver-zip-encrypted": "2.0.0",
"googleapis": "128.0.0",
"webdav": "5.8.0",
"minio": "8.0.2",
"wildleek": "2.0.0",
"yub": "0.11.1",
"otplib": "12.0.1",
"twilio": "4.19.0",
"plivo": "4.58.0",
"telnyx": "1.25.5",
"telegram": "2.19.8",
"input": "1.0.1",
"discord.js": "14.6.0",
"@xmpp/client": "0.13.1",
"node-pushover": "1.0.0",
"zulip": "0.1.0",
"web-push": "3.6.6",
"firebase-admin": "12.7.0",
"modern-syslog": "1.2.0",
"syslog": "0.1.1-1",
"heapdump": "0.3.15"
}
}

View File

@@ -0,0 +1,54 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nodejs yarn prefetch-yarn-deps jq rsync common-updater-scripts moreutils
set -exuo pipefail
expr_dir=$(cd "$(dirname "$0")"; pwd)
tmp=$(mktemp -dt update-meshcentral.XXXXXX)
npm show --json meshcentral > "$tmp/npm.json"
version=$(<"$tmp/npm.json" jq -r .version)
tarball=$(<"$tmp/npm.json" jq -r .dist.tarball)
prefetch=$(nix-prefetch-url --unpack --print-path "$tarball" | tr '\n' ' ')
read -r hash storePath <<<"$prefetch"
cd "$tmp"
rsync -r --chmod=u=rwX "$storePath/" package/
cd package
# Very crude way of discovering optional dependencies. These are
# fetched at runtime by stock upstream, but we don't allow that kind
# of thing in nix :)
awk <meshcentral.js "
BEGIN { RS=\"[\n;]\" }
match(\$0, /(modules|passport) = (\[.*\])$/, a) { print a[2] }
match(\$0, /(modules|passport).push\(('[^)]+')\)/, a) { print \"[\" a[2] \"]\" }
" |
tr \' \" |
jq --slurp '[if type == "array" then .[] else . end] | flatten' |
# And an equally crude way of adding them to package.json. We
# can't use yarn add here, because that will blow up on
# dependencies which don't support the current platform. Even with
# --optional.
jq --slurpfile package package.json \
'(. | map(. | capture("(?<name>@?[^@]+)(@(?<version>.+))?") | { key: .name, value: (.version // "*")}) | from_entries) as $optionalDependencies | $package | .[] | .optionalDependencies |= . + $optionalDependencies' |
sponge package.json
# Fetch all the optional dependencies, so we have them available in
# yarn.lock/yarn.nix
yarn install --ignore-scripts
cp package.json "$expr_dir"
cp yarn.lock "$expr_dir/yarn.lock"
cd "$expr_dir/../../../.."
update-source-version meshcentral "$version" "$hash" "$tarball"
new_yarn_hash=$(prefetch-yarn-deps "$expr_dir/yarn.lock")
new_yarn_hash=$(nix-hash --type sha256 --to-sri "$new_yarn_hash")
old_yarn_hash=$(nix-instantiate --eval -A meshcentral.offlineCache.outputHash | tr -d '"')
sed -i "$expr_dir/default.nix" -e "s|\"$old_yarn_hash\"|\"$new_yarn_hash\"|"
# Only clean up if everything worked
cd /
rm -rf "$tmp"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,639 @@
# DO NOT EDIT! This file is generated automatically by update.sh
{ }:
{
version = "3.201.0";
pulumiPkgs = {
x86_64-linux = [
{
url = "https://get.pulumi.com/releases/sdk/pulumi-v3.201.0-linux-x64.tar.gz";
sha256 = "02k0h1kkvc1yz2bm5zip24n00sp7nv7l7badh13m7mylkcflfvg8";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-aiven-v6.43.1-linux-amd64.tar.gz";
sha256 = "1fzdqgb7cvff7xwi4n35s1daby51mismnbw7fp136lz0qah8cqg6";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-akamai-v9.1.0-linux-amd64.tar.gz";
sha256 = "1065l1ahklhl9b8f4lkaa6lv748lqqhpv8w3crgnznddnrz0g1sn";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-alicloud-v3.86.1-linux-amd64.tar.gz";
sha256 = "10mz7gv2bm93hvkvqvhsvqhkcziyci2wbxmqj9ggplgv44k49w68";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-artifactory-v8.9.1-linux-amd64.tar.gz";
sha256 = "02pgy8m9f32ky69vs7kw7fn8b41l0y4w2gg7s15nw5c069vvnpy4";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-auth0-v3.29.0-linux-amd64.tar.gz";
sha256 = "0032ax8kazj8gxmxz6sgffv5r7y67vp92xwzlfpq4y6jlqiapwi9";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-aws-v7.8.0-linux-amd64.tar.gz";
sha256 = "1f1zj1m3alz9zvdab9fvqrlzjafzwx21wpnifi7fs3sf27p1vs2l";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azuread-v6.6.0-linux-amd64.tar.gz";
sha256 = "1kvcw8163ghfnrdgc2rzvhfc9npfql7c2d6y6p32j6arwf7h2k4m";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azuredevops-v3.10.1-linux-amd64.tar.gz";
sha256 = "0r0s72v99wx2ggb45ifs0hjy76nq8aa6z66zlxjb8wgda3yrsldz";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azure-v6.28.0-linux-amd64.tar.gz";
sha256 = "0agh234zr757kx6b41k1q7p9rpzb3jv30nkyzs5xqhjnv44lky97";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-cloudflare-v6.10.0-linux-amd64.tar.gz";
sha256 = "0gjhdf6ai64k3kkdfvprpszc93b6yim622kk4m76s15kpcnnlnzz";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-consul-v3.13.1-linux-amd64.tar.gz";
sha256 = "00gkdgb6s0wqjl6m69sc8dz320aiy2s751qqn73894jyaqa8v9zk";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-datadog-v4.57.0-linux-amd64.tar.gz";
sha256 = "1bgbnmkc0g4yqspv9bfn7zmyf0rykibyshmjrjmhr3q32jz9ffyg";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-digitalocean-v4.53.0-linux-amd64.tar.gz";
sha256 = "1vd4wcpkwb01wb3916nna3wwqhbym234jj6ggyayw0mawhrx52rm";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-docker-v4.9.0-linux-amd64.tar.gz";
sha256 = "0b311liad597gbdk1yb5b2yyyxxr0kjgav1rbs1ans7fyfbp05kl";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-equinix-metal-v3.2.1-linux-amd64.tar.gz";
sha256 = "0hnardid0kbzy65dmn7vz8ddy5hq78nf2871zz6srf2hfyiv7qa4";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-fastly-v11.0.0-linux-amd64.tar.gz";
sha256 = "0sm8gqay51g12l20n08pih9vhpm2b95aj71zj6nmqiq5gym89v6z";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-gcp-v9.2.0-linux-amd64.tar.gz";
sha256 = "042n9bsf1gp7h9wm2qcq6pw001fy8gmfwfbb7f3shlfchn7kws4g";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-github-v6.7.3-linux-amd64.tar.gz";
sha256 = "192bz3xl0hiy3k68fgcb9mw6j1hb6ngrahf53h8zb7agikzwiy3m";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-gitlab-v9.3.0-linux-amd64.tar.gz";
sha256 = "0bl8r0d2zyd2yfx1wv84gxjjq5mp2kw52sv4vqpqihmzvcwr0rcv";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-google-native-v0.32.0-linux-amd64.tar.gz";
sha256 = "1zra1ck64gs4nwqf62ksfmpbx24lxw6vsgi47j4v8q051m89fgq3";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-hcloud-v1.25.0-linux-amd64.tar.gz";
sha256 = "02dwixm2islad74jm7d3b7n1a9lsrm028np4j47s0959hmkqq7c1";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-kubernetes-v4.23.0-linux-amd64.tar.gz";
sha256 = "08i1k8m59dp56lafx8b0ggmgxl7dfqv8f4nljy4dh95h3bs7fdl2";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-linode-v5.3.0-linux-amd64.tar.gz";
sha256 = "01hqf1sq13s0qgcqsfnkk2ijd6g5cm74b3nxbvc0kf2ybcxvwsmv";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-mailgun-v3.5.11-linux-amd64.tar.gz";
sha256 = "1vvdn7p0m9kyb62r0g52ypidbm7060mhaz1iy0zd7915whxk900p";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-mysql-v3.2.11-linux-amd64.tar.gz";
sha256 = "0sawhhcmnhgwdv3wl05z65parmrc74mgk2cpyhgp0hcvbpgagknj";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-openstack-v5.3.3-linux-amd64.tar.gz";
sha256 = "1nm79hr1bl2dpxw905d9y5rjdvkzxwfbqbm3vp8314ljjkwmj918";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-postgresql-v3.16.0-linux-amd64.tar.gz";
sha256 = "1wyl8xr07b8gj933w7lxip36mc7xxqwb9i46826il7w67gb2vfb4";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-random-v4.18.3-linux-amd64.tar.gz";
sha256 = "1n3ndir2n1pq4mmnbkiqvv0rf3w4dgz3a9b221vimsi2lks212kw";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-snowflake-v2.7.0-linux-amd64.tar.gz";
sha256 = "18iaybm8sqg468a8fan2dm1lsyybch3l1wiawvz5qyh6ap5x2fv7";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-spotinst-v3.124.0-linux-amd64.tar.gz";
sha256 = "038ibhpmm129xavmqfb5p2bd1sxf5hvw08qclkm7h38sgdzx0hk4";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-sumologic-v1.0.11-linux-amd64.tar.gz";
sha256 = "0pppwgwl726rfy92fnya9afj3cciw13vzs9r60w2477i3250slqj";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-tailscale-v0.22.0-linux-amd64.tar.gz";
sha256 = "1m4nyymbsdjnzqb389b98g0vcyz5cdyzrdr38i5dl70mah89c2kz";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-tls-v5.2.2-linux-amd64.tar.gz";
sha256 = "1vh28r2gk85a82c7jsa95n21my19hzavkyc9pjdpw517r63gvyjw";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-vault-v7.3.0-linux-amd64.tar.gz";
sha256 = "0vdrh5ss7vlmyv0a0mvrj2w9mrsazqrl7hcvwn5riym4ba0daq03";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-venafi-v1.12.1-linux-amd64.tar.gz";
sha256 = "070kb73yix9aha55x9n4h6f4khp9a8wylqgvzdhsa7c7k35fx6q5";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-vsphere-v4.16.0-linux-amd64.tar.gz";
sha256 = "0p3rjsppf2zl7xwcs9qr2s262bxkilvzy8yi7nybydhfscl1rmrr";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-wavefront-v3.1.10-linux-amd64.tar.gz";
sha256 = "0pbf995jvp3fkvnqdv2ds0zf3yr88rh61i9q4ab7b3141hsghvha";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-yandex-v0.13.0-linux-amd64.tar.gz";
sha256 = "14qsnjafhd8ppachxr7j9541p5rbf1cakqlr7mra86fli1r49z9p";
}
];
x86_64-darwin = [
{
url = "https://get.pulumi.com/releases/sdk/pulumi-v3.201.0-darwin-x64.tar.gz";
sha256 = "054kg9b2akpd6l9m4wwx3hci7ajl6j63i9wlxvl04q0y1qxw2q3s";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-aiven-v6.43.1-darwin-amd64.tar.gz";
sha256 = "1cdk1cc548lkylc9rgyghkhv5qqmpdgkgzbyxf8s5a019729fhq4";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-akamai-v9.1.0-darwin-amd64.tar.gz";
sha256 = "0kaa0wzf03j0s1wq3xw50yknai0qbkw2x2xjrxmw26x7y243f143";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-alicloud-v3.86.1-darwin-amd64.tar.gz";
sha256 = "1b8lwjbvppj7ssncfwqync169ydz7m8wx3zkxdvc8yw4ggcl2kxs";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-artifactory-v8.9.1-darwin-amd64.tar.gz";
sha256 = "09c2kdhad10c6g1j955dxkvvfapk6qqc8wdd69qcl85lkpgzn3cz";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-auth0-v3.29.0-darwin-amd64.tar.gz";
sha256 = "0xy3z460nw89i0zjj5bn0qwpqc18xcas4zk3wgvvrsk7v0jj1cin";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-aws-v7.8.0-darwin-amd64.tar.gz";
sha256 = "0iq60sxszffaqv6anh4hi2bx963k462g6y0ylpwx0662wi7d6m5w";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azuread-v6.6.0-darwin-amd64.tar.gz";
sha256 = "1cdpx3540y3kp76ml1qi0awfzvm3172bzc76khdbsdcz9b8f3kb7";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azuredevops-v3.10.1-darwin-amd64.tar.gz";
sha256 = "124fk2mxxzc06dav25kk1wn8gqrys6607gg3nm53fk813wx76zg6";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azure-v6.28.0-darwin-amd64.tar.gz";
sha256 = "0b7ryynm4np70d4si2i9jwjjqd1nd3b6m23fgv9c2cwwnrg2xmiz";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-cloudflare-v6.10.0-darwin-amd64.tar.gz";
sha256 = "0l1r3qdmf90g0fpi0jvac0v4phksnwqjhihx6rcnrcpc9ihfr2pa";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-consul-v3.13.1-darwin-amd64.tar.gz";
sha256 = "1n3afyncwk16cbkc8wch3370z08b2vabpvpp8g55xarhqvqk1qpz";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-datadog-v4.57.0-darwin-amd64.tar.gz";
sha256 = "1wgcbn02r9xv9lanfssm85ac9y1p712ba2jg2jh0hb9mmx7dvhrl";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-digitalocean-v4.53.0-darwin-amd64.tar.gz";
sha256 = "1vpp01zh6g2p3s1x061hrkzl83qcahf5mw6cdhl0m0h425mbzvam";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-docker-v4.9.0-darwin-amd64.tar.gz";
sha256 = "0db5b2dp9gaklqqm2l90ssk1jpgvffl9l1250axjl6q132ga380v";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-equinix-metal-v3.2.1-darwin-amd64.tar.gz";
sha256 = "1m5lh59h7nck1flzxs9m4n0ag0klk3jmnpf7hc509vffxs89xnjq";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-fastly-v11.0.0-darwin-amd64.tar.gz";
sha256 = "12yzgpz05pf1y401p94p063c2yj8i5mlmy5bxdd69n4537z17z02";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-gcp-v9.2.0-darwin-amd64.tar.gz";
sha256 = "1bnh1g27vxihn3fkna5flphkkhwfj1kdyafrv3rylyw5iqq3kfl4";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-github-v6.7.3-darwin-amd64.tar.gz";
sha256 = "0bsfi36kihw2334gs39z9gwm6gwr0bypbcx7wfckj5zzml94jg6y";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-gitlab-v9.3.0-darwin-amd64.tar.gz";
sha256 = "01kncjmknz9ynhjyp06gn5n1d8010k4riz2zzh2sgsq9icvphh3b";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-google-native-v0.32.0-darwin-amd64.tar.gz";
sha256 = "0ddd0pgpyywq291r9q8w6bn41r2px595017iihx4n2cnb1c4v6d5";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-hcloud-v1.25.0-darwin-amd64.tar.gz";
sha256 = "1q3nhm48rdxh2br72l8lgdks5m869v2ia67gwchkzsjjrjiysbqh";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-kubernetes-v4.23.0-darwin-amd64.tar.gz";
sha256 = "1pdvqyfv4cn25h0hg830r2mv5d7g16032badf6f16azscdri81lv";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-linode-v5.3.0-darwin-amd64.tar.gz";
sha256 = "0d3mz66c182hkj61dzga9cd4fdwkw34s6cyv3jvchvfkpyl3d802";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-mailgun-v3.5.11-darwin-amd64.tar.gz";
sha256 = "0pzc0girgfy3p03rxzwm6n9g72x2qinn4g151dmwl0mdgn0bh8rh";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-mysql-v3.2.11-darwin-amd64.tar.gz";
sha256 = "18hxq1kmaxb6xjajcm84zjc3crpaqh412mkrs0xai97p3pbdfkzn";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-openstack-v5.3.3-darwin-amd64.tar.gz";
sha256 = "1vdva946j07cmjvjw1kzf12ppwy7x2gin7bmkrqri07ahfibx9i2";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-postgresql-v3.16.0-darwin-amd64.tar.gz";
sha256 = "0vjjki7lzx4kxi91qfsm07vs2jz4nl3l816hcn3kkj22ypnx11w2";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-random-v4.18.3-darwin-amd64.tar.gz";
sha256 = "1b3znzx5m20xlvmgj9njmip7q32fs6hm62zfckra73bqh2mc9492";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-snowflake-v2.7.0-darwin-amd64.tar.gz";
sha256 = "1cyh4zlaayyg4x6qzgc8pxm7kvc6b2xjm93v9rb25vbxb4yjv1nw";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-spotinst-v3.124.0-darwin-amd64.tar.gz";
sha256 = "0fvncj4wxlwkpk79xlpayb4l038igjx1n4fysk5ahvwanvpy8lxs";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-sumologic-v1.0.11-darwin-amd64.tar.gz";
sha256 = "1jpcyp3lqiz4aab331x7shhqxzp4m6nz68vhkyqksvdplzr9rj44";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-tailscale-v0.22.0-darwin-amd64.tar.gz";
sha256 = "1vk28vsx7ay73dalgp0nisp293g2all38afw92wvfgxcbdjzdssd";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-tls-v5.2.2-darwin-amd64.tar.gz";
sha256 = "1ji9zz1r7rj57w7spf6mwa9fxl1jgiy0qmxvlia21hpj60b536f5";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-vault-v7.3.0-darwin-amd64.tar.gz";
sha256 = "097kjmmyqdwaa9ghn228d52sjj2ypr3kqbgkfxvjmq494b5mf74s";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-venafi-v1.12.1-darwin-amd64.tar.gz";
sha256 = "1c38gqm2vk9fwxyqmzzf27p8xdis9pa8ikj9pgwyjaf208b63gir";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-vsphere-v4.16.0-darwin-amd64.tar.gz";
sha256 = "0jrzy2dm6wnkxwk97njhvyw36gy9l1axcw2962drilc60zdc82mb";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-wavefront-v3.1.10-darwin-amd64.tar.gz";
sha256 = "1h43zanz810i2p0x12hp60r6k5rfkr5lvh49l32090xj1v6cr8la";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-yandex-v0.13.0-darwin-amd64.tar.gz";
sha256 = "11wm9c125154brisncm9cgb41nbjl9q9h4bq6z0ym8v681qq0fc4";
}
];
aarch64-linux = [
{
url = "https://get.pulumi.com/releases/sdk/pulumi-v3.201.0-linux-arm64.tar.gz";
sha256 = "0wp8f8sa3s414ixxrkh1p0hy7bgj7v2zm2lbj1nn1804k6pff8cn";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-aiven-v6.43.1-linux-arm64.tar.gz";
sha256 = "1x7gc5782v45s9rr00har3fs43hf6phx23qhw2ann1d5fh026rip";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-akamai-v9.1.0-linux-arm64.tar.gz";
sha256 = "0lsyrcyfl29313pas8gch8lqmmh9irqcyaailzf531i0r75yi6xc";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-alicloud-v3.86.1-linux-arm64.tar.gz";
sha256 = "11hbjq49a1znx38xk81q2gp2pdq99c8sz166xxb2cmrv84bm2xfi";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-artifactory-v8.9.1-linux-arm64.tar.gz";
sha256 = "03as3y5bflq1m8qfcx7h916vlxa7qn5xla2d1gi2q87gz4giki24";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-auth0-v3.29.0-linux-arm64.tar.gz";
sha256 = "0v9a59cbzs5s9vylmbwfb5chydccdy1xkhp90ci2lz52yik45lg5";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-aws-v7.8.0-linux-arm64.tar.gz";
sha256 = "1lwr5cbf3g3zkk8mvdd17b8bmsjkxbzjg15y2lzsxb294r677b3l";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azuread-v6.6.0-linux-arm64.tar.gz";
sha256 = "17lndnmwmxshxz7n2zhgc07gr8cqfd06b1mgblyzbx8n2lc0x0sv";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azuredevops-v3.10.1-linux-arm64.tar.gz";
sha256 = "0mmkjim8q5wh0mikwjw3qzg87hm845777jyisz7256p211nrsmyx";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azure-v6.28.0-linux-arm64.tar.gz";
sha256 = "0hg628ik9vvadxs249v4z53y36nzrw3bgjdh1fgjahx875z23m06";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-cloudflare-v6.10.0-linux-arm64.tar.gz";
sha256 = "1l2a54qjgh5blwx8mw2i52m5yhff3izqirlh17ws3l04xcldd4d9";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-consul-v3.13.1-linux-arm64.tar.gz";
sha256 = "15n44dya58sqpirhpiicp1x6w9x15qf94a6vamk2h6jbzpfi7c03";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-datadog-v4.57.0-linux-arm64.tar.gz";
sha256 = "0d02sl9l4mqhm6mb9rxdc0pc6dr7qkd6zzm4y3ff8dv84qn8sy9n";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-digitalocean-v4.53.0-linux-arm64.tar.gz";
sha256 = "033lry88mpn9vfqim26hkjg13dc0jl9sqn28zhld1asx7sqbck3y";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-docker-v4.9.0-linux-arm64.tar.gz";
sha256 = "17gzapyqzj51nxza2wc4s2n9vgi52fzz6h84mn4k1vskvfvbpccs";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-equinix-metal-v3.2.1-linux-arm64.tar.gz";
sha256 = "111pia2f5xwkwaqs6p90ri29l5b3ivmahsa1bji4fwyyjyp22h4r";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-fastly-v11.0.0-linux-arm64.tar.gz";
sha256 = "0f4bxwj7liyijbsqh0r43s823n02gvpkk0rdxwhg1li4d1mpsqxp";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-gcp-v9.2.0-linux-arm64.tar.gz";
sha256 = "0pizhar9xbhfwghyningb5vicwiw8lkbd2r97ipvwn4nwgvqzs30";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-github-v6.7.3-linux-arm64.tar.gz";
sha256 = "1nfsgjfas5md9k67n90hcvcza7gg2iwp9wivmfzf49vz2k25iz44";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-gitlab-v9.3.0-linux-arm64.tar.gz";
sha256 = "0jynj7qz66jl47982gvg47fkdbgifb4030225vxz85a705ingjdl";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-google-native-v0.32.0-linux-arm64.tar.gz";
sha256 = "0d8m2krbzxjhfm82dgf8p4vm3kk9gk98l798q4ayjrddqqb4mxq4";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-hcloud-v1.25.0-linux-arm64.tar.gz";
sha256 = "0lxxdqx9g9zd0m3zzpgfcwv3h51sigzldh5fzrn2m6pnqniamqbw";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-kubernetes-v4.23.0-linux-arm64.tar.gz";
sha256 = "0kqxz7y1n9zzpw3rv15kb55qvp14rvxh0vymddlrja7iqcvb8nd8";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-linode-v5.3.0-linux-arm64.tar.gz";
sha256 = "0acn838wpwl7kfwd4v50wdw45l9mrv6gfr3rnlh81dp39q6w4fl6";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-mailgun-v3.5.11-linux-arm64.tar.gz";
sha256 = "0by18hd8zyfl0xac4wanz5lq6sw6wmkclvy0va9cjpfgns916qsk";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-mysql-v3.2.11-linux-arm64.tar.gz";
sha256 = "1gd9l1zdkg5faqlfvc5rl9gqchndxhxp742mx21hizhmp4rsv577";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-openstack-v5.3.3-linux-arm64.tar.gz";
sha256 = "0hliswqz55f4mbx62j3g49qm1yfiaaf8hxglm399ngjvky758lzw";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-postgresql-v3.16.0-linux-arm64.tar.gz";
sha256 = "0arnnishqszj7s9a2azjk0a61n2sp3wb97snj9xpj9bp243w5lmf";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-random-v4.18.3-linux-arm64.tar.gz";
sha256 = "02jix4w49n9mal8wg6ixgxvnd865ml7zx0lnz6prckfrzgrj36ih";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-snowflake-v2.7.0-linux-arm64.tar.gz";
sha256 = "05fwkafsjv5gd23fzkb2hv3xah9vvqr4w2sc9sjrzcwzghiw0pbh";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-spotinst-v3.124.0-linux-arm64.tar.gz";
sha256 = "19p5sszx3ij34c1x1rmcr6wm9zr2wqlnawbydzxbvkzjgdgmmn55";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-sumologic-v1.0.11-linux-arm64.tar.gz";
sha256 = "0glljz03v764n53n5l33ji64vj86ipdv5bkr03ijl8wrc22j5syy";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-tailscale-v0.22.0-linux-arm64.tar.gz";
sha256 = "1g1i84wn4im0xk7xn2phpmqqvgc4168mz98xicylk18p17645pfz";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-tls-v5.2.2-linux-arm64.tar.gz";
sha256 = "1zbm7ql3rqypqmckbmlzbiy4akmqjkbzfkl7788q6sm7xh6bm8q1";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-vault-v7.3.0-linux-arm64.tar.gz";
sha256 = "1csiv24nmg1c8vb0ay36lsw7dpfim5hr9b3rhdawpsyjdi5s4hsd";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-venafi-v1.12.1-linux-arm64.tar.gz";
sha256 = "1rfzj89s7avim702aqvkrmsg4d1qzajw1k5pr24jzrs4xiyarkzb";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-vsphere-v4.16.0-linux-arm64.tar.gz";
sha256 = "1sbxv37pi1yy6dvjz0yifj44l68mscxaf033a7nbgb3281r15lq1";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-wavefront-v3.1.10-linux-arm64.tar.gz";
sha256 = "113czcq1fm2dywn8q5v1z5lyz4l30b1433hrdjnfkr8qwzxncr48";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-yandex-v0.13.0-linux-arm64.tar.gz";
sha256 = "0fd3hgvkr3ch2r5hpmi7h70w4hkbjdyc7z534h151pyc5ssxw8bd";
}
];
aarch64-darwin = [
{
url = "https://get.pulumi.com/releases/sdk/pulumi-v3.201.0-darwin-arm64.tar.gz";
sha256 = "1ri8cg89aw43hwsiql4gbbm1qqllqh5pjmhkhf9i19i3c6lfjxz7";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-aiven-v6.43.1-darwin-arm64.tar.gz";
sha256 = "0cb42a83qmb0gciwdl7cr16sagpw7gbij4666p5r9fz1dsjrrq0a";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-akamai-v9.1.0-darwin-arm64.tar.gz";
sha256 = "1jg74cslbxh741r19z8p4p9sgyn0qlf9vqd8gfdjv5cxa7phl2bm";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-alicloud-v3.86.1-darwin-arm64.tar.gz";
sha256 = "1cglc5a507fy973wkk062wd22yn1pwn1pdn2laqqlk0n6y1hp33y";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-artifactory-v8.9.1-darwin-arm64.tar.gz";
sha256 = "0sqmpk1n98vs079qrs1nf9ifjmjz4s9s0f406c8r0cxpn3l08zvp";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-auth0-v3.29.0-darwin-arm64.tar.gz";
sha256 = "1a13wviv678k1ls57vwvffkk6qa5fdc55zw2byid910m2bjs7bz0";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-aws-v7.8.0-darwin-arm64.tar.gz";
sha256 = "0k0kmjqc5iq3dhcvrxkz6d7kbj2q1s0cigqjqp7qpj5ppyss901g";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azuread-v6.6.0-darwin-arm64.tar.gz";
sha256 = "0b4srhyq2adbpzh74s0kcmfflayrk6c7jbq63s2l3zfq2zln4sbm";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azuredevops-v3.10.1-darwin-arm64.tar.gz";
sha256 = "00gahf4jlihzywbsd7rmw73jrnjfdsqxhag4qm7ms90gwl5qspa4";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-azure-v6.28.0-darwin-arm64.tar.gz";
sha256 = "0jidnrvvk2d6jdfx795yrnkpwmw1843nfylchhynlidf279z21vm";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-cloudflare-v6.10.0-darwin-arm64.tar.gz";
sha256 = "1cr924w029hah14j9cq0rsy2k0arph8r7dcmhi6zimw3wm0168dd";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-consul-v3.13.1-darwin-arm64.tar.gz";
sha256 = "1lva9jp2fbz58gfgsdbwlyrdd60wpy1xy55af7f8dmabgcc8j391";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-datadog-v4.57.0-darwin-arm64.tar.gz";
sha256 = "06gdvb7d5mj7ggnjifi86nb2n7hyzv79rq5wh2dfl0fkf19qam69";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-digitalocean-v4.53.0-darwin-arm64.tar.gz";
sha256 = "0v50vs1d1cm6dgfjz9adzka34hbws3j6hwr1s3vxk6f6apx9p3x0";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-docker-v4.9.0-darwin-arm64.tar.gz";
sha256 = "1r5i5hfq3qxic61fwz1m3s1lfcr60xkzkg4y8mqgp5vmfsgahqz7";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-equinix-metal-v3.2.1-darwin-arm64.tar.gz";
sha256 = "12bzicm43l7yvh02v5fx3z8v46l9i7a9f677735xi5rjbmd2an4c";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-fastly-v11.0.0-darwin-arm64.tar.gz";
sha256 = "0a1fy15bf66gvy7jvimbnycxb51z85svrpa9flly1ch3g7276w60";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-gcp-v9.2.0-darwin-arm64.tar.gz";
sha256 = "1q2mj9j869q91sswczwb3lrh0bk9aixyv89b5ramg2k3r0f2vndx";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-github-v6.7.3-darwin-arm64.tar.gz";
sha256 = "13il7mq0g853x1nllvxnhbhflrlqx8i11p4xkg46bvshay15xh9x";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-gitlab-v9.3.0-darwin-arm64.tar.gz";
sha256 = "0mf0pxpxjb2fpz4px3dg4b699fqvzf56crvrj00vyc6ld5hmmnpm";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-google-native-v0.32.0-darwin-arm64.tar.gz";
sha256 = "0caz4kgnnrmdr7n571xc7yqscac9jnjwwpjzbnvx4ib6a91wvsdn";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-hcloud-v1.25.0-darwin-arm64.tar.gz";
sha256 = "17dr3i20y5f120mq4b8j85jwb5xwid3bbpw2vdfc1qgs1ib17yav";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-kubernetes-v4.23.0-darwin-arm64.tar.gz";
sha256 = "17fl8apnlz4ifjzp1sq0fi4y1knxh1x2fvhlrg8j568f3svp41f8";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-linode-v5.3.0-darwin-arm64.tar.gz";
sha256 = "0pi9q7iwn670z4dzqqyivdh52dh19g2hsdffc35czj591pfccfvl";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-mailgun-v3.5.11-darwin-arm64.tar.gz";
sha256 = "1kkbgmhgp02qzxsh37m9x3jahwjnq5ls9dhjhgbxjjq6xalcqf79";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-mysql-v3.2.11-darwin-arm64.tar.gz";
sha256 = "0n1wmplyj2c5qhaq0gplphi8p2i7g4jwrnlwzkv0m1wixrlx3fw5";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-openstack-v5.3.3-darwin-arm64.tar.gz";
sha256 = "1bl3qcksqnd90jnmiyagi8sfwjcjkc0i9wrhq05pl4hx4wiv6ql2";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-postgresql-v3.16.0-darwin-arm64.tar.gz";
sha256 = "0k7w2a1zppw1pgy077iidvnlic21ynw4w7f15z3hw793inzj2wm3";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-random-v4.18.3-darwin-arm64.tar.gz";
sha256 = "1bb3bzybmfi5blagh13bm6q1avjbp80lmjdv4q5yc2dbfbs653xi";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-snowflake-v2.7.0-darwin-arm64.tar.gz";
sha256 = "1f409m7ls96vvx6x6lsfydp2vn809wy58s5cbh5p8s390s30q2zf";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-spotinst-v3.124.0-darwin-arm64.tar.gz";
sha256 = "1j1p8nrwmwnaxigprk6xv7m264mvy6fszq0p0ify0w6yxw0h9a2m";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-sumologic-v1.0.11-darwin-arm64.tar.gz";
sha256 = "1c4pn5nr8d97n9bqd7vz9gzlbi50hnfjylwwch445ylqp5l8gvqf";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-tailscale-v0.22.0-darwin-arm64.tar.gz";
sha256 = "05w2w7fjyhkfcb08gncyrl36ynay09qc2zrd9g0ykprcpps61h30";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-tls-v5.2.2-darwin-arm64.tar.gz";
sha256 = "1qih4kprfaa82p7mg4zg8amy8vp4c76vqkmwf3df2x8bn69jdrc0";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-vault-v7.3.0-darwin-arm64.tar.gz";
sha256 = "1p3nb3aazr47kiprq7k3js6x8jk87dsql6d4qkn6c60mbrm9mlal";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-venafi-v1.12.1-darwin-arm64.tar.gz";
sha256 = "03qhd6p77d40dbcvr6ifw6ii37303jmcqhns63r8gmpbfkdg52a2";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-vsphere-v4.16.0-darwin-arm64.tar.gz";
sha256 = "1x3g6j9adkc1k937s271zqwk82w9w07fkm4d8dwcv85sf1m1phhj";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-wavefront-v3.1.10-darwin-arm64.tar.gz";
sha256 = "1ga7zvw6przmkbcpi3vq081g4bh8p4bzrfhi3jyxd6kh4slb3g9d";
}
{
url = "https://api.pulumi.com/releases/plugins/pulumi-resource-yandex-v0.13.0-darwin-arm64.tar.gz";
sha256 = "1qaccfqw24g862ij2p49m78hnymg0j2nghshszqrg45v0d0qnknm";
}
];
};
}

View File

@@ -0,0 +1,60 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
makeWrapper,
installShellFiles,
}:
let
data = import ./data.nix { };
in
stdenv.mkDerivation {
pname = "pulumi";
inherit (data) version;
postUnpack = ''
mv pulumi-* pulumi
'';
srcs = map fetchurl data.pulumiPkgs.${stdenv.hostPlatform.system};
installPhase = ''
install -D -t $out/bin/ *
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
wrapProgram $out/bin/pulumi --set LD_LIBRARY_PATH "${lib.getLib stdenv.cc.cc}/lib"
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd pulumi \
--bash <($out/bin/pulumi completion bash) \
--fish <($out/bin/pulumi completion fish) \
--zsh <($out/bin/pulumi completion zsh)
'';
nativeBuildInputs = [
installShellFiles
]
++ lib.optionals stdenv.hostPlatform.isLinux [
autoPatchelfHook
makeWrapper
];
buildInputs = [ stdenv.cc.cc.libgcc or null ];
meta = with lib; {
homepage = "https://pulumi.io/";
description = "Pulumi is a cloud development platform that makes creating cloud programs easy and productive";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = with licenses; [ asl20 ];
platforms = builtins.attrNames data.pulumiPkgs;
maintainers = with maintainers; [
ghuntley
peterromfeldhk
jlesquembre
cpcloud
wrbbz
];
hydraPlatforms = [ ]; # Hydra fails with "Output limit exceeded"
};
}

View File

@@ -0,0 +1,9 @@
{
nixpkgs ? import ../../../.. { },
}:
with nixpkgs;
mkShell {
packages = [
pkgs.gh
];
}

View File

@@ -0,0 +1,159 @@
#!/usr/bin/env nix-shell
#!nix-shell update-pulumi-shell.nix -i bash
# shellcheck shell=bash
# Bash 3 compatible for Darwin
if [ -z "${GITHUB_TOKEN}" ] || [ $# -ne 1 ]; then
echo >&2 "usage: GITHUB_TOKEN=… ./update.sh pulumi-version"
exit 1
fi
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# Version of Pulumi from
# https://www.pulumi.com/docs/get-started/install/versions/
VERSION=$1
# An array of plugin names. The respective repository inside Pulumi's
# Github organization is called pulumi-$name by convention.
declare -a pulumi_repos
pulumi_repos=(
"aiven"
"akamai"
"alicloud"
"artifactory"
"auth0"
"aws"
"azure"
"azuread"
"azuredevops"
"cloudflare"
"consul"
"datadog"
"digitalocean"
"docker"
"equinix-metal"
"fastly"
"gcp"
"github"
"gitlab"
"google-native"
"hcloud"
"kubernetes"
"linode"
"mailgun"
"mysql"
"openstack"
"postgresql"
"random"
"snowflake"
"spotinst"
"sumologic"
"tailscale"
"tls"
"vault"
"venafi"
"vsphere"
"wavefront"
"yandex"
)
# Contains latest release ${VERSION} from
# https://github.com/pulumi/pulumi-${NAME}/releases
# Dynamically builds the plugin array, using the GitHub API for getting the
# latest version.
plugin_num=1
plugins=()
for key in "${pulumi_repos[@]}"; do
plugin="${key}=$(gh api "repos/pulumi/pulumi-${key}/releases/latest" --jq '.tag_name | sub("^v"; "")')"
printf "%20s: %s of %s\r" "${plugin}" "${plugin_num}" "${#pulumi_repos[@]}"
plugins+=("${plugin}")
sleep 1
((++plugin_num))
done
printf "\n"
function genMainSrc() {
local url="https://get.pulumi.com/releases/sdk/pulumi-v${VERSION}-${1}-${2}.tar.gz"
local sha256
sha256=$(nix-prefetch-url "$url")
echo " {"
echo " url = \"${url}\";"
echo " sha256 = \"$sha256\";"
echo " }"
}
function genSrc() {
local url="${1}"
local plug="${2}"
local tmpdir="${3}"
local sha256
sha256=$(nix-prefetch-url "$url")
{
if [ -n "$sha256" ]; then # file exists
echo " {"
echo " url = \"${url}\";"
echo " sha256 = \"$sha256\";"
echo " }"
else
echo " # pulumi-resource-${plug} skipped (does not exist on remote)"
fi
} > "${tmpdir}/${plug}.nix"
}
function genSrcs() {
local tmpdir
tmpdir="$(mktemp -d)"
for plugVers in "${plugins[@]}"; do
local plug=${plugVers%=*}
local version=${plugVers#*=}
# url as defined here
# https://github.com/pulumi/pulumi/blob/06d4dde8898b2a0de2c3c7ff8e45f97495b89d82/pkg/workspace/plugins.go#L197
local url="https://api.pulumi.com/releases/plugins/pulumi-resource-${plug}-v${version}-${1}-${2}.tar.gz"
genSrc "${url}" "${plug}" "${tmpdir}" &
done
wait
find "${tmpdir}" -name '*.nix' -print0 | sort -z | xargs -r0 cat
rm -r "${tmpdir}"
}
{
cat << EOF
# DO NOT EDIT! This file is generated automatically by update.sh
{ }:
{
version = "${VERSION}";
pulumiPkgs = {
EOF
echo " x86_64-linux = ["
genMainSrc "linux" "x64"
genSrcs "linux" "amd64"
echo " ];"
echo " x86_64-darwin = ["
genMainSrc "darwin" "x64"
genSrcs "darwin" "amd64"
echo " ];"
echo " aarch64-linux = ["
genMainSrc "linux" "arm64"
genSrcs "linux" "arm64"
echo " ];"
echo " aarch64-darwin = ["
genMainSrc "darwin" "arm64"
genSrcs "darwin" "arm64"
echo " ];"
echo " };"
echo "}"
} > "${SCRIPT_DIR}/data.nix"

View File

@@ -0,0 +1,173 @@
{
lib,
stdenv,
fetchFromGitHub,
nixosTests,
# Dependencies
bzip2,
cmake,
dri-pkgconfig-stub,
freetype,
libGL,
libgbm,
libjpeg_turbo,
makeWrapper,
mesa-gl-headers, # for built-in 3D software rendering using swrast
openjdk, # for the client with Java GUI
openjdk_headless, # for the server
openssh,
openssl,
pam,
perl,
pkg-config,
python3,
which,
xkbcomp,
xkeyboard_config,
xorg,
xterm,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "turbovnc";
version = "3.2.1";
src = fetchFromGitHub {
owner = "TurboVNC";
repo = "turbovnc";
rev = finalAttrs.version;
hash = "sha256-J+J4QRf21QLScgtwwSZCXoy0+6bwZFeXm4k4zk0h5Rs=";
};
# Notes:
# * SSH support does not require `openssh` on PATH, because turbovnc
# uses a built-in SSH client ("JSch fork"), as commented on e.g.:
# https://github.com/TurboVNC/turbovnc/releases/tag/3.2.1beta1
#
# TODO:
# * Build outputs that are unclear:
# * `-- FONT_ENCODINGS_DIRECTORY = /var/empty/share/X11/fonts/encodings`
# Maybe relevant what the tigervnc and tightvnc derivations
# do with their `fontDirectories`?
# * `XORG_REGISTRY_PATH = /var/empty/lib64/xorg`
# * The thing about xorg `protocol.txt`
# * Add `enableClient ? true` flag that disables the client GUI
# so that the server can be built without openjdk dependency.
# * Perhaps allow to build the client on non-Linux platforms.
nativeBuildInputs = [
cmake
makeWrapper
openjdk_headless
pkg-config
python3
];
buildInputs = [
bzip2
dri-pkgconfig-stub
freetype
libGL # for -DTVNC_SYSTEMX11=1
libgbm
libjpeg_turbo
openssl
pam
perl
]
++ (with xorg; [
libfontenc # for -DTVNC_SYSTEMX11=1
libSM
libX11
libXdamage # for -DTVNC_SYSTEMX11=1
libXdmcp # for -DTVNC_SYSTEMX11=1
libXext
libXfont2 # for -DTVNC_SYSTEMX11=1
libxkbfile # for -DTVNC_SYSTEMX11=1
libxshmfence
libXi
mesa-gl-headers # for -DTVNC_SYSTEMX11=1
pixman # for -DTVNC_SYSTEMX11=1
xorgproto
xtrans # for -DTVNC_SYSTEMX11=1
]);
postPatch = ''
substituteInPlace unix/Xvnc/CMakeLists.txt --replace 'string(REGEX REPLACE "X11" "Xfont2" X11_Xfont2_LIB' 'set(X11_Xfont2_LIB ${xorg.libXfont2}/lib/libXfont2.so) #'
substituteInPlace unix/Xvnc/CMakeLists.txt --replace 'string(REGEX REPLACE "X11" "fontenc" X11_Fontenc_LIB' 'set(X11_Fontenc_LIB ${xorg.libfontenc}/lib/libfontenc.so) #'
substituteInPlace unix/Xvnc/CMakeLists.txt --replace 'string(REGEX REPLACE "X11" "pixman-1" X11_Pixman_LIB' 'set(X11_Pixman_LIB ${xorg.pixman}/lib/libpixman-1.so) #'
'';
cmakeFlags = [
# For the 3D software rendering built into TurboVNC, pass the path
# to the swrast dri driver in Mesa.
# Can also be given at runtime to its `Xvnc` as:
# -dridir /nix/store/...-mesa-20.1.10-drivers/lib/dri/
"-DXORG_DRI_DRIVER_PATH=${libGL.driverLink}/lib/dri"
# The build system doesn't find these files automatically.
"-DXKB_BASE_DIRECTORY=${xkeyboard_config}/share/X11/xkb"
"-DXKB_BIN_DIRECTORY=${xkbcomp}/bin"
# use system libs
# TurboVNC >= 3.1.4 no longer needs overrides to use system libraries
# instead of bundling them, see
# https://github.com/TurboVNC/turbovnc/releases/tag/3.2.1beta1:
# > The TVNC_SYSTEMLIBS and TVNC_SYSTEMX11 CMake variables have been removed,
# > and the build system now behaves as if those variables are always on.
# > A new CMake variable (TVNC_ZLIBNG) can be used on x86 platforms
# > to disable the in-tree SIMD-accelerated zlib-ng implementation
# > and build against the system-supplied zlib implementation.
#
# We'd like to build against nixpkgs's `zlib-ng`, but if we pass
# `-DTVNC_ZLIBNG=0`, the above logic seems to imply that it looks
# for normal zlib as well, and the `./configure` output prints
# -- zlib-ng disabled (TVNC_ZLIBNG = 0)
# -- Found ZLIB: /nix/store/<...>/lib/libz.so (found version "1.3.1")
# so that seems to use normal `zlib`, even though it's not declared
# as a dependency here (probably it's part of `stdenv`).
# So for now, we use TruboVNC's in-tree `zlib-ng`.
# "-DTVNC_ZLIBNG=0" # not given currently as explained above
];
postInstall = ''
# turbovnc dlopen()s libssl.so depending on the requested encryption.
wrapProgram $out/bin/Xvnc \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl ]}
# `twm` is the default window manager that `vncserver` tries to start,
# and it has minimal dependencies (no non-Xorg).
# (This default is written by `vncserver` to `~/.vnc/xstartup.turbovnc`,
# see https://github.com/TurboVNC/turbovnc/blob/ffdb57d9/unix/vncserver.in#L201.)
# It checks for it using `which twm`.
# vncserver needs also needs `xauth` and we add in `xterm` for convenience
wrapProgram $out/bin/vncserver \
--prefix PATH : ${
lib.makeBinPath [
which
xorg.twm
xorg.xauth
xterm
]
}
# Patch /usr/bin/perl
patchShebangs $out/bin/vncserver
# The viewer is in Java and requires `JAVA_HOME` (which is a single
# path, cannot be multiple separated paths).
# For SSH support, `ssh` is required on `PATH`.
wrapProgram $out/bin/vncviewer \
--set JAVA_HOME "${lib.makeLibraryPath [ openjdk ]}/openjdk" \
--prefix PATH : ${lib.makeBinPath [ openssh ]}
'';
passthru.tests.turbovnc-headless-server = nixosTests.turbovnc-headless-server;
meta = {
homepage = "https://turbovnc.org/";
license = lib.licenses.gpl2Plus;
description = "High-speed version of VNC derived from TightVNC";
maintainers = with lib.maintainers; [ nh2 ];
platforms = with lib.platforms; linux;
changelog = "https://github.com/TurboVNC/turbovnc/blob/${finalAttrs.version}/ChangeLog.md";
};
})

View File

@@ -0,0 +1,77 @@
{
lib,
stdenvNoCC,
fetchurl,
copyDesktopItems,
makeDesktopItem,
makeBinaryWrapper,
wine,
}:
let
# The icon is also from the winbox AUR package (see above).
icon = fetchurl {
name = "winbox.png";
url = "https://aur.archlinux.org/cgit/aur.git/plain/winbox.png?h=winbox";
hash = "sha256-YD6u2N+1thRnEsXO6AHm138fRda9XEtUX5+EGTg004A=";
};
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "winbox";
version = "3.43";
src = fetchurl (
if (wine.meta.mainProgram == "wine64") then
{
url = "https://download.mikrotik.com/routeros/winbox/${finalAttrs.version}/winbox64.exe";
hash = "sha256-W0HPUf2B6NCCaH9rUiFZz0q6IubfjtxIZyHU4JUHtuk=";
}
else
{
url = "https://download.mikrotik.com/routeros/winbox/${finalAttrs.version}/winbox.exe";
hash = "sha256-pAOOTgmjQoXI2o2MKTDuOOpb7q0rb/zWATDNyAMOLms=";
}
);
dontUnpack = true;
nativeBuildInputs = [
makeBinaryWrapper
copyDesktopItems
];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,libexec,share/pixmaps}
ln -s "${icon}" "$out/share/pixmaps/winbox.png"
makeWrapper ${lib.getExe wine} $out/bin/winbox \
--add-flags $src
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "winbox";
desktopName = "Winbox";
comment = "GUI administration for Mikrotik RouterOS";
exec = "winbox";
icon = "winbox";
categories = [ "Utility" ];
})
];
meta = {
description = "Graphical configuration utility for RouterOS-based devices";
homepage = "https://mikrotik.com";
downloadPage = "https://mikrotik.com/download";
changelog = "https://wiki.mikrotik.com/wiki/Winbox_changelog";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
mainProgram = "winbox";
maintainers = with lib.maintainers; [ yrd ];
};
})

View File

@@ -0,0 +1,94 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
updateAutotoolsGnuConfigScriptsHook,
libintl,
aclSupport ? lib.meta.availableOn stdenv.hostPlatform acl,
acl,
}:
# 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 = "gnutar";
version = "1.35";
src = fetchurl {
url = "mirror://gnu/tar/tar-${version}.tar.xz";
sha256 = "sha256-TWL/NzQux67XSFNTI5MMfPlKz3HDWRiCsmp+pQ8+3BY=";
};
# GNU tar fails to link libiconv even though the configure script detects it.
# https://savannah.gnu.org/bugs/index.php?64441
patches = [ ./link-libiconv.patch ];
# gnutar tries to call into gettext between `fork` and `exec`,
# which is not safe on darwin.
# see http://article.gmane.org/gmane.os.macosx.fink.devel/21882
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace src/system.c --replace '_(' 'N_('
'';
outputs = [
"out"
"info"
];
nativeBuildInputs = [ autoreconfHook ];
# Add libintl on Darwin specifically as it fails to link (or skip)
# NLS on it's own:
# "_libintl_textdomain", referenced from:
# _main in tar.o
# ld: symbol(s) not found for architecture x86_64
buildInputs = lib.optional aclSupport acl ++ lib.optional stdenv.hostPlatform.isDarwin libintl;
# May have some issues with root compilation because the bootstrap tool
# cannot be used as a login shell for now.
FORCE_UNSAFE_CONFIGURE = lib.optionalString (
stdenv.hostPlatform.system == "armv7l-linux" || stdenv.hostPlatform.isSunOS
) "1";
preConfigure =
if stdenv.hostPlatform.isCygwin then
''
sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
''
else
null;
doCheck = false; # fails
doInstallCheck = false; # fails
meta = {
description = "GNU implementation of the `tar' archiver";
longDescription = ''
The Tar program provides the ability to create tar archives, as
well as various other kinds of manipulation. For example, you
can use Tar on previously created archives to extract files, to
store additional files, or to update or list files which were
already stored.
Initially, tar archives were used to store files conveniently on
magnetic tape. The name "Tar" comes from this use; it stands
for tape archiver. Despite the utility's name, Tar can direct
its output to available devices, files, or other programs (using
pipes), it can even access remote devices or files (as
archives).
'';
homepage = "https://www.gnu.org/software/tar/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ RossComputerGuy ];
mainProgram = "tar";
platforms = lib.platforms.all;
priority = 10;
};
}

View File

@@ -0,0 +1,23 @@
From 8632df398b2f548465ebe68b8f494c0d6f8d913d Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org>
Date: Tue, 18 Jul 2023 17:02:23 +0300
Subject: Fix savannah bug #64441
* src/Makefile.am (tar_LDADD): Add libiconv libraries.
---
src/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 36c9543..e2ec58d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -52,4 +52,5 @@ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
tar_LDADD = $(LIBS) ../lib/libtar.a ../gnu/libgnu.a\
$(LIB_ACL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)\
$(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(FILE_HAS_ACL_LIB) $(LIB_MBRTOWC)\
- $(LIB_SELINUX) $(LIB_SETLOCALE_NULL)
+ $(LIB_SELINUX) $(LIB_SETLOCALE_NULL) \
+ $(LIBINTL) $(LIBICONV)
--
cgit v1.1

View File

@@ -0,0 +1,98 @@
{
lib,
stdenv,
fetchFromGitHub,
enableUnfree ? false,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "p7zip";
version = "17.06";
src = fetchFromGitHub {
owner = "p7zip-project";
repo = "p7zip";
rev = "v${finalAttrs.version}";
sha256 =
{
free = "sha256-NHlacZFal4xMYyFMshibeAw86cS1RXXyXweXKFHQAT8=";
unfree = "sha256-kSJHgnuUxO9DJwSOE1hffp9PfU39V+VE87I3CpeRGiY=";
}
.${if enableUnfree then "unfree" else "free"};
# remove the unRAR related code from the src drv
# > the license requires that you agree to these use restrictions,
# > or you must remove the software (source and binary) from your hard disks
# https://fedoraproject.org/wiki/Licensing:Unrar
postFetch = lib.optionalString (!enableUnfree) ''
rm -r $out/CPP/7zip/Compress/Rar*
find $out -name makefile'*' -exec sed -i '/Rar/d' {} +
'';
};
# Default makefile is full of impurities on Darwin. The patch doesn't hurt Linux so I'm leaving it unconditional
postPatch = ''
sed -i '/CC=\/usr/d' makefile.macosx_llvm_64bits
# Avoid writing timestamps into compressed manpages
# to maintain determinism.
substituteInPlace install.sh --replace 'gzip' 'gzip -n'
chmod +x install.sh
# I think this is a typo and should be CXX? Either way let's kill it
sed -i '/XX=\/usr/d' makefile.macosx_llvm_64bits
''
+ lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
substituteInPlace makefile.machine \
--replace 'CC=gcc' 'CC=${stdenv.cc.targetPrefix}gcc' \
--replace 'CXX=g++' 'CXX=${stdenv.cc.targetPrefix}g++'
'';
preConfigure = ''
buildFlags=all3
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
cp makefile.macosx_llvm_64bits makefile.machine
'';
enableParallelBuilding = true;
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
makeFlags = [
"DEST_BIN=${placeholder "out"}/bin"
"DEST_SHARE=${placeholder "lib"}/lib/p7zip"
"DEST_MAN=${placeholder "man"}/share/man"
"DEST_SHARE_DOC=${placeholder "doc"}/share/doc/p7zip"
];
outputs = [
"out"
"lib"
"doc"
"man"
];
setupHook = ./setup-hook.sh;
passthru.updateScript = ./update.sh;
meta = with lib; {
homepage = "https://github.com/p7zip-project/p7zip";
description = "New p7zip fork with additional codecs and improvements (forked from https://sourceforge.net/projects/p7zip/)";
license =
with licenses;
# p7zip code is largely lgpl2Plus
# CPP/7zip/Compress/LzfseDecoder.cpp is bsd3
[
lgpl2Plus # and
bsd3
]
++
# and CPP/7zip/Compress/Rar* are unfree with the unRAR license restriction
# the unRAR compression code is disabled by default
lib.optionals enableUnfree [ unfree ];
maintainers = with maintainers; [
raskin
jk
];
platforms = platforms.unix;
mainProgram = "7z";
};
})

View File

@@ -0,0 +1,5 @@
unpackCmdHooks+=(_try7zip)
_try7zip() {
if ! [[ "$curSrc" =~ \.7z$ ]]; then return 1; fi
7z x "$curSrc"
}

View File

@@ -0,0 +1,47 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils gnused curl jq
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
DRV_DIR="$PWD"
OLD_VERSION="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
NEW_VERSION="$(curl https://api.github.com/repos/p7zip-project/p7zip/releases/latest | jq .tag_name -r | tr -d 'v')"
echo "comparing versions $OLD_VERSION => $NEW_VERSION"
if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
echo "Already up to date! Doing nothing"
exit 0
fi
NIXPKGS_ROOT="$(realpath "$DRV_DIR/../../../..")"
echo "getting free source hash"
OLD_FREE_HASH="$(nix-instantiate --eval --strict -E "with import $NIXPKGS_ROOT {}; p7zip.src.drvAttrs.outputHash" | tr -d '"')"
echo "getting unfree source hash"
OLD_UNFREE_HASH="$(nix-instantiate --eval --strict -E "with import $NIXPKGS_ROOT {}; (p7zip.override { enableUnfree = true; }).src.drvAttrs.outputHash" | tr -d '"')"
NEW_FREE_HASH=$(nix-prefetch -f "$NIXPKGS_ROOT" -E "p7zip.src" --rev "v$NEW_VERSION")
NEW_UNFREE_OUT=$(nix-prefetch -f "$NIXPKGS_ROOT" -E "(p7zip.override { enableUnfree = true; }).src" --rev "v$NEW_VERSION" --output raw --print-path)
# first line of raw output is the hash
NEW_UNFREE_HASH="$(echo "$NEW_UNFREE_OUT" | sed -n 1p)"
# second line of raw output is the src path
NEW_UNFREE_SRC="$(echo "$NEW_UNFREE_OUT" | sed -n 2p)"
# make sure to nuke the unfree src from the updater's machine
# > the license requires that you agree to these use restrictions, or you must remove the software (source and binary) from your hard disks
# https://fedoraproject.org/wiki/Licensing:Unrar
nix-store --delete "$NEW_UNFREE_SRC"
echo "updating version"
sed -i "s/version = \"$OLD_VERSION\";/version = \"$NEW_VERSION\";/" "$DRV_DIR/default.nix"
echo "updating free hash"
sed -i "s@free = \"$OLD_FREE_HASH\";@free = \"$NEW_FREE_HASH\";@" "$DRV_DIR/default.nix"
echo "updating unfree hash"
sed -i "s@unfree = \"$OLD_UNFREE_HASH\";@unfree = \"$NEW_UNFREE_HASH\";@" "$DRV_DIR/default.nix"
echo "done"

View File

@@ -0,0 +1,117 @@
{
lib,
stdenv,
fetchFromGitHub,
installShellFiles,
gnustep-base,
bzip2,
zlib,
icu,
openssl,
wavpack,
xcbuildHook,
}:
stdenv.mkDerivation rec {
pname = "unar";
version = "1.10.8";
srcs = [
(fetchFromGitHub rec {
owner = "MacPaw";
repo = "XADMaster";
name = repo;
rev = "v${version}";
hash = "sha256-dmIyxpa3pq4ls4Grp0gy/6ZjcaA7rmobMn4h1inVgns=";
})
(fetchFromGitHub {
owner = "MacPaw";
repo = "universal-detector";
name = "UniversalDetector";
rev = "1.1";
hash = "sha256-6X1HtXhRuRwBOq5TAtL1I/vBBZokZOXIQ+oaRFigtv8=";
})
];
postPatch = ''
substituteInPlace unar.m lsar.m \
--replace-fail "v1.10.7" "v${version}"
''
+ (
if stdenv.hostPlatform.isDarwin then
''
substituteInPlace "./XADMaster.xcodeproj/project.pbxproj" \
--replace "libstdc++.6.dylib" "libc++.1.dylib"
''
else
''
for f in Makefile.linux ../UniversalDetector/Makefile.linux ; do
substituteInPlace $f \
--replace "= gcc" "=${stdenv.cc.targetPrefix}cc" \
--replace "= g++" "=${stdenv.cc.targetPrefix}c++" \
--replace "-DGNU_RUNTIME=1" "" \
--replace "-fgnu-runtime" "-fobjc-runtime=gnustep-2.0"
done
# we need to build inside this directory as well, so we have to make it writeable
chmod +w ../UniversalDetector -R
''
);
buildInputs = [
bzip2
icu
openssl
wavpack
zlib
]
++ lib.optionals stdenv.hostPlatform.isLinux [ gnustep-base ];
nativeBuildInputs = [
installShellFiles
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuildHook ];
xcbuildFlags = lib.optionals stdenv.hostPlatform.isDarwin [
"-target unar"
"-target lsar"
"-configuration Release"
"MACOSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}"
];
makefile = lib.optionalString (!stdenv.hostPlatform.isDarwin) "Makefile.linux";
enableParallelBuilding = true;
dontConfigure = true;
sourceRoot = "XADMaster";
installPhase = ''
runHook preInstall
install -Dm555 -t $out/bin ${lib.optionalString stdenv.hostPlatform.isDarwin "Products/Release/"}{lsar,unar}
for f in lsar unar; do
installManPage ./Extra/$f.?
installShellCompletion --bash --name $f ./Extra/$f.bash_completion
done
runHook postInstall
'';
meta = with lib; {
homepage = "https://theunarchiver.com";
description = "Archive unpacker program";
longDescription = ''
The Unarchiver is an archive unpacker program with support for the popular
zip, RAR, 7z, tar, gzip, bzip2, LZMA, XZ, CAB, MSI, NSIS, EXE, ISO, BIN,
and split file formats, as well as the old Stuffit, Stuffit X, DiskDouble,
Compact Pro, Packit, cpio, compress (.Z), ARJ, ARC, PAK, ACE, ZOO, LZH,
ADF, DMS, LZX, PowerPacker, LBR, Squeeze, Crunch, and other old formats.
'';
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ peterhoeg ];
mainProgram = "unar";
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
buildPythonApplication,
fetchFromGitHub,
unar,
}:
buildPythonApplication rec {
pname = "unrar-wrapper";
version = "1.0.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "openSUSE";
repo = "unrar_wrapper";
rev = "unrar_wrapper-${version}";
sha256 = "sha256-HjrUif8MrbtLjRQMAPZ/Y2o43rGSDj0HHY4fZQfKz5w=";
};
makeWrapperArgs = [
"--prefix"
"PATH"
":"
"${lib.makeBinPath [ unar ]}"
];
postFixup = ''
ln -s $out/bin/unrar_wrapper $out/bin/unrar
rm -rf $out/nix-support/propagated-build-inputs
'';
setupHook = ./setup-hook.sh;
meta = with lib; {
homepage = "https://github.com/openSUSE/unrar_wrapper";
description = "Backwards compatibility between unar and unrar";
longDescription = ''
unrar_wrapper is a wrapper python script that transforms the basic UnRAR commands
to unar and lsar calls in order to provide a backwards compatibility.
'';
license = licenses.gpl3Only;
platforms = platforms.unix;
maintainers = with maintainers; [ artturin ];
};
}

View File

@@ -0,0 +1,5 @@
unpackCmdHooks+=(_tryUnrar)
_tryUnrar() {
if ! [[ "$curSrc" =~ \.rar$ ]]; then return 1; fi
unrar x "$curSrc" >/dev/null
}

View File

@@ -0,0 +1,183 @@
{
aacgain,
chromaprint,
ffmpeg,
flac,
imagemagick,
keyfinder-cli,
mp3gain,
mp3val,
python3Packages,
version,
lib,
...
}:
{
absubmit = {
deprecated = true;
testPaths = [ ];
};
advancedrewrite = {
testPaths = [ ];
};
acousticbrainz = {
deprecated = true;
propagatedBuildInputs = [ python3Packages.requests ];
};
albumtypes = { };
aura = {
propagatedBuildInputs = with python3Packages; [
flask
flask-cors
pillow
];
};
autobpm = {
propagatedBuildInputs = with python3Packages; [
librosa
# An optional dependency of librosa, needed for beets' autobpm
resampy
];
};
badfiles = {
testPaths = [ ];
wrapperBins = [
mp3val
flac
];
};
bareasc = { };
beatport.propagatedBuildInputs = [ python3Packages.requests-oauthlib ];
bench.testPaths = [ ];
bpd.testPaths = [ ];
bpm.testPaths = [ ];
bpsync.testPaths = [ ];
bucket = { };
chroma = {
propagatedBuildInputs = [ python3Packages.pyacoustid ];
testPaths = [ ];
wrapperBins = [
chromaprint
];
};
convert.wrapperBins = [ ffmpeg ];
deezer = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
discogs.propagatedBuildInputs = with python3Packages; [
discogs-client
requests
];
duplicates.testPaths = [ ];
edit = { };
embedart = {
propagatedBuildInputs = with python3Packages; [ pillow ];
wrapperBins = [ imagemagick ];
};
embyupdate.propagatedBuildInputs = [ python3Packages.requests ];
export = { };
fetchart = {
propagatedBuildInputs = with python3Packages; [
beautifulsoup4
langdetect
pillow
requests
];
wrapperBins = [ imagemagick ];
};
filefilter = { };
fish.testPaths = [ ];
freedesktop.testPaths = [ ];
fromfilename.testPaths = [ ];
ftintitle = { };
fuzzy.testPaths = [ ];
gmusic.testPaths = [ ];
hook = { };
ihate = { };
importadded = { };
importfeeds = { };
info = { };
inline.testPaths = [ ];
ipfs = { };
keyfinder.wrapperBins = [ keyfinder-cli ];
kodiupdate = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
lastgenre.propagatedBuildInputs = [ python3Packages.pylast ];
lastimport = {
propagatedBuildInputs = [ python3Packages.pylast ];
testPaths = [ ];
};
limit = { };
listenbrainz = {
testPaths = [ ];
};
loadext = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
lyrics.propagatedBuildInputs = with python3Packages; [
beautifulsoup4
langdetect
requests
];
mbcollection.testPaths = [ ];
mbsubmit = { };
mbsync = { };
metasync.testPaths = [ ];
missing.testPaths = [ ];
mpdstats.propagatedBuildInputs = [ python3Packages.mpd2 ];
mpdupdate = {
propagatedBuildInputs = [ python3Packages.mpd2 ];
testPaths = [ ];
};
musicbrainz = { };
parentwork = { };
permissions = { };
play = { };
playlist.propagatedBuildInputs = [ python3Packages.requests ];
plexupdate = { };
random = { };
replace = { };
replaygain.wrapperBins = [
aacgain
ffmpeg
mp3gain
];
rewrite.testPaths = [ ];
scrub.testPaths = [ ];
smartplaylist = { };
sonosupdate = {
propagatedBuildInputs = [ python3Packages.soco ];
testPaths = [ ];
};
spotify = { };
subsonicplaylist = {
propagatedBuildInputs = [ python3Packages.requests ];
testPaths = [ ];
};
subsonicupdate.propagatedBuildInputs = [ python3Packages.requests ];
substitute = {
testPaths = [ ];
};
the = { };
thumbnails = {
propagatedBuildInputs = with python3Packages; [
pillow
pyxdg
];
wrapperBins = [ imagemagick ];
};
types.testPaths = [ "test/plugins/test_types_plugin.py" ];
unimported.testPaths = [ ];
web.propagatedBuildInputs = with python3Packages; [
flask
flask-cors
];
zero = { };
_typing = {
testPaths = [ ];
};
}

View File

@@ -0,0 +1,253 @@
{
lib,
stdenv,
src,
version,
fetchpatch,
bashInteractive,
diffPlugins,
gobject-introspection,
gst_all_1,
python3Packages,
sphinxHook,
writableTmpDirAsHomeHook,
runtimeShell,
writeScript,
# plugin deps, used indirectly by the @inputs when we `import ./builtin-plugins.nix`
aacgain,
chromaprint,
essentia-extractor,
ffmpeg,
flac,
imagemagick,
keyfinder-cli,
mp3gain,
mp3val,
extraPatches ? [ ],
pluginOverrides ? { },
disableAllPlugins ? false,
disabledTests ? [ ],
extraNativeBuildInputs ? [ ],
# tests
runCommand,
beets,
}@inputs:
let
inherit (lib) attrNames attrValues concatMap;
mkPlugin =
{
name,
enable ? !disableAllPlugins,
builtin ? false,
propagatedBuildInputs ? [ ],
testPaths ? [
"test/plugins/test_${name}.py"
],
wrapperBins ? [ ],
}:
{
inherit
name
enable
builtin
propagatedBuildInputs
testPaths
wrapperBins
;
};
basePlugins = lib.mapAttrs (_: a: { builtin = true; } // a) (import ./builtin-plugins.nix inputs);
pluginOverrides' = lib.mapAttrs (
plugName:
lib.throwIf (basePlugins.${plugName}.deprecated or false)
"beets evaluation error: Plugin ${plugName} was enabled in pluginOverrides, but it has been removed. Remove the override to fix evaluation."
) pluginOverrides;
allPlugins = lib.mapAttrs (n: a: mkPlugin { name = n; } // a) (
lib.recursiveUpdate basePlugins pluginOverrides'
);
builtinPlugins = lib.filterAttrs (_: p: p.builtin) allPlugins;
enabledPlugins = lib.filterAttrs (_: p: p.enable) allPlugins;
disabledPlugins = lib.filterAttrs (_: p: !p.enable) allPlugins;
disabledTestPaths = lib.flatten (attrValues (lib.mapAttrs (_: v: v.testPaths) disabledPlugins));
pluginWrapperBins = concatMap (p: p.wrapperBins) (attrValues enabledPlugins);
in
python3Packages.buildPythonApplication {
pname = "beets";
inherit src version;
pyproject = true;
patches = [
]
++ extraPatches;
build-system = [
python3Packages.poetry-core
];
dependencies =
with python3Packages;
[
confuse
gst-python
jellyfish
mediafile
munkres
musicbrainzngs
platformdirs
pyyaml
unidecode
typing-extensions
lap
]
++ (concatMap (p: p.propagatedBuildInputs) (attrValues enabledPlugins));
nativeBuildInputs = [
gobject-introspection
sphinxHook
python3Packages.pydata-sphinx-theme
]
++ extraNativeBuildInputs;
buildInputs = [
]
++ (with gst_all_1; [
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
]);
outputs = [
"out"
"doc"
"man"
];
sphinxBuilders = [
"html"
"man"
];
postInstall = ''
mkdir -p $out/share/zsh/site-functions
cp extra/_beet $out/share/zsh/site-functions/
'';
makeWrapperArgs = [
"--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\""
"--set GST_PLUGIN_SYSTEM_PATH_1_0 \"$GST_PLUGIN_SYSTEM_PATH_1_0\""
"--prefix PATH : ${lib.makeBinPath pluginWrapperBins}"
];
nativeCheckInputs =
with python3Packages;
[
pytestCheckHook
pytest-cov-stub
mock
rarfile
responses
requests-mock
pillow
]
++ [
writableTmpDirAsHomeHook
]
++ pluginWrapperBins;
__darwinAllowLocalNetworking = true;
disabledTestPaths =
disabledTestPaths
++ [
# touches network
"test/plugins/test_aura.py"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Flaky: several tests fail randomly with:
# if not self._poll(timeout):
# raise Empty
# _queue.Empty
"test/plugins/test_bpd.py"
]
++ lib.optionals stdenv.hostPlatform.isLinux [
# fail on Hydra with `RuntimeError: image cannot be obtained without artresizer backend`
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio"
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio_with_percent_margin"
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_enforce_ratio_with_px_margin"
"test/plugins/test_art.py::AlbumArtOperationConfigurationTest::test_minwidth"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_deinterlaced"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_deinterlaced_and_resized"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_not_resized"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized_and_scaled"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_file_resized_but_not_scaled"
"test/plugins/test_art.py::AlbumArtPerformOperationTest::test_resize"
];
disabledTests = disabledTests ++ [
# https://github.com/beetbox/beets/issues/5880
"test_reject_different_art"
# touches network
"test_merge_duplicate_album"
];
# Perform extra "sanity checks", before running pytest tests.
preCheck = ''
# Check for undefined plugins
find beetsplug -mindepth 1 \
\! -path 'beetsplug/__init__.py' -a \
\( -name '*.py' -o -path 'beetsplug/*/__init__.py' \) -print \
| sed -n -re 's|^beetsplug/([^/.]+).*|\1|p' \
| sort -u > plugins_available
${diffPlugins (attrNames builtinPlugins) "plugins_available"}
export BEETS_TEST_SHELL="${lib.getExe bashInteractive} --norc"
env EDITOR="${writeScript "beetconfig.sh" ''
#!${runtimeShell}
cat > "$1" <<CFG
plugins: ${lib.concatStringsSep " " (attrNames enabledPlugins)}
CFG
''}" "$out/bin/beet" config -e
env EDITOR=true "$out/bin/beet" config -e
'';
passthru.plugins = allPlugins;
passthru.tests.gstreamer =
runCommand "beets-gstreamer-test"
{
meta.timeout = 60;
}
''
set -euo pipefail
export HOME=$(mktemp -d)
mkdir $out
cat << EOF > $out/config.yaml
replaygain:
backend: gstreamer
EOF
${beets}/bin/beet -c $out/config.yaml > /dev/null
'';
meta = {
description = "Music tagger and library organizer";
homepage = "https://beets.io";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
aszlig
doronbehar
lovesegfault
montchr
pjones
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
mainProgram = "beet";
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
callPackage,
config,
fetchFromGitHub,
python3Packages,
}:
/*
** To customize the enabled beets plugins, use the pluginOverrides input to the
** derivation.
** Examples:
**
** Disabling a builtin plugin:
** beets.override { pluginOverrides = { beatport.enable = false; }; }
**
** Enabling an external plugin:
** beets.override { pluginOverrides = {
** alternatives = { enable = true; propagatedBuildInputs = [ beetsPackages.alternatives ]; };
** }; }
*/
let
extraPatches = [
# Bash completion fix for Nix
./patches/bash-completion-always-print.patch
];
in
lib.makeExtensible (
self:
{
beets = self.beets-stable;
beets-stable = callPackage ./common.nix rec {
inherit python3Packages extraPatches;
version = "2.4.0";
src = fetchFromGitHub {
owner = "beetbox";
repo = "beets";
tag = "v${version}";
hash = "sha256-BM4NW8iukw9+zLD2cfAETmFYNAiNPUn9cLrkVlCE+jM=";
};
};
beets-minimal = self.beets.override { disableAllPlugins = true; };
alternatives = callPackage ./plugins/alternatives.nix { beets = self.beets-minimal; };
audible = callPackage ./plugins/audible.nix { beets = self.beets-minimal; };
copyartifacts = callPackage ./plugins/copyartifacts.nix { beets = self.beets-minimal; };
filetote = callPackage ./plugins/filetote.nix { beets = self.beets-minimal; };
}
// lib.optionalAttrs config.allowAliases {
beets-unstable = lib.warn "beets-unstable was aliased to beets, since upstream releases are frequent nowadays" self.beets;
extrafiles = throw "extrafiles is unmaintained since 2020 and broken since beets 2.0.0";
}
)

View File

@@ -0,0 +1,45 @@
diff --git i/beets/ui/commands.py w/beets/ui/commands.py
index ad4f7821..5077191d 100755
--- i/beets/ui/commands.py
+++ w/beets/ui/commands.py
@@ -2381,22 +2381,6 @@ default_commands.append(config_cmd)
def print_completion(*args):
for line in completion_script(default_commands + plugins.commands()):
print_(line, end="")
- if not any(os.path.isfile(syspath(p)) for p in BASH_COMPLETION_PATHS):
- log.warning(
- "Warning: Unable to find the bash-completion package. "
- "Command line completion might not work."
- )
-
-
-BASH_COMPLETION_PATHS = [
- b"/etc/bash_completion",
- b"/usr/share/bash-completion/bash_completion",
- b"/usr/local/share/bash-completion/bash_completion",
- # SmartOS
- b"/opt/local/share/bash-completion/bash_completion",
- # Homebrew (before bash-completion2)
- b"/usr/local/etc/bash_completion",
-]
def completion_script(commands):
diff --git i/test/test_ui.py w/test/test_ui.py
index cae86148..faf266a8 100644
--- i/test/test_ui.py
+++ w/test/test_ui.py
@@ -1434,12 +1434,7 @@ class CompletionTest(_common.TestCase, TestHelper):
)
# Load bash_completion library.
- for path in commands.BASH_COMPLETION_PATHS:
- if os.path.exists(syspath(path)):
- bash_completion = path
- break
- else:
- self.skipTest("bash-completion script not found")
+ self.skipTest("bash-completion script not found")
try:
with open(util.syspath(bash_completion), "rb") as f:
tester.stdin.writelines(f)

View File

@@ -0,0 +1,53 @@
{
lib,
fetchFromGitHub,
beets,
python3Packages,
writableTmpDirAsHomeHook,
}:
python3Packages.buildPythonApplication rec {
pname = "beets-alternatives";
version = "0.13.4";
pyproject = true;
src = fetchFromGitHub {
repo = "beets-alternatives";
owner = "geigerzaehler";
tag = "v${version}";
hash = "sha256-jGHRoBBXqJq0r/Gbp7gkuaEFPVMGE6cqQRi84AHTXxQ=";
};
nativeBuildInputs = [
beets
];
dependencies = [
python3Packages.poetry-core
];
nativeCheckInputs =
with python3Packages;
[
pytestCheckHook
pytest-cov-stub
mock
pillow
tomli
typeguard
]
++ [
writableTmpDirAsHomeHook
];
meta = {
description = "Beets plugin to manage external files";
homepage = "https://github.com/geigerzaehler/beets-alternatives";
changelog = "https://github.com/geigerzaehler/beets-alternatives/blob/v${version}/CHANGELOG.md";
maintainers = with lib.maintainers; [
aszlig
lovesegfault
];
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,47 @@
{
beets,
fetchFromGitHub,
lib,
nix-update-script,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "beets-audible";
version = "1.0.2";
pyproject = true;
src = fetchFromGitHub {
owner = "Neurrone";
repo = "beets-audible";
rev = "v${version}";
hash = "sha256-6rf8U63SW+gwfT7ZdN/ymYKHRs0HSMDTP2ZBfULLsJs=";
};
nativeBuildInputs = [
beets
];
pythonRelaxDeps = true;
build-system = with python3Packages; [
hatchling
];
dependencies = with python3Packages; [
markdownify
natsort
tldextract
];
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Beets-audible: Organize Your Audiobook Collection With Beets";
homepage = "https://github.com/Neurrone/beets-audible";
platforms = with lib.platforms; linux ++ darwin ++ windows;
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ jwillikers ];
};
}

View File

@@ -0,0 +1,62 @@
{
lib,
beets,
fetchFromGitHub,
python3Packages,
writableTmpDirAsHomeHook,
}:
python3Packages.buildPythonApplication rec {
pname = "beets-copyartifacts";
version = "0.1.5";
pyproject = true;
src = fetchFromGitHub {
repo = "beets-copyartifacts";
owner = "adammillerio";
tag = "v${version}";
hash = "sha256-UTZh7T6Z288PjxFgyFxHnPt0xpAH3cnr8/jIrlJhtyU=";
};
postPatch = ''
sed -i -e '/namespace_packages/d' setup.py
printf 'from pkgutil import extend_path\n__path__ = extend_path(__path__, __name__)\n' >beetsplug/__init__.py
# beets v2.1.0 compat
# <https://github.com/beetbox/beets/commit/0e87389994a9969fa0930ffaa607609d02e286a8>
sed -i -e 's/util\.py3_path/os.fsdecode/g' tests/_common.py
'';
nativeBuildInputs = [
beets
];
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
six
];
nativeCheckInputs = [
python3Packages.pytestCheckHook
writableTmpDirAsHomeHook
];
pytestFlags = [
# This is the same as:
# -r fEs
"-rfEs"
];
meta = {
description = "Beets plugin to move non-music files during the import process";
homepage = "https://github.com/adammillerio/beets-copyartifacts";
changelog = "https://github.com/adammillerio/beets-copyartifacts/releases/tag/${src.tag}";
license = lib.licenses.mit;
inherit (beets.meta) platforms;
# Isn't compatible with beets >= 2.3
broken = true;
};
}

View File

@@ -0,0 +1,90 @@
{
lib,
fetchFromGitHub,
python3Packages,
beets,
beetsPackages,
writableTmpDirAsHomeHook,
}:
python3Packages.buildPythonApplication rec {
pname = "beets-filetote";
version = "1.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "gtronset";
repo = "beets-filetote";
tag = "v${version}";
hash = "sha256-5o0Hif0dNavYRH1pa1ZPTnOvk9VPXCU/Lqpg2rKzU/I=";
};
postPatch = ''
substituteInPlace pyproject.toml --replace-fail "poetry-core<2.0.0" "poetry-core"
'';
nativeBuildInputs = [
beets
];
build-system = [ python3Packages.poetry-core ];
dependencies = with python3Packages; [
mediafile
reflink
toml
typeguard
];
optional-dependencies = {
lint = with python3Packages; [
black
check-manifest
flake8
flake8-bugbear
flake8-bugbear-pyi
isort
mypy
pylint
typing_extensions
];
test = with python3Packages; [
beetsPackages.audible
mediafile
pytest
reflink
toml
typeguard
];
dev = optional-dependencies.lint ++ optional-dependencies.test ++ [ python3Packages.tox ];
};
pytestFlags = [
# This is the same as:
# -r fEs
"-rfEs"
];
disabledTestPaths = [
"tests/test_cli_operation.py"
"tests/test_pruning.py"
"tests/test_version.py"
];
nativeCheckInputs = [
python3Packages.pytestCheckHook
writableTmpDirAsHomeHook
]
++ optional-dependencies.test;
meta = with lib; {
description = "Beets plugin to move non-music files during the import process";
homepage = "https://github.com/gtronset/beets-filetote";
changelog = "https://github.com/gtronset/beets-filetote/blob/${src.tag}/CHANGELOG.md";
maintainers = with maintainers; [ dansbandit ];
license = licenses.mit;
inherit (beets.meta) platforms;
# https://github.com/gtronset/beets-filetote/issues/211
broken = true;
};
}

View File

@@ -0,0 +1,166 @@
{
lib,
stdenv,
makeWrapper,
fetchFromGitHub,
which,
pkg-config,
libjpeg,
ocamlPackages,
awscli2,
bubblewrap,
curl,
ffmpeg,
yt-dlp,
runtimePackages ? [
awscli2
bubblewrap
curl
ffmpeg
yt-dlp
],
}:
let
pname = "liquidsoap";
version = "2.3.3";
in
stdenv.mkDerivation {
inherit pname version;
src = fetchFromGitHub {
owner = "savonet";
repo = "liquidsoap";
rev = "refs/tags/v${version}";
hash = "sha256-EQFWFtgWvwsV+ZhO36Sd7mpxYOnd4Vv6Z+6xsgi335k=";
};
postPatch = ''
substituteInPlace src/lang/dune \
--replace-warn "(run git rev-parse --short HEAD)" "(run echo -n nixpkgs)"
# Compatibility with camlimages 5.0.5
substituteInPlace src/core/dune \
--replace-warn camlimages.all_formats camlimages.core
'';
dontConfigure = true;
buildPhase = ''
runHook preBuild
dune build
runHook postBuild
'';
installPhase = ''
runHook preInstall
dune install --prefix "$out"
runHook postInstall
'';
fixupPhase = ''
runHook preFixup
wrapProgram $out/bin/liquidsoap \
--set LIQ_LADSPA_PATH /run/current-system/sw/lib/ladspa \
--prefix PATH : ${lib.makeBinPath runtimePackages}
runHook postFixup
'';
strictDeps = true;
nativeBuildInputs = [
makeWrapper
pkg-config
which
ocamlPackages.ocaml
ocamlPackages.dune_3
ocamlPackages.findlib
ocamlPackages.menhir
];
buildInputs = [
libjpeg
# Mandatory dependencies
ocamlPackages.dtools
ocamlPackages.duppy
ocamlPackages.mm
ocamlPackages.ocurl
ocamlPackages.re
ocamlPackages.cry
ocamlPackages.camomile
ocamlPackages.uri
ocamlPackages.fileutils
ocamlPackages.magic-mime
ocamlPackages.menhir # liquidsoap-lang
ocamlPackages.menhirLib
ocamlPackages.mem_usage
ocamlPackages.metadata
ocamlPackages.dune-build-info
ocamlPackages.re
ocamlPackages.sedlex # liquidsoap-lang
ocamlPackages.ppx_hash # liquidsoap-lang
ocamlPackages.ppx_string
ocamlPackages.xml-light # liquidsoap-lang
# Recommended dependencies
ocamlPackages.ffmpeg
# Optional dependencies
ocamlPackages.alsa
ocamlPackages.ao
ocamlPackages.bjack
ocamlPackages.camlimages
ocamlPackages.dssi
ocamlPackages.faad
ocamlPackages.fdkaac
ocamlPackages.flac
ocamlPackages.frei0r
ocamlPackages.gd
ocamlPackages.graphics
ocamlPackages.imagelib
ocamlPackages.inotify
ocamlPackages.ladspa
ocamlPackages.lame
ocamlPackages.lastfm
ocamlPackages.lilv
ocamlPackages.lo
ocamlPackages.mad
ocamlPackages.ogg
ocamlPackages.opus
ocamlPackages.portaudio
ocamlPackages.posix-time2
ocamlPackages.pulseaudio
ocamlPackages.samplerate
ocamlPackages.shine
ocamlPackages.soundtouch
ocamlPackages.speex
ocamlPackages.srt
ocamlPackages.ssl
ocamlPackages.taglib
ocamlPackages.theora
ocamlPackages.tsdl
ocamlPackages.tsdl-image
ocamlPackages.tsdl-ttf
ocamlPackages.vorbis
ocamlPackages.xmlplaylist
ocamlPackages.yaml
];
meta = {
description = "Swiss-army knife for multimedia streaming";
mainProgram = "liquidsoap";
homepage = "https://www.liquidsoap.info/";
changelog = "https://raw.githubusercontent.com/savonet/liquidsoap/main/CHANGES.md";
maintainers = with lib.maintainers; [
dandellion
];
license = lib.licenses.gpl2Plus;
platforms = ocamlPackages.ocaml.meta.platforms or [ ];
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
buildPythonApplication,
fetchFromGitLab,
python-musicpd,
requests,
sphinxHook,
}:
buildPythonApplication rec {
pname = "mpd-sima";
version = "0.18.2";
src = fetchFromGitLab {
owner = "kaliko";
repo = "sima";
rev = version;
hash = "sha256-lMvM1EqS1govhv4B2hJzIg5DFQYgEr4yJJtgOQxnVlY=";
};
format = "setuptools";
postPatch = ''
sed -i '/intersphinx/d' doc/source/conf.py
'';
nativeBuildInputs = [
sphinxHook
];
sphinxBuilders = [ "man" ];
propagatedBuildInputs = [
requests
python-musicpd
];
doCheck = true;
preCheck = ''
export HOME="$(mktemp -d)"
'';
meta = with lib; {
description = "Autoqueuing mpd client";
homepage = "https://kaliko.me/mpd-sima/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with lib.maintainers; [ apfelkuchen6 ];
mainProgram = "mpd-sima";
};
}

View File

@@ -0,0 +1,200 @@
From 11711398a1ec16f4eaeac8523b77165a560b69cc Mon Sep 17 00:00:00 2001
From: OPNA2608 <christoph.neidahl@gmail.com>
Date: Sun, 13 Jun 2021 13:55:53 +0200
Subject: [PATCH] Look for system-installed Rt libs
---
CMakeLists.txt | 159 +++++++++++++++++++++++++++++++------------------
1 file changed, 102 insertions(+), 57 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3e53c3..027c1b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,15 +50,6 @@ message("!! Optional feature summary:")
message("!! RtMidi: ${USE_RTMIDI}")
message("!! RtAudio: ${USE_RTAUDIO}")
-if(USE_RTAUDIO)
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- pkg_check_modules(JACK "jack")
- message("!! -- Jack driver: ${JACK_FOUND}")
- pkg_check_modules(PULSEAUDIO "libpulse-simple")
- message("!! -- Pulseaudio driver: ${PULSEAUDIO_FOUND}")
- endif()
-endif()
-
if(ENABLE_PLOTS)
message("!! Qwt: ${QWT_LIBRARY}")
endif()
@@ -250,65 +241,119 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
endif()
if(USE_RTMIDI)
- add_library(RtMidi STATIC "src/midi/external/rtmidi/RtMidi.cpp")
- target_include_directories(RtMidi PUBLIC "src/midi/external/rtmidi")
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- target_compile_definitions(RtMidi PUBLIC "__LINUX_ALSA__")
- target_link_libraries(RtMidi PUBLIC "asound")
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
- target_compile_definitions(RtMidi PUBLIC "__WINDOWS_MM__")
- target_link_libraries(RtMidi PUBLIC "winmm")
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- target_compile_definitions(RtMidi PUBLIC "__MACOSX_CORE__")
- find_library(COREMIDI_LIBRARY "CoreMIDI")
- target_link_libraries(RtMidi PUBLIC "${COREMIDI_LIBRARY}")
+ if(PKG_CONFIG_FOUND)
+ pkg_check_modules(RTMIDI rtmidi)
+ if(RTMIDI_FOUND)
+ message("Using system-installed RtMidi found by pkg-config.")
+ target_link_libraries(OPL3BankEditor PUBLIC ${RTMIDI_LDFLAGS})
+ target_include_directories(OPL3BankEditor PUBLIC ${RTMIDI_INCLUDE_DIRS})
+ target_compile_options(OPL3BankEditor PUBLIC ${RTMIDI_CFLAGS})
+ endif()
endif()
+
+ if(NOT RTMIDI_FOUND)
+ find_library(RTMIDI_LIBRARY "rtmidi")
+ find_path(RTMIDI_INCLUDE_DIRS "RtMidi.h")
+ message("RtMidi library: ${RTMIDI_LIBRARY}")
+ message("RtMidi header directory: ${RTMIDI_INCLUDE_DIRS}")
+ if(NOT RTMIDI_LIBRARY-NOTFOUND AND NOT RTMIDI_INCLUDE_DIRS STREQUAL RTMIDI_INCLUDE_DIRS-NOTFOUND)
+ message("Using system-installed RtMidi.")
+ set(RTMIDI_FOUND TRUE)
+ target_link_libraries(OPL3BankEditor PUBLIC ${RTMIDI_LIBRARY})
+ target_include_directories(OPL3BankEditor PUBLIC ${RTMIDI_INCLUDE_DIRS})
+ endif()
+ endif()
+
+ if(NOT RTMIDI_FOUND)
+ message("Using bundled RtMidi.")
+ add_library(RtMidi STATIC "src/midi/external/rtmidi/RtMidi.cpp")
+ target_include_directories(RtMidi PUBLIC "src/midi/external/rtmidi")
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ target_compile_definitions(RtMidi PUBLIC "__LINUX_ALSA__")
+ target_link_libraries(RtMidi PUBLIC "asound")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ target_compile_definitions(RtMidi PUBLIC "__WINDOWS_MM__")
+ target_link_libraries(RtMidi PUBLIC "winmm")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ target_compile_definitions(RtMidi PUBLIC "__MACOSX_CORE__")
+ find_library(COREMIDI_LIBRARY "CoreMIDI")
+ target_link_libraries(RtMidi PUBLIC "${COREMIDI_LIBRARY}")
+ endif()
+ target_link_libraries(OPL3BankEditor PRIVATE RtMidi)
+ endif()
+
target_sources(OPL3BankEditor PRIVATE "src/midi/midi_rtmidi.cpp")
target_compile_definitions(OPL3BankEditor PRIVATE "ENABLE_MIDI")
- target_link_libraries(OPL3BankEditor PRIVATE RtMidi)
endif()
if(USE_RTAUDIO)
- add_library(RtAudio STATIC "src/audio/external/rtaudio/RtAudio.cpp")
- target_include_directories(RtAudio PUBLIC "src/audio/external/rtaudio")
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- target_compile_definitions(RtAudio PUBLIC "__LINUX_ALSA__")
- target_link_libraries(RtAudio PUBLIC "asound")
- if(JACK_FOUND)
- target_compile_definitions(RtAudio PUBLIC "__UNIX_JACK__")
- target_include_directories(RtAudio PUBLIC ${JACK_INCLUDE_DIRS})
- link_directories(${JACK_LIBRARY_DIRS})
- target_link_libraries(RtAudio PUBLIC ${JACK_LIBRARIES})
+ if(PKG_CONFIG_FOUND)
+ pkg_check_modules(RTAUDIO rtaudio)
+ if(RTAUDIO_FOUND)
+ message("Using system-installed RtAudio found by pkg-config.")
+ target_link_libraries(OPL3BankEditor PUBLIC ${RTAUDIO_LDFLAGS})
+ target_include_directories(OPL3BankEditor PUBLIC ${RTAUDIO_INCLUDE_DIRS})
+ target_compile_options(OPL3BankEditor PUBLIC ${RTAUDIO_CFLAGS})
+ endif()
+ endif()
+
+ if(NOT RTAUDIO_FOUND)
+ find_library(RTAUDIO_LIBRARY "rtaudio")
+ find_path(RTAUDIO_INCLUDE_DIRS "RtAudio.h")
+ message("RtAudio library: ${RTAUDIO_LIBRARY}")
+ message("RtAudio header directory: ${RTAUDIO_INCLUDE_DIRS}")
+ if(NOT RTAUDIO_LIBRARY-NOTFOUND AND NOT RTAUDIO_INCLUDE_DIRS STREQUAL RTAUDIO_INCLUDE_DIRS-NOTFOUND)
+ message("Using system-installed RtAudio.")
+ set(RTAUDIO_FOUND TRUE)
+ target_link_libraries(OPL3BankEditor PUBLIC ${RTAUDIO_LIBRARY})
+ target_include_directories(OPL3BankEditor PUBLIC ${RTAUDIO_INCLUDE_DIRS})
endif()
- if(PULSEAUDIO_FOUND)
- target_compile_definitions(RtAudio PUBLIC "__LINUX_PULSE__")
- target_include_directories(RtAudio PUBLIC ${PULSEAUDIO_INCLUDE_DIRS})
- link_directories(${PULSEAUDIO_LIBRARY_DIRS})
- target_link_libraries(RtAudio PUBLIC ${PULSEAUDIO_LIBRARIES})
+ endif()
+
+ if(NOT RTAUDIO_FOUND)
+ message("Using bundled RtAudio.")
+ add_library(RtAudio STATIC "src/audio/external/rtaudio/RtAudio.cpp")
+ target_include_directories(RtAudio PUBLIC "src/audio/external/rtaudio")
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ target_compile_definitions(RtAudio PUBLIC "__LINUX_ALSA__")
+ target_link_libraries(RtAudio PUBLIC "asound")
+ if(JACK_FOUND)
+ target_compile_definitions(RtAudio PUBLIC "__UNIX_JACK__")
+ target_include_directories(RtAudio PUBLIC ${JACK_INCLUDE_DIRS})
+ link_directories(${JACK_LIBRARY_DIRS})
+ target_link_libraries(RtAudio PUBLIC ${JACK_LIBRARIES})
+ endif()
+ if(PULSEAUDIO_FOUND)
+ target_compile_definitions(RtAudio PUBLIC "__LINUX_PULSE__")
+ target_include_directories(RtAudio PUBLIC ${PULSEAUDIO_INCLUDE_DIRS})
+ link_directories(${PULSEAUDIO_LIBRARY_DIRS})
+ target_link_libraries(RtAudio PUBLIC ${PULSEAUDIO_LIBRARIES})
+ endif()
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_DS__")
+ target_link_libraries(RtAudio PUBLIC "dsound" "ole32")
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_WASAPI__")
+ target_link_libraries(RtAudio PUBLIC "ksguid")
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_ASIO__")
+ target_include_directories(RtAudio PRIVATE
+ "src/audio/external/rtaudio/include")
+ target_sources(RtAudio PRIVATE
+ "src/audio/external/rtaudio/include/asio.cpp"
+ "src/audio/external/rtaudio/include/asiodrivers.cpp"
+ "src/audio/external/rtaudio/include/asiolist.cpp"
+ "src/audio/external/rtaudio/include/iasiothiscallresolver.cpp")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ target_compile_definitions(RtAudio PUBLIC "__MACOSX_CORE__")
+ find_library(COREAUDIO_LIBRARY "CoreAudio")
+ target_link_libraries(RtAudio PUBLIC "${COREAUDIO_LIBRARY}")
+ find_library(COREFOUNDATION_LIBRARY "CoreFoundation")
+ target_link_libraries(RtAudio PUBLIC "${COREFOUNDATION_LIBRARY}")
endif()
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_DS__")
- target_link_libraries(RtAudio PUBLIC "dsound" "ole32")
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_WASAPI__")
- target_link_libraries(RtAudio PUBLIC "ksguid")
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_ASIO__")
- target_include_directories(RtAudio PRIVATE
- "src/audio/external/rtaudio/include")
- target_sources(RtAudio PRIVATE
- "src/audio/external/rtaudio/include/asio.cpp"
- "src/audio/external/rtaudio/include/asiodrivers.cpp"
- "src/audio/external/rtaudio/include/asiolist.cpp"
- "src/audio/external/rtaudio/include/iasiothiscallresolver.cpp")
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- target_compile_definitions(RtAudio PUBLIC "__MACOSX_CORE__")
- find_library(COREAUDIO_LIBRARY "CoreAudio")
- target_link_libraries(RtAudio PUBLIC "${COREAUDIO_LIBRARY}")
- find_library(COREFOUNDATION_LIBRARY "CoreFoundation")
- target_link_libraries(RtAudio PUBLIC "${COREFOUNDATION_LIBRARY}")
+ target_link_libraries(OPL3BankEditor PRIVATE RtAudio)
endif()
+
target_sources(OPL3BankEditor PRIVATE "src/audio/ao_rtaudio.cpp")
target_compile_definitions(OPL3BankEditor PRIVATE "ENABLE_AUDIO_TESTING")
- target_link_libraries(OPL3BankEditor PRIVATE RtAudio)
endif()
add_executable(measurer_tool
--
2.29.3

View File

@@ -0,0 +1,200 @@
From 69c993dacc7dc0cb9d105c3dfa764cd7be5c343e Mon Sep 17 00:00:00 2001
From: OPNA2608 <christoph.neidahl@gmail.com>
Date: Sun, 13 Jun 2021 14:21:17 +0200
Subject: [PATCH] Look for system-installed Rt libs
---
CMakeLists.txt | 159 +++++++++++++++++++++++++++++++------------------
1 file changed, 102 insertions(+), 57 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f428dc4..18ba8c3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,15 +41,6 @@ message("!! Optional feature summary:")
message("!! RtMidi: ${USE_RTMIDI}")
message("!! RtAudio: ${USE_RTAUDIO}")
-if(USE_RTAUDIO)
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- pkg_check_modules(JACK "jack")
- message("!! -- Jack driver: ${JACK_FOUND}")
- pkg_check_modules(PULSEAUDIO "libpulse-simple")
- message("!! -- Pulseaudio driver: ${PULSEAUDIO_FOUND}")
- endif()
-endif()
-
if(ENABLE_PLOTS)
message("!! Qwt: ${QWT_LIBRARY}")
endif()
@@ -198,65 +189,119 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
endif()
if(USE_RTMIDI)
- add_library(RtMidi STATIC "src/midi/external/rtmidi/RtMidi.cpp")
- target_include_directories(RtMidi PUBLIC "src/midi/external/rtmidi")
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- target_compile_definitions(RtMidi PUBLIC "__LINUX_ALSA__")
- target_link_libraries(RtMidi PUBLIC "asound")
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
- target_compile_definitions(RtMidi PUBLIC "__WINDOWS_MM__")
- target_link_libraries(RtMidi PUBLIC "winmm")
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- target_compile_definitions(RtMidi PUBLIC "__MACOSX_CORE__")
- find_library(COREMIDI_LIBRARY "CoreMIDI")
- target_link_libraries(RtMidi PUBLIC "${COREMIDI_LIBRARY}")
+ if(PKG_CONFIG_FOUND)
+ pkg_check_modules(RTMIDI rtmidi)
+ if(RTMIDI_FOUND)
+ message("Using system-installed RtMidi found by pkg-config.")
+ target_link_libraries(OPN2BankEditor PUBLIC ${RTMIDI_LDFLAGS})
+ target_include_directories(OPN2BankEditor PUBLIC ${RTMIDI_INCLUDE_DIRS})
+ target_compile_options(OPN2BankEditor PUBLIC ${RTMIDI_CFLAGS})
+ endif()
+ endif()
+
+ if(NOT RTMIDI_FOUND)
+ find_library(RTMIDI_LIBRARY "rtmidi")
+ find_path(RTMIDI_INCLUDE_DIRS "RtMidi.h")
+ message("RtMidi library: ${RTMIDI_LIBRARY}")
+ message("RtMidi header directory: ${RTMIDI_INCLUDE_DIRS}")
+ if(NOT RTMIDI_LIBRARY-NOTFOUND AND NOT RTMIDI_INCLUDE_DIRS STREQUAL RTMIDI_INCLUDE_DIRS-NOTFOUND)
+ message("Using system-installed RtMidi.")
+ set(RTMIDI_FOUND TRUE)
+ target_link_libraries(OPN2BankEditor PUBLIC ${RTMIDI_LIBRARY})
+ target_include_directories(OPN2BankEditor PUBLIC ${RTMIDI_INCLUDE_DIRS})
+ endif()
+ endif()
+
+ if(NOT RTMIDI_FOUND)
+ message("Using bundled RtMidi.")
+ add_library(RtMidi STATIC "src/midi/external/rtmidi/RtMidi.cpp")
+ target_include_directories(RtMidi PUBLIC "src/midi/external/rtmidi")
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ target_compile_definitions(RtMidi PUBLIC "__LINUX_ALSA__")
+ target_link_libraries(RtMidi PUBLIC "asound")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ target_compile_definitions(RtMidi PUBLIC "__WINDOWS_MM__")
+ target_link_libraries(RtMidi PUBLIC "winmm")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ target_compile_definitions(RtMidi PUBLIC "__MACOSX_CORE__")
+ find_library(COREMIDI_LIBRARY "CoreMIDI")
+ target_link_libraries(RtMidi PUBLIC "${COREMIDI_LIBRARY}")
+ endif()
+ target_link_libraries(OPN2BankEditor PRIVATE RtMidi)
endif()
+
target_sources(OPN2BankEditor PRIVATE "src/midi/midi_rtmidi.cpp")
target_compile_definitions(OPN2BankEditor PRIVATE "ENABLE_MIDI")
- target_link_libraries(OPN2BankEditor PRIVATE RtMidi)
endif()
if(USE_RTAUDIO)
- add_library(RtAudio STATIC "src/audio/external/rtaudio/RtAudio.cpp")
- target_include_directories(RtAudio PUBLIC "src/audio/external/rtaudio")
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- target_compile_definitions(RtAudio PUBLIC "__LINUX_ALSA__")
- target_link_libraries(RtAudio PUBLIC "asound")
- if(JACK_FOUND)
- target_compile_definitions(RtAudio PUBLIC "__UNIX_JACK__")
- target_include_directories(RtAudio PUBLIC ${JACK_INCLUDE_DIRS})
- link_directories(${JACK_LIBRARY_DIRS})
- target_link_libraries(RtAudio PUBLIC ${JACK_LIBRARIES})
+ if(PKG_CONFIG_FOUND)
+ pkg_check_modules(RTAUDIO rtaudio)
+ if(RTAUDIO_FOUND)
+ message("Using system-installed RtAudio found by pkg-config.")
+ target_link_libraries(OPN2BankEditor PUBLIC ${RTAUDIO_LDFLAGS})
+ target_include_directories(OPN2BankEditor PUBLIC ${RTAUDIO_INCLUDE_DIRS})
+ target_compile_options(OPN2BankEditor PUBLIC ${RTAUDIO_CFLAGS})
endif()
- if(PULSEAUDIO_FOUND)
- target_compile_definitions(RtAudio PUBLIC "__LINUX_PULSE__")
- target_include_directories(RtAudio PUBLIC ${PULSEAUDIO_INCLUDE_DIRS})
- link_directories(${PULSEAUDIO_LIBRARY_DIRS})
- target_link_libraries(RtAudio PUBLIC ${PULSEAUDIO_LIBRARIES})
+ endif()
+
+ if(NOT RTAUDIO_FOUND)
+ find_library(RTAUDIO_LIBRARY "rtaudio")
+ find_path(RTAUDIO_INCLUDE_DIRS "RtAudio.h")
+ message("RtAudio library: ${RTAUDIO_LIBRARY}")
+ message("RtAudio header directory: ${RTAUDIO_INCLUDE_DIRS}")
+ if(NOT RTAUDIO_LIBRARY-NOTFOUND AND NOT RTAUDIO_INCLUDE_DIRS STREQUAL RTAUDIO_INCLUDE_DIRS-NOTFOUND)
+ message("Using system-installed RtAudio.")
+ set(RTAUDIO_FOUND TRUE)
+ target_link_libraries(OPN2BankEditor PUBLIC ${RTAUDIO_LIBRARY})
+ target_include_directories(OPN2BankEditor PUBLIC ${RTAUDIO_INCLUDE_DIRS})
endif()
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_DS__")
- target_link_libraries(RtAudio PUBLIC "dsound" "ole32")
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_WASAPI__")
- target_link_libraries(RtAudio PUBLIC "ksguid")
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_ASIO__")
- target_include_directories(RtAudio PRIVATE
- "src/audio/external/rtaudio/include")
- target_sources(RtAudio PRIVATE
- "src/audio/external/rtaudio/include/asio.cpp"
- "src/audio/external/rtaudio/include/asiodrivers.cpp"
- "src/audio/external/rtaudio/include/asiolist.cpp"
- "src/audio/external/rtaudio/include/iasiothiscallresolver.cpp")
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- target_compile_definitions(RtAudio PUBLIC "__MACOSX_CORE__")
- find_library(COREAUDIO_LIBRARY "CoreAudio")
- target_link_libraries(RtAudio PUBLIC "${COREAUDIO_LIBRARY}")
- find_library(COREFOUNDATION_LIBRARY "CoreFoundation")
- target_link_libraries(RtAudio PUBLIC "${COREFOUNDATION_LIBRARY}")
endif()
+
+ if(NOT RTAUDIO_FOUND)
+ message("Using bundled RtAudio.")
+ add_library(RtAudio STATIC "src/audio/external/rtaudio/RtAudio.cpp")
+ target_include_directories(RtAudio PUBLIC "src/audio/external/rtaudio")
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ target_compile_definitions(RtAudio PUBLIC "__LINUX_ALSA__")
+ target_link_libraries(RtAudio PUBLIC "asound")
+ if(JACK_FOUND)
+ target_compile_definitions(RtAudio PUBLIC "__UNIX_JACK__")
+ target_include_directories(RtAudio PUBLIC ${JACK_INCLUDE_DIRS})
+ link_directories(${JACK_LIBRARY_DIRS})
+ target_link_libraries(RtAudio PUBLIC ${JACK_LIBRARIES})
+ endif()
+ if(PULSEAUDIO_FOUND)
+ target_compile_definitions(RtAudio PUBLIC "__LINUX_PULSE__")
+ target_include_directories(RtAudio PUBLIC ${PULSEAUDIO_INCLUDE_DIRS})
+ link_directories(${PULSEAUDIO_LIBRARY_DIRS})
+ target_link_libraries(RtAudio PUBLIC ${PULSEAUDIO_LIBRARIES})
+ endif()
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_DS__")
+ target_link_libraries(RtAudio PUBLIC "dsound" "ole32")
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_WASAPI__")
+ target_link_libraries(RtAudio PUBLIC "ksguid")
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_ASIO__")
+ target_include_directories(RtAudio PRIVATE
+ "src/audio/external/rtaudio/include")
+ target_sources(RtAudio PRIVATE
+ "src/audio/external/rtaudio/include/asio.cpp"
+ "src/audio/external/rtaudio/include/asiodrivers.cpp"
+ "src/audio/external/rtaudio/include/asiolist.cpp"
+ "src/audio/external/rtaudio/include/iasiothiscallresolver.cpp")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ target_compile_definitions(RtAudio PUBLIC "__MACOSX_CORE__")
+ find_library(COREAUDIO_LIBRARY "CoreAudio")
+ target_link_libraries(RtAudio PUBLIC "${COREAUDIO_LIBRARY}")
+ find_library(COREFOUNDATION_LIBRARY "CoreFoundation")
+ target_link_libraries(RtAudio PUBLIC "${COREFOUNDATION_LIBRARY}")
+ endif()
+ target_link_libraries(OPN2BankEditor PRIVATE RtAudio)
+ endif()
+
target_sources(OPN2BankEditor PRIVATE "src/audio/ao_rtaudio.cpp")
target_compile_definitions(OPN2BankEditor PRIVATE "ENABLE_AUDIO_TESTING")
- target_link_libraries(OPN2BankEditor PRIVATE RtAudio)
endif()
add_executable(measurer_tool
--
2.29.3

View File

@@ -0,0 +1,75 @@
{
pname,
chip,
version,
sha256,
extraPatches ? [ ],
}:
{
mkDerivation,
stdenv,
lib,
fetchFromGitHub,
dos2unix,
cmake,
pkg-config,
qttools,
qtbase,
qwt6_1,
rtaudio,
rtmidi,
}:
let
binname = "${chip} Bank Editor";
mainProgram = "${lib.strings.toLower chip}_bank_editor";
in
mkDerivation rec {
inherit pname version;
src = fetchFromGitHub {
owner = "Wohlstand";
repo = pname;
rev = "v${version}";
inherit sha256;
};
prePatch = ''
dos2unix CMakeLists.txt
'';
patches = extraPatches;
nativeBuildInputs = [
dos2unix
cmake
pkg-config
qttools
];
buildInputs = [
qtbase
qwt6_1
rtaudio
rtmidi
];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/{bin,Applications}
mv "${binname}.app" $out/Applications/
install_name_tool -change {,${qwt6_1}/lib/}libqwt.6.dylib "$out/Applications/${binname}.app/Contents/MacOS/${binname}"
ln -s "$out/Applications/${binname}.app/Contents/MacOS/${binname}" $out/bin/${mainProgram}
'';
meta = with lib; {
inherit mainProgram;
description = "Small cross-platform editor of the ${chip} FM banks of different formats";
homepage = src.meta.homepage;
license = licenses.gpl3Plus;
platforms = platforms.all;
maintainers = with maintainers; [ OPNA2608 ];
};
}

View File

@@ -0,0 +1,9 @@
import ./common.nix {
pname = "opl3bankeditor";
chip = "OPL3";
version = "1.5.1";
sha256 = "08krbxlxgmc7i2r2k6d6wgi0m6k8hh3j60xf21kz4kp023w613sa";
extraPatches = [
./0001-opl3bankeditor-Look-for-system-installed-Rt-libs.patch
];
}

View File

@@ -0,0 +1,9 @@
import ./common.nix {
pname = "opn2bankeditor";
chip = "OPN2";
version = "1.3";
sha256 = "0niam6a6y57msbl0xj23g6l7gisv4a670q0k1zqfm34804532a32";
extraPatches = [
./0001-opn2bankeditor-Look-for-system-installed-Rt-libs.patch
];
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildPythonApplication,
fetchPypi,
aigpy,
}:
buildPythonApplication rec {
pname = "tidal-dl";
version = "2022.10.31.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-b2AAsiI3n2/v6HC37fMI/d8UcxZxsWM+fnWvdajHrOg=";
};
propagatedBuildInputs = [ aigpy ];
meta = {
homepage = "https://github.com/yaronzz/Tidal-Media-Downloader";
description = "Application that lets you download videos and tracks from Tidal";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.misterio77 ];
platforms = lib.platforms.all;
mainProgram = "tidal-dl";
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
fetchFromGitHub,
pythonPackages,
opencv4,
}:
let
opencv4_ = pythonPackages.toPythonModule (
opencv4.override {
inherit pythonPackages;
enablePython = true;
enableFfmpeg = true;
}
);
in
pythonPackages.buildPythonApplication rec {
pname = "video2midi";
version = "0.4.9";
format = "other";
src = fetchFromGitHub {
owner = "svsdval";
repo = pname;
tag = version;
sha256 = "sha256-mjqlNUCEiP5dQS0a8HAejOJyEvY6jGFJFpVcnzU2Vds=";
};
propagatedBuildInputs = with pythonPackages; [
opencv4_
midiutil
pygame
pyopengl
];
installPhase = ''
install -Dm755 v2m.py $out/bin/v2m.py
'';
meta = with lib; {
description = "Youtube synthesia video to midi conversion tool";
homepage = src.meta.homepage;
license = licenses.gpl3Only;
maintainers = [ ];
platforms = platforms.linux;
mainProgram = "v2m.py";
};
}

View File

@@ -0,0 +1,173 @@
{
lib,
multiStdenv,
fetchFromGitHub,
replaceVars,
pkgsi686Linux,
dbus,
meson,
ninja,
pkg-config,
wine,
libxcb,
nix-update-script,
}:
let
# Derived from subprojects/asio.wrap
asio = fetchFromGitHub {
owner = "chriskohlhoff";
repo = "asio";
rev = "refs/tags/asio-1-28-2";
hash = "sha256-8Sw0LuAqZFw+dxlsTstlwz5oaz3+ZnKBuvSdLW6/DKQ=";
};
# Derived from subprojects/bitsery.wrap
bitsery = fetchFromGitHub {
owner = "fraillt";
repo = "bitsery";
rev = "refs/tags/v5.2.3";
hash = "sha256-rmfcIYCrANycFuLtibQ5wOPwpMVhpTMpdGsUfpR3YsM=";
};
# Derived from subprojects/clap.wrap
clap = fetchFromGitHub {
owner = "free-audio";
repo = "clap";
rev = "refs/tags/1.1.9";
hash = "sha256-z2P0U2NkDK1/5oDV35jn/pTXCcspuM1y2RgZyYVVO3w=";
};
# Derived from subprojects/function2.wrap
function2 = fetchFromGitHub {
owner = "Naios";
repo = "function2";
rev = "refs/tags/4.2.3";
hash = "sha256-+fzntJn1fRifOgJhh5yiv+sWR9pyaeeEi2c1+lqX3X8=";
};
# Derived from subprojects/ghc_filesystem.wrap
ghc_filesystem = fetchFromGitHub {
owner = "gulrak";
repo = "filesystem";
rev = "refs/tags/v1.5.14";
hash = "sha256-XZ0IxyNIAs2tegktOGQevkLPbWHam/AOFT+M6wAWPFg=";
};
# Derived from subprojects/tomlplusplus.wrap
tomlplusplus = fetchFromGitHub {
owner = "marzer";
repo = "tomlplusplus";
rev = "refs/tags/v3.4.0";
hash = "sha256-h5tbO0Rv2tZezY58yUbyRVpsfRjY3i+5TPkkxr6La8M=";
};
# Derived from vst3.wrap
vst3 = fetchFromGitHub {
owner = "robbert-vdh";
repo = "vst3sdk";
rev = "refs/tags/v3.7.7_build_19-patched";
fetchSubmodules = true;
hash = "sha256-LsPHPoAL21XOKmF1Wl/tvLJGzjaCLjaDAcUtDvXdXSU=";
};
in
multiStdenv.mkDerivation (finalAttrs: {
pname = "yabridge";
version = "5.1.1";
# NOTE: Also update yabridgectl's cargoHash when this is updated
src = fetchFromGitHub {
owner = "robbert-vdh";
repo = "yabridge";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-4eA3vQFklIWkhtbd3Nw39bnJT6gPcni79ZyQVqU4+GQ=";
};
# Unpack subproject sources
postUnpack = ''
(
cd "$sourceRoot/subprojects"
cp -R --no-preserve=mode,ownership ${asio} asio
cp -R --no-preserve=mode,ownership ${bitsery} bitsery
cp -R --no-preserve=mode,ownership ${clap} clap
cp -R --no-preserve=mode,ownership ${function2} function2
cp -R --no-preserve=mode,ownership ${ghc_filesystem} ghc_filesystem
cp -R --no-preserve=mode,ownership ${tomlplusplus} tomlplusplus
cp -R --no-preserve=mode,ownership ${vst3} vst3
)
'';
patches = [
./libyabridge-drop-32-bit-support.patch
# Hard code bitbridge & runtime dependencies
(replaceVars ./hardcode-dependencies.patch {
libdbus = dbus.lib;
libxcb32 = pkgsi686Linux.xorg.libxcb;
inherit wine;
})
# Patch the chainloader to search for libyabridge through NIX_PROFILES
./libyabridge-from-nix-profiles.patch
];
postPatch = ''
patchShebangs .
(
cd subprojects
cp packagefiles/asio/* asio
cp packagefiles/bitsery/* bitsery
cp packagefiles/clap/* clap
cp packagefiles/function2/* function2
cp packagefiles/ghc_filesystem/* ghc_filesystem
)
'';
nativeBuildInputs = [
meson
ninja
pkg-config
wine
];
buildInputs = [
libxcb
dbus
];
mesonFlags = [
"--cross-file"
"cross-wine.conf"
"-Dbitbridge=true"
# Requires CMake and is unnecessary
"-Dtomlplusplus:generate_cmake_config=false"
];
installPhase = ''
runHook preInstall
mkdir -p "$out/bin" "$out/lib"
cp yabridge-host{,-32}.exe{,.so} "$out/bin"
cp libyabridge{,-chainloader}-{vst2,vst3,clap}.so "$out/lib"
runHook postInstall
'';
# Hard code wine path in wrapper scripts generated by winegcc
postFixup = ''
for exe in "$out"/bin/*.exe; do
substituteInPlace "$exe" \
--replace-fail 'WINELOADER="wine"' 'WINELOADER="${wine}/bin/wine"'
done
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Modern and transparent way to use Windows VST2 and VST3 plugins on Linux";
homepage = "https://github.com/robbert-vdh/yabridge";
changelog = "https://github.com/robbert-vdh/yabridge/blob/${finalAttrs.version}/CHANGELOG.md";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ kira-bruneau ];
platforms = [ "x86_64-linux" ];
};
})

View File

@@ -0,0 +1,41 @@
diff --git a/meson.build b/meson.build
index 9e69128d..8c53ac88 100644
--- a/meson.build
+++ b/meson.build
@@ -226,7 +226,7 @@ if is_64bit_system
xcb_64bit_dep = dependency('xcb')
endif
if with_bitbridge
- xcb_32bit_dep = winegcc.find_library('xcb')
+ xcb_32bit_dep = winegcc.find_library('xcb', dirs: ['@libxcb32@/lib'])
endif
# These are all headers-only libraries, and thus won't require separate 32-bit
diff --git a/src/common/notifications.cpp b/src/common/notifications.cpp
index 654b6c83..78ba2fe7 100644
--- a/src/common/notifications.cpp
+++ b/src/common/notifications.cpp
@@ -29,8 +29,8 @@
#include "process.h"
#include "utils.h"
-constexpr char libdbus_library_name[] = "libdbus-1.so.3";
-constexpr char libdbus_library_fallback_name[] = "libdbus-1.so";
+constexpr char libdbus_library_name[] = "@libdbus@/lib/libdbus-1.so.3";
+constexpr char libdbus_library_fallback_name[] = "@libdbus@/lib/libdbus-1.so";
std::atomic<void*> libdbus_handle = nullptr;
std::mutex libdbus_mutex;
diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp
index 441345c6..f3e51cff 100644
--- a/src/plugin/utils.cpp
+++ b/src/plugin/utils.cpp
@@ -103,7 +103,7 @@ std::string PluginInfo::wine_version() const {
// The '*.exe' scripts generated by winegcc allow you to override the binary
// used to run Wine, so will will handle this in the same way for our Wine
// version detection. We'll be using `execvpe`
- std::string wine_path = "wine";
+ std::string wine_path = "@wine@/bin/wine";
// NOLINTNEXTLINE(concurrency-mt-unsafe)
if (const char* wineloader_path = getenv("WINELOADER");
wineloader_path && access(wineloader_path, X_OK) == 0) {

View File

@@ -0,0 +1,97 @@
From 0002273e4df7c9448b52ce54ef38a93cf753fbfd Mon Sep 17 00:00:00 2001
From: Robbert van der Helm <mail@robbertvanderhelm.nl>
Date: Sun, 1 Jun 2025 22:22:20 +0200
Subject: [PATCH] Drop the 32-bit libyabridge support for EnergyXT
I don't think anyone is using this, and it's triggering a bug in recent
Meson versions so just removing it for now should be fine.
---
CHANGELOG.md | 9 +++++++++
README.md | 20 --------------------
meson.build | 12 +-----------
3 files changed, 10 insertions(+), 31 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 687e73b3..262ee298 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,15 @@ Versioning](https://semver.org/spec/v2.0.0.html).
consuming too much memory. This only affected the prebuilt binaries from the
releases page.
+### Removed
+
+- Out of the box support for building a 32-bit version of yabridge for use in
+ 64-bit machines has been dropped as part of solving a compatibility issue with
+ newer Meson versions
+ ([#431](https://github.com/robbert-vdh/yabridge/issues/431)). This was only
+ relevant for using 64-bit Windows plugins in the old 32-bit Linux version of
+ **EnergyXT**, and should not affect most users.
+
### yabridgectl
- Fixed a regression that caused `yabridgectl set --path-auto` to no longer
diff --git a/README.md b/README.md
index 55155705..6019b67a 100644
--- a/README.md
+++ b/README.md
@@ -886,26 +886,6 @@ Yabridge will detect whether the plugin you're trying to load is 32-bit or
64-bit, and will run either the regular version or the `*-32.exe` variant
accordingly.
-### 32-bit libraries
-
-It also possible to build 32-bit versions of yabridge's libraries, which would
-let you use both 32-bit and 64-bit Windows VST2, VST3, and CLAP plugins from a
-32-bit Linux plugin host. This is mostly untested since 32-bit only Linux
-applications don't really exist anymore, but it should work! The build system
-will still assume you're compiling from a 64-bit system, so if you're compiling
-on an actual 32-bit system you would need to comment out the 64-bit
-`yabridge-host` and `yabridge-group` binaries in `meson.build`:
-
-```shell
-meson setup build --buildtype=release --cross-file=cross-wine.conf --unity=on --unity-size=1000 -Dbitbridge=true -Dbuild.cpp_args='-m32' -Dbuild.cpp_link_args='-m32'
-ninja -C build
-```
-
-Like the above commands, you might need to tweak the unity size based on the
-amount of system memory available. See the CI build definitions for some
-examples on how to add static linking in the mix if you're going to run this
-version of yabridge on some other machine.
-
## Debugging
Wine's error messages and warning are usually very helpful whenever a plugin
diff --git a/meson.build b/meson.build
index 9e69128d..98bf607e 100644
--- a/meson.build
+++ b/meson.build
@@ -20,19 +17,12 @@ project(
# need to pass `-Dbitbridge=true`. We just make sure that we won't build
# any 64-bit binaries in that situation.
is_64bit_system = build_machine.cpu_family() not in ['x86', 'arm']
-with_32bit_libraries = (not is_64bit_system) or get_option('build.cpp_args').contains('-m32')
with_bitbridge = get_option('bitbridge')
with_clap = get_option('clap')
with_system_asio = get_option('system-asio')
with_winedbg = get_option('winedbg')
with_vst3 = get_option('vst3')
-# Cookies can't be stored correctly when the native host is 32-bit and the
-# bridged plugin is 64-bit
-if with_clap and with_32bit_libraries and is_64bit_system
- error('CLAP support will not work correctly when using 32-bit yabridge libraries together with 64-bit host binaries.')
-endif
-
#
# Compiler flags
#
@@ -225,7 +215,7 @@ winegcc = meson.get_compiler('cpp', native : false)
if is_64bit_system
xcb_64bit_dep = dependency('xcb')
endif
-if with_32bit_libraries or with_bitbridge
+if with_bitbridge
xcb_32bit_dep = winegcc.find_library('xcb')
endif

View File

@@ -0,0 +1,71 @@
diff --git a/src/chainloader/utils.cpp b/src/chainloader/utils.cpp
index fa90b8f7..bd44d0ea 100644
--- a/src/chainloader/utils.cpp
+++ b/src/chainloader/utils.cpp
@@ -29,8 +29,10 @@
namespace fs = ghc::filesystem;
void* find_plugin_library(const std::string& name) {
+ Logger logger = Logger::create_exception_logger();
+
// Just using a goto for this would probably be cleaner, but yeah...
- const auto impl = [&name]() -> void* {
+ const auto impl = [&name, &logger]() -> void* {
// If `name` exists right next to the Wine plugin host binary, then
// we'll try loading that. Otherwise we'll fall back to regular
// `dlopen()` for distro packaged versions of yabridge
@@ -52,27 +54,28 @@ void* find_plugin_library(const std::string& name) {
}
}
- if (void* handle = dlopen(name.c_str(), RTLD_LAZY | RTLD_LOCAL)) {
- return handle;
+ auto nix_profiles = getenv("NIX_PROFILES");
+ if (!nix_profiles || nix_profiles[0] == '\0') {
+ logger.log("");
+ logger.log("ERROR: 'NIX_PROFILES' environment variable is not set");
+ logger.log("");
+ return nullptr;
}
- // One last Hail Mary, in case ldconfig was not set up correctly. This
- // might be relevant for some of the `/usr/local/*` locations (although
- // you really, really shouldn't install yabridge there, please, thank
- // you). Yabridgectl searches through these same directories.
- for (const auto& lib_dir : {
- "/usr/lib",
- "/usr/lib/x86_64-linux-gnu",
- "/usr/lib64",
- "/usr/local/lib",
- "/usr/local/lib/x86_64-linux-gnu",
- "/usr/local/lib64",
- }) {
- const fs::path candidate = fs::path(lib_dir) / name;
- if (void* handle =
- dlopen(candidate.c_str(), RTLD_LAZY | RTLD_LOCAL)) {
+ // NIX_PROFILES is iterated in reverse from the most specific (the
+ // user profile) to the least specific (the system profile).
+ const std::string_view nix_profiles_view = nix_profiles;
+ auto segment_end = nix_profiles_view.size();
+ while (segment_end != std::string::npos) {
+ const auto next_segment_end = nix_profiles_view.rfind(' ', segment_end - 1);
+ const auto segment_begin = next_segment_end + 1;
+ const auto profile = nix_profiles_view.substr(segment_begin, segment_end - segment_begin);
+ const auto candidate = fs::path(profile) / "lib" / name;
+ if (auto handle = dlopen(candidate.c_str(), RTLD_LAZY | RTLD_LOCAL)) {
return handle;
}
+
+ segment_end = next_segment_end;
}
return nullptr;
@@ -82,8 +85,6 @@ void* find_plugin_library(const std::string& name) {
if (!handle) {
const fs::path this_plugin_path = get_this_file_location();
- Logger logger = Logger::create_exception_logger();
-
logger.log("");
logger.log("Could not find '" + name + "'");
logger.log("");

View File

@@ -0,0 +1,72 @@
diff --git a/tools/yabridgectl/src/config.rs b/tools/yabridgectl/src/config.rs
index d948beff..9b3f9ffb 100644
--- a/tools/yabridgectl/src/config.rs
+++ b/tools/yabridgectl/src/config.rs
@@ -22,6 +22,7 @@ use serde_derive::{Deserialize, Serialize};
use std::collections::{BTreeMap, BTreeSet, HashSet};
use std::env;
use std::fs;
+use std::iter;
use std::path::{Path, PathBuf};
use which::which;
use xdg::BaseDirectories;
@@ -225,34 +226,27 @@ impl Config {
}
}
None => {
- // Search in the system library locations and in `~/.local/share/yabridge` if no
- // path was set explicitely. We'll also search through `/usr/local/lib` just in case
- // but since we advocate against installing yabridge there we won't list this path
- // in the error message when `libyabridge-chainloader-vst2.so` can't be found.
- let system_path = Path::new("/usr/lib");
+ // Search through NIX_PROFILES & data home directory if no path was set explicitly.
+ // NIX_PROFILES is iterated in reverse from the most specific (the user profile) to
+ // the least specific (the system profile).
+ let nix_profiles = env::var("NIX_PROFILES");
let user_path = xdg_dirs.get_data_home();
- let lib_directories = [
- system_path,
- // Used on Debian based distros
- Path::new("/usr/lib/x86_64-linux-gnu"),
- // Used on Fedora
- Path::new("/usr/lib64"),
- Path::new("/usr/local/lib"),
- Path::new("/usr/local/lib/x86_64-linux-gnu"),
- Path::new("/usr/local/lib64"),
- &user_path,
- ];
+ let lib_directories = nix_profiles.iter()
+ .flat_map(|profiles| profiles.split(' ')
+ .rev()
+ .map(|profile| Path::new(profile).join("lib")))
+ .chain(iter::once(user_path.clone()));
+
let mut candidates = lib_directories
- .iter()
.map(|directory| directory.join(VST2_CHAINLOADER_NAME));
+
match candidates.find(|directory| directory.exists()) {
Some(candidate) => candidate,
_ => {
return Err(anyhow!(
- "Could not find '{}' in either '{}' or '{}'. You can override the \
+ "Could not find '{}' through 'NIX_PROFILES' or '{}'. You can override the \
default search path using 'yabridgectl set --path=<path>'.",
VST2_CHAINLOADER_NAME,
- system_path.display(),
user_path.display()
));
}
diff --git a/tools/yabridgectl/src/main.rs b/tools/yabridgectl/src/main.rs
index e66ef0da..bfe9c8bf 100644
--- a/tools/yabridgectl/src/main.rs
+++ b/tools/yabridgectl/src/main.rs
@@ -134,7 +134,7 @@ fn main() -> Result<()> {
.long_help(
"Path to the directory containing \
'libyabridge-chainloader-{clap,vst2,vst3}.so'. If this is not set, \
- then yabridgectl will look in both '/usr/lib' and \
+ then yabridgectl will look through 'NIX_PROFILES' and \
'~/.local/share/yabridge' by default.",
)
.value_parser(parse_directory_path)

View File

@@ -0,0 +1,48 @@
{
lib,
rustPlatform,
yabridge,
makeWrapper,
wine,
}:
rustPlatform.buildRustPackage {
pname = "yabridgectl";
version = yabridge.version;
src = yabridge.src;
sourceRoot = "${yabridge.src.name}/tools/yabridgectl";
cargoHash = "sha256-VcBQxKjjs9ESJrE4F1kxEp4ah3j9jiNPq/Kdz/qPvro=";
patches = [
# Patch yabridgectl to search for the chainloader through NIX_PROFILES
./chainloader-from-nix-profiles.patch
# Dependencies are hardcoded in yabridge, so the check is unnecessary and likely incorrect
./remove-dependency-verification.patch
];
patchFlags = [ "-p3" ];
nativeBuildInputs = [ makeWrapper ];
postFixup = ''
wrapProgram "$out/bin/yabridgectl" \
--prefix PATH : ${
lib.makeBinPath [
wine # winedump
]
}
'';
meta = with lib; {
description = "Small, optional utility to help set up and update yabridge for several directories at once";
homepage = "${yabridge.src.meta.homepage}/tree/${yabridge.version}/tools/yabridgectl";
changelog = yabridge.meta.changelog;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ kira-bruneau ];
platforms = yabridge.meta.platforms;
mainProgram = "yabridgectl";
};
}

View File

@@ -0,0 +1,19 @@
diff --git a/tools/yabridgectl/src/actions.rs b/tools/yabridgectl/src/actions.rs
index 6a8be858..5ce5e460 100644
--- a/tools/yabridgectl/src/actions.rs
+++ b/tools/yabridgectl/src/actions.rs
@@ -847,14 +847,6 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> {
// be the case if we get to this point though.
verify_path_setup()?;
- // This check is only performed once per combination of Wine and yabridge versions
- verify_wine_setup(config)?;
-
- // Yabridge uses D-Bus notifications to relay important information when something's very wrong,
- // so we'll check whether `libdbus-1.so` is available (even though it would be very odd if it
- // isn't)
- verify_external_dependencies()?;
-
Ok(())
}

View File

@@ -0,0 +1,58 @@
{
stdenv,
mkDerivation,
lib,
fetchurl,
cmake,
pkg-config,
makeWrapper,
httrack,
qtbase,
qtmultimedia,
}:
mkDerivation rec {
pname = "httraqt";
version = "1.4.9";
src = fetchurl {
url = "mirror://sourceforge/httraqt/${pname}-${version}.tar.gz";
sha256 = "0pjxqnqchpbla4xiq4rklc06484n46cpahnjy03n9rghwwcad25b";
};
buildInputs = [
httrack
qtbase
qtmultimedia
];
nativeBuildInputs = [
cmake
makeWrapper
pkg-config
];
prePatch = ''
substituteInPlace cmake/HTTRAQTFindHttrack.cmake \
--replace /usr/include/httrack/ ${httrack}/include/httrack/
substituteInPlace distribution/posix/CMakeLists.txt \
--replace /usr/share $out/share
substituteInPlace desktop/httraqt.desktop \
--replace Exec=httraqt Exec=$out/bin/httraqt
substituteInPlace sources/main/httraqt.cpp \
--replace /usr/share/httraqt/ $out/share/httraqt
'';
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "Easy-to-use offline browser / website mirroring utility - QT frontend";
mainProgram = "httraqt";
homepage = "http://www.httrack.com";
license = licenses.gpl3;
maintainers = with maintainers; [ peterhoeg ];
platforms = with platforms; unix;
};
}

View File

@@ -0,0 +1,20 @@
{ callPackage, ... }@args:
callPackage ./generic.nix (
args
// {
version = "8.0.35-32";
hash = "sha256-aNnAlhhzZ6636dzOz4FFDEE4Mb450HGU42cJrM21GdQ=";
# includes https://github.com/Percona-Lab/libkmip.git
fetchSubmodules = true;
extraPatches = [
./abi-check.patch
];
extraPostInstall = ''
rm -r "$out"/docs
'';
}
)

View File

@@ -0,0 +1,17 @@
{ callPackage, ... }@args:
callPackage ./generic.nix (
args
// {
version = "8.4.0-2";
hash = "sha256-ClW/B175z/sxF/MT9iHW1Wtr0ere63tIgUpcMp1IfTs=";
# includes https://github.com/Percona-Lab/libkmip.git
fetchSubmodules = true;
extraPatches = [
];
extraPostInstall = '''';
}
)

View File

@@ -0,0 +1,18 @@
MySQL ABI check assumes that with -nostdinc any standard #include terminates
preprocessing, but we do not provide that:
https://github.com/NixOS/nixpkgs/issues/44530
"#error" does not terminate preprocessing, so we #include a non-existent file instead.
--- a/cmake/do_abi_check.cmake
+++ b/cmake/do_abi_check.cmake
@@ -68,1 +68,1 @@ FOREACH(file ${ABI_HEADERS})
- -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${ABI_SOURCE_DIR}/include
+ -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${ABI_SOURCE_DIR}/include/nostdinc -I${ABI_SOURCE_DIR}/include
@@ -74,1 +74,1 @@ FOREACH(file ${ABI_HEADERS})
- COMMAND ${WSL_EXECUTABLE} sed -e "/^# /d"
+ COMMAND ${WSL_EXECUTABLE} sed -e "/^# /d" -e "/^#include <-nostdinc>$/d"
--- /dev/null
+++ b/include/nostdinc/stdint.h
@@ -0,0 +1,1 @@
+#include <-nostdinc>

View File

@@ -0,0 +1,7 @@
pkgs: {
percona-xtrabackup_8_0 = pkgs.callPackage ./8_0.nix {
boost = pkgs.boost177;
};
percona-xtrabackup_8_4 = pkgs.callPackage ./8_4.nix { };
percona-xtrabackup = pkgs.percona-xtrabackup_8_4;
}

View File

@@ -0,0 +1,115 @@
{
lib,
stdenv,
fetchFromGitHub,
bison,
boost,
cmake,
makeWrapper,
pkg-config,
curl,
cyrus_sasl,
libaio,
libedit,
libev,
libevent,
libgcrypt,
libgpg-error,
lz4,
ncurses,
numactl,
openssl,
procps,
protobuf,
valgrind,
xxd,
zlib,
perlPackages,
version,
hash,
fetchSubmodules ? false,
extraPatches ? [ ],
extraPostInstall ? "",
...
}:
stdenv.mkDerivation (finalAttrs: {
pname = "percona-xtrabackup";
inherit version;
src = fetchFromGitHub {
owner = "percona";
repo = "percona-xtrabackup";
rev = "percona-xtrabackup-${finalAttrs.version}";
inherit hash fetchSubmodules;
};
nativeBuildInputs = [
bison
boost
cmake
makeWrapper
pkg-config
];
buildInputs = [
(curl.override { inherit openssl; })
cyrus_sasl
libaio
libedit
libevent
libev
libgcrypt
libgpg-error
lz4
ncurses
numactl
openssl
procps
protobuf
valgrind
xxd
zlib
]
++ (with perlPackages; [
perl
DBI
DBDmysql
]);
patches = extraPatches;
cmakeFlags = [
"-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
"-DBUILD_CONFIG=xtrabackup_release"
"-DINSTALL_MYSQLTESTDIR=OFF"
"-DWITH_BOOST=system"
"-DWITH_CURL=system"
"-DWITH_EDITLINE=system"
"-DWITH_LIBEVENT=system"
"-DWITH_LZ4=system"
"-DWITH_PROTOBUF=system"
"-DWITH_SASL=system"
"-DWITH_SSL=system"
"-DWITH_ZLIB=system"
"-DWITH_VALGRIND=ON"
"-DWITH_MAN_PAGES=OFF"
];
postInstall = ''
wrapProgram "$out"/bin/xtrabackup --prefix PERL5LIB : $PERL5LIB
rm -r "$out"/lib/plugin/debug
''
+ extraPostInstall;
passthru.mysqlVersion = lib.versions.majorMinor finalAttrs.version;
meta = with lib; {
description = "Non-blocking backup tool for MySQL";
homepage = "http://www.percona.com/software/percona-xtrabackup";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = [ maintainers.izorkin ];
teams = [ teams.flyingcircus ];
};
})

View File

@@ -0,0 +1,32 @@
{
lib,
buildPythonApplication,
fetchPypi,
setuptools,
}:
buildPythonApplication rec {
pname = "pyznap";
version = "1.6.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "88bf1d6de2c11f14acbdfa01b61eb95c94f95d829ddebdaee3786b64ccb93ae3";
};
propagatedBuildInputs = [
setuptools
];
# tests aren't included in the PyPI packages
doCheck = false;
meta = {
homepage = "https://github.com/yboetz/pyznap";
description = "ZFS snapshot tool written in python";
mainProgram = "pyznap";
license = with lib.licenses; [ gpl3 ];
maintainers = with lib.maintainers; [ rbrewer ];
};
}

View File

@@ -0,0 +1,40 @@
{
pkgs,
lib,
eggDerivation,
fetchegg,
}:
let
eggs = import ./eggs.nix { inherit eggDerivation fetchegg; };
in
eggDerivation rec {
pname = "ugarit-manifest-maker";
version = "0.1";
name = "${pname}-${version}";
src = fetchegg {
inherit version;
name = pname;
sha256 = "1jv8lhn4s5a3qphqd3zfwl1py0m5cmqj1h55ys0935m5f422547q";
};
buildInputs = with eggs; [
matchable
srfi-37
fnmatch
miscmacros
ugarit
numbers
];
meta = with lib; {
homepage = "https://www.kitten-technologies.co.uk/project/ugarit-manifest-maker/";
description = "Tool for generating import manifests for Ugarit";
mainProgram = "ugarit-manifest-maker";
license = licenses.bsd3;
maintainers = [ maintainers.ebzzry ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,430 @@
{ eggDerivation, fetchegg }:
rec {
blob-utils = eggDerivation {
name = "blob-utils-1.0.3";
src = fetchegg {
name = "blob-utils";
version = "1.0.3";
sha256 = "17vdn02fnxnjx5ixgqimln93lqvzyq4y9w02fw7xnbdcjzqm0xml";
};
buildInputs = [
setup-helper
string-utils
];
};
check-errors = eggDerivation {
name = "check-errors-1.13.0";
src = fetchegg {
name = "check-errors";
version = "1.13.0";
sha256 = "12a0sn82n98jybh72zb39fdddmr5k4785xglxb16750fhy8rmjwi";
};
buildInputs = [
setup-helper
];
};
crypto-tools = eggDerivation {
name = "crypto-tools-1.3";
src = fetchegg {
name = "crypto-tools";
version = "1.3";
sha256 = "0442wly63zis19vh8xc9nhxgp9sabaccxylpzmchd5f1d48iag65";
};
buildInputs = [
];
};
fnmatch = eggDerivation {
name = "fnmatch-1.0.1";
src = fetchegg {
name = "fnmatch";
version = "1.0.1";
sha256 = "1m3jmyhkyqmjr7v628g6w5n3cqihcfnryrxn91k4597q7vjhikqr";
};
buildInputs = [
];
};
foreigners = eggDerivation {
name = "foreigners-1.4.1";
src = fetchegg {
name = "foreigners";
version = "1.4.1";
sha256 = "07nvyadhkd52q0kkvch1a5d7ivpmrhmyg295s4mxb1nw4wz46gfz";
};
buildInputs = [
matchable
];
};
lookup-table = eggDerivation {
name = "lookup-table-1.13.5";
src = fetchegg {
name = "lookup-table";
version = "1.13.5";
sha256 = "1nzly6rhynawlvzlyilk8z8cxz57cf9n5iv20glkhh28pz2izmrb";
};
buildInputs = [
setup-helper
check-errors
miscmacros
record-variants
synch
];
};
lru-cache = eggDerivation {
name = "lru-cache-0.5.3";
src = fetchegg {
name = "lru-cache";
version = "0.5.3";
sha256 = "0z6g3106c4j21v968hfzy9nnbfq2d83y0nyd20aifpq4g55c0d40";
};
buildInputs = [
record-variants
];
};
matchable = eggDerivation {
name = "matchable-3.3";
src = fetchegg {
name = "matchable";
version = "3.3";
sha256 = "07y3lpzgm4djiwi9y2adc796f9kwkmdr28fkfkw65syahdax8990";
};
buildInputs = [
];
};
message-digest = eggDerivation {
name = "message-digest-3.1.0";
src = fetchegg {
name = "message-digest";
version = "3.1.0";
sha256 = "1w6bax19dwgih78vcimiws0rja7qsd8hmbm6qqg2hf9cw3vab21s";
};
buildInputs = [
setup-helper
miscmacros
check-errors
variable-item
blob-utils
string-utils
];
};
miscmacros = eggDerivation {
name = "miscmacros-2.96";
src = fetchegg {
name = "miscmacros";
version = "2.96";
sha256 = "1ajdgjrni10i2hmhcp4rawnxajjxry3kmq1krdmah4sf0kjrgajc";
};
buildInputs = [
];
};
numbers = eggDerivation {
name = "numbers-4.4";
src = fetchegg {
name = "numbers";
version = "4.4";
sha256 = "0bg5zs6jcr9arj4a7r2xqxf2n17bx93640jaivgchbdj1gixranm";
};
buildInputs = [
];
};
parley = eggDerivation {
name = "parley-0.9.2";
src = fetchegg {
name = "parley";
version = "0.9.2";
sha256 = "1vsbx4dk1240gzq02slzmavd1jrq04qj7ssnvg15h8xh81xwhbbz";
};
buildInputs = [
stty
srfi-71
miscmacros
];
};
pathname-expand = eggDerivation {
name = "pathname-expand-0.1";
src = fetchegg {
name = "pathname-expand";
version = "0.1";
sha256 = "14llya7l04z49xpi3iylk8aglrw968vy304ymavhhqlyzmzwkx3g";
};
buildInputs = [
];
};
posix-extras = eggDerivation {
name = "posix-extras-0.1.6";
src = fetchegg {
name = "posix-extras";
version = "0.1.6";
sha256 = "0gnmhn2l0161ham7f8i0lx1ay94ap8l8l7ga4nw9qs86lk024abi";
};
buildInputs = [
];
};
record-variants = eggDerivation {
name = "record-variants-0.5.1";
src = fetchegg {
name = "record-variants";
version = "0.5.1";
sha256 = "15wgysxkm8m4hx9nhhw9akchzipdnqc7yj3qd3zn0z7sxg4sld1h";
};
buildInputs = [
];
};
regex = eggDerivation {
name = "regex-1.0";
src = fetchegg {
name = "regex";
version = "1.0";
sha256 = "1z9bh7xvab6h5cdlsz8jk02pv5py1i6ryqarbcs3wdgkkjgmmkif";
};
buildInputs = [
];
};
setup-helper = eggDerivation {
name = "setup-helper-1.5.5";
src = fetchegg {
name = "setup-helper";
version = "1.5.5";
sha256 = "1lpplp8f2wyc486dd98gs4wl1kkhh1cs6vdqkxrdk7f92ikmwbx3";
};
buildInputs = [
];
};
sql-de-lite = eggDerivation {
name = "sql-de-lite-0.6.6";
src = fetchegg {
name = "sql-de-lite";
version = "0.6.6";
sha256 = "1mh3hpsibq2gxcpjaycqa4ckznj268xpfzsa6pn0i6iac6my3qra";
};
buildInputs = [
lru-cache
foreigners
];
};
srfi-37 = eggDerivation {
name = "srfi-37-1.3.1";
src = fetchegg {
name = "srfi-37";
version = "1.3.1";
sha256 = "1a2zdkdzrv15fw9dfdy8067fsgh4kr8ppffm8mc3cmlczrrd58cb";
};
buildInputs = [
];
};
srfi-71 = eggDerivation {
name = "srfi-71-1.1";
src = fetchegg {
name = "srfi-71";
version = "1.1";
sha256 = "01mlaxw2lfczykmx69xki2s0f4ywlg794rl4kz07plvzn0s3fbqq";
};
buildInputs = [
];
};
ssql = eggDerivation {
name = "ssql-0.2.4";
src = fetchegg {
name = "ssql";
version = "0.2.4";
sha256 = "0qhnghhx1wrvav4s7l780mspwlh8s6kzq4bl0cslwp1km90fx9bk";
};
buildInputs = [
matchable
];
};
string-utils = eggDerivation {
name = "string-utils-1.2.4";
src = fetchegg {
name = "string-utils";
version = "1.2.4";
sha256 = "07alvghg0dahilrm4jg44bndl0x69sv1zbna9l20cbdvi35i0jp1";
};
buildInputs = [
setup-helper
miscmacros
lookup-table
check-errors
];
};
stty = eggDerivation {
name = "stty-0.2.6";
src = fetchegg {
name = "stty";
version = "0.2.6";
sha256 = "09jmjpdsd3yg6d0f0imcihmn49i28x09lgl60i2dllffs25k22s4";
};
buildInputs = [
setup-helper
foreigners
];
};
synch = eggDerivation {
name = "synch-2.1.2";
src = fetchegg {
name = "synch";
version = "2.1.2";
sha256 = "1m9mnbq0m5jsxmd1a3rqpwpxj0l1b7vn1fknvxycc047pmlcyl00";
};
buildInputs = [
setup-helper
check-errors
];
};
tiger-hash = eggDerivation {
name = "tiger-hash-3.1.0";
src = fetchegg {
name = "tiger-hash";
version = "3.1.0";
sha256 = "0j9dsbjp9cw0y4w4srg0qwgh53jw2v3mx4y4h040ds0fkxlzzknx";
};
buildInputs = [
message-digest
];
};
ugarit = eggDerivation {
name = "ugarit-2.0";
src = fetchegg {
name = "ugarit";
version = "2.0";
sha256 = "1l5zkr6b8l5dw9p5mimbva0ncqw1sbvp3d4cywm1hqx2m03a0f1n";
};
buildInputs = [
miscmacros
sql-de-lite
crypto-tools
srfi-37
stty
matchable
regex
tiger-hash
message-digest
posix-extras
parley
ssql
pathname-expand
];
};
ugarit-manifest-maker = eggDerivation {
name = "ugarit-manifest-maker-0.1";
src = fetchegg {
name = "ugarit-manifest-maker";
version = "0.1";
sha256 = "1jv8lhn4s5a3qphqd3zfwl1py0m5cmqj1h55ys0935m5f422547q";
};
buildInputs = [
matchable
srfi-37
fnmatch
miscmacros
ugarit
numbers
];
};
variable-item = eggDerivation {
name = "variable-item-1.3.1";
src = fetchegg {
name = "variable-item";
version = "1.3.1";
sha256 = "19b3mhb8kr892sz9yyzq79l0vv28dgilw9cf415kj6aq16yp4d5n";
};
buildInputs = [
setup-helper
check-errors
];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
eggDerivation,
fetchegg,
z3,
}:
let
eggs = import ./eggs.nix { inherit eggDerivation fetchegg; };
in
eggDerivation rec {
pname = "ugarit";
version = "2.0";
name = "${pname}-${version}";
src = fetchegg {
inherit version;
name = pname;
sha256 = "1l5zkr6b8l5dw9p5mimbva0ncqw1sbvp3d4cywm1hqx2m03a0f1n";
};
buildInputs = with eggs; [
aes
crypto-tools
matchable
message-digest
miscmacros
parley
pathname-expand
posix-extras
regex
sha2
sql-de-lite
srfi-37
ssql
stty
tiger-hash
z3
];
meta = with lib; {
homepage = "https://www.kitten-technologies.co.uk/project/ugarit/";
description = "Backup/archival system based around content-addressible storage";
license = licenses.bsd3;
maintainers = [ maintainers.ebzzry ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,491 @@
{ eggDerivation, fetchegg }:
rec {
aes = eggDerivation {
name = "aes-1.5";
src = fetchegg {
name = "aes";
version = "1.5";
sha256 = "0gjlvz5nk0fnaclljpyfk21rkf0nidjj6wcv3jbnpmfafgjny5fi";
};
buildInputs = [
];
};
blob-utils = eggDerivation {
name = "blob-utils-1.0.3";
src = fetchegg {
name = "blob-utils";
version = "1.0.3";
sha256 = "17vdn02fnxnjx5ixgqimln93lqvzyq4y9w02fw7xnbdcjzqm0xml";
};
buildInputs = [
setup-helper
string-utils
];
};
check-errors = eggDerivation {
name = "check-errors-1.13.0";
src = fetchegg {
name = "check-errors";
version = "1.13.0";
sha256 = "12a0sn82n98jybh72zb39fdddmr5k4785xglxb16750fhy8rmjwi";
};
buildInputs = [
setup-helper
];
};
crypto-tools = eggDerivation {
name = "crypto-tools-1.3";
src = fetchegg {
name = "crypto-tools";
version = "1.3";
sha256 = "0442wly63zis19vh8xc9nhxgp9sabaccxylpzmchd5f1d48iag65";
};
buildInputs = [
];
};
foreigners = eggDerivation {
name = "foreigners-1.4.1";
src = fetchegg {
name = "foreigners";
version = "1.4.1";
sha256 = "07nvyadhkd52q0kkvch1a5d7ivpmrhmyg295s4mxb1nw4wz46gfz";
};
buildInputs = [
matchable
];
};
lookup-table = eggDerivation {
name = "lookup-table-1.13.5";
src = fetchegg {
name = "lookup-table";
version = "1.13.5";
sha256 = "1nzly6rhynawlvzlyilk8z8cxz57cf9n5iv20glkhh28pz2izmrb";
};
buildInputs = [
setup-helper
check-errors
miscmacros
record-variants
synch
];
};
lru-cache = eggDerivation {
name = "lru-cache-0.5.3";
src = fetchegg {
name = "lru-cache";
version = "0.5.3";
sha256 = "0z6g3106c4j21v968hfzy9nnbfq2d83y0nyd20aifpq4g55c0d40";
};
buildInputs = [
record-variants
];
};
matchable = eggDerivation {
name = "matchable-3.3";
src = fetchegg {
name = "matchable";
version = "3.3";
sha256 = "07y3lpzgm4djiwi9y2adc796f9kwkmdr28fkfkw65syahdax8990";
};
buildInputs = [
];
};
message-digest = eggDerivation {
name = "message-digest-3.1.0";
src = fetchegg {
name = "message-digest";
version = "3.1.0";
sha256 = "1w6bax19dwgih78vcimiws0rja7qsd8hmbm6qqg2hf9cw3vab21s";
};
buildInputs = [
setup-helper
miscmacros
check-errors
variable-item
blob-utils
string-utils
];
};
miscmacros = eggDerivation {
name = "miscmacros-2.96";
src = fetchegg {
name = "miscmacros";
version = "2.96";
sha256 = "1ajdgjrni10i2hmhcp4rawnxajjxry3kmq1krdmah4sf0kjrgajc";
};
buildInputs = [
];
};
parley = eggDerivation {
name = "parley-0.9.2";
src = fetchegg {
name = "parley";
version = "0.9.2";
sha256 = "1vsbx4dk1240gzq02slzmavd1jrq04qj7ssnvg15h8xh81xwhbbz";
};
buildInputs = [
stty
srfi-71
miscmacros
];
};
pathname-expand = eggDerivation {
name = "pathname-expand-0.1";
src = fetchegg {
name = "pathname-expand";
version = "0.1";
sha256 = "14llya7l04z49xpi3iylk8aglrw968vy304ymavhhqlyzmzwkx3g";
};
buildInputs = [
];
};
posix-extras = eggDerivation {
name = "posix-extras-0.1.6";
src = fetchegg {
name = "posix-extras";
version = "0.1.6";
sha256 = "0gnmhn2l0161ham7f8i0lx1ay94ap8l8l7ga4nw9qs86lk024abi";
};
buildInputs = [
];
patches = [
# missing include <sys/sysmacros.h> since Jan 2025, cause unknown
./posix-extras-add-sysmacros-include.patch
];
};
record-variants = eggDerivation {
name = "record-variants-0.5.1";
src = fetchegg {
name = "record-variants";
version = "0.5.1";
sha256 = "15wgysxkm8m4hx9nhhw9akchzipdnqc7yj3qd3zn0z7sxg4sld1h";
};
buildInputs = [
];
};
regex = eggDerivation {
name = "regex-1.0";
src = fetchegg {
name = "regex";
version = "1.0";
sha256 = "1z9bh7xvab6h5cdlsz8jk02pv5py1i6ryqarbcs3wdgkkjgmmkif";
};
buildInputs = [
];
};
setup-helper = eggDerivation {
name = "setup-helper-1.5.5";
src = fetchegg {
name = "setup-helper";
version = "1.5.5";
sha256 = "1lpplp8f2wyc486dd98gs4wl1kkhh1cs6vdqkxrdk7f92ikmwbx3";
};
buildInputs = [
];
};
sha2 = eggDerivation {
name = "sha2-3.1.0";
src = fetchegg {
name = "sha2";
version = "3.1.0";
sha256 = "01ch290f2kcv1yv8spjdaqwipl80vvgpqc4divsj3vxckvgkawq2";
};
buildInputs = [
message-digest
];
};
sql-de-lite = eggDerivation {
name = "sql-de-lite-0.6.6";
src = fetchegg {
name = "sql-de-lite";
version = "0.6.6";
sha256 = "1mh3hpsibq2gxcpjaycqa4ckznj268xpfzsa6pn0i6iac6my3qra";
};
buildInputs = [
lru-cache
foreigners
];
};
srfi-37 = eggDerivation {
name = "srfi-37-1.3.1";
src = fetchegg {
name = "srfi-37";
version = "1.3.1";
sha256 = "1a2zdkdzrv15fw9dfdy8067fsgh4kr8ppffm8mc3cmlczrrd58cb";
};
buildInputs = [
];
};
srfi-71 = eggDerivation {
name = "srfi-71-1.1";
src = fetchegg {
name = "srfi-71";
version = "1.1";
sha256 = "01mlaxw2lfczykmx69xki2s0f4ywlg794rl4kz07plvzn0s3fbqq";
};
buildInputs = [
];
};
ssql = eggDerivation {
name = "ssql-0.2.4";
src = fetchegg {
name = "ssql";
version = "0.2.4";
sha256 = "0qhnghhx1wrvav4s7l780mspwlh8s6kzq4bl0cslwp1km90fx9bk";
};
buildInputs = [
matchable
];
};
string-utils = eggDerivation {
name = "string-utils-1.2.4";
src = fetchegg {
name = "string-utils";
version = "1.2.4";
sha256 = "07alvghg0dahilrm4jg44bndl0x69sv1zbna9l20cbdvi35i0jp1";
};
buildInputs = [
setup-helper
miscmacros
lookup-table
check-errors
];
};
stty = eggDerivation {
name = "stty-0.2.6";
src = fetchegg {
name = "stty";
version = "0.2.6";
sha256 = "09jmjpdsd3yg6d0f0imcihmn49i28x09lgl60i2dllffs25k22s4";
};
buildInputs = [
setup-helper
foreigners
];
};
synch = eggDerivation {
name = "synch-2.1.2";
src = fetchegg {
name = "synch";
version = "2.1.2";
sha256 = "1m9mnbq0m5jsxmd1a3rqpwpxj0l1b7vn1fknvxycc047pmlcyl00";
};
buildInputs = [
setup-helper
check-errors
];
};
tiger-hash = eggDerivation {
name = "tiger-hash-3.1.0";
src = fetchegg {
name = "tiger-hash";
version = "3.1.0";
sha256 = "0j9dsbjp9cw0y4w4srg0qwgh53jw2v3mx4y4h040ds0fkxlzzknx";
};
buildInputs = [
message-digest
];
};
ugarit = eggDerivation {
name = "ugarit-2.0";
src = fetchegg {
name = "ugarit";
version = "2.0";
sha256 = "1l5zkr6b8l5dw9p5mimbva0ncqw1sbvp3d4cywm1hqx2m03a0f1n";
};
buildInputs = [
miscmacros
sql-de-lite
crypto-tools
srfi-37
stty
matchable
regex
tiger-hash
message-digest
posix-extras
parley
ssql
pathname-expand
];
};
variable-item = eggDerivation {
name = "variable-item-1.3.1";
src = fetchegg {
name = "variable-item";
version = "1.3.1";
sha256 = "19b3mhb8kr892sz9yyzq79l0vv28dgilw9cf415kj6aq16yp4d5n";
};
buildInputs = [
setup-helper
check-errors
];
};
bind = eggDerivation {
name = "bind-1.5.2";
src = fetchegg {
name = "bind";
version = "1.5.2";
sha256 = "1x768k7dlfmkvgaf2idiaaqqgnqdnif5yb7ib6a6zndacbwz9jps";
};
buildInputs = [
silex
matchable
coops
regex
make
];
};
coops = eggDerivation {
name = "coops-1.93";
src = fetchegg {
name = "coops";
version = "1.93";
sha256 = "0mrkk7pmn9r691svzm4113mn0xsk36zi3f15m86n29a6c7897php";
};
buildInputs = [
matchable
record-variants
];
};
make = eggDerivation {
name = "make-1.8";
src = fetchegg {
name = "make";
version = "1.8";
sha256 = "1w6xsjyapi2x8dv21dpidkyw1kjfsbasddn554xx561pi3i0yv9h";
};
buildInputs = [
];
};
silex = eggDerivation {
name = "silex-1.4";
src = fetchegg {
name = "silex";
version = "1.4";
sha256 = "17x7f07aa3qnay3bhjr7knjivhycs54j97jyv3gjs1h8qnp63g00";
};
buildInputs = [
];
};
z3 = eggDerivation {
name = "z3-1.44";
src = fetchegg {
name = "z3";
version = "1.44";
sha256 = "16ayp4zkgm332q4bmjj22acqg197aqp6d8ifyyjj205iv6k0f3x4";
};
buildInputs = [
bind
];
};
}

View File

@@ -0,0 +1,12 @@
--- a/posix-extras.scm 1970-01-01 01:00:01.000000000 +0100
+++ b/posix-extras.scm 1970-01-01 01:00:01.000000000 +0100
@@ -110,6 +110,9 @@ static void *C_not_implemented_ptr(void)
#endif
+#if defined (__unix__)
+#include <sys/sysmacros.h>
+#endif
#if defined (__unix__) || defined (C_XXXBSD)
#include <sys/types.h>
#define C_mknod(fn, m, d) C_fix(mknod(C_data_pointer(fn), C_unfix(m), C_unfix(d)))
#define C_mknod64(fn, m, maj, min) C_fix(mknod(C_data_pointer(fn), C_unfix(m), makedev(C_num_to_int(maj), C_num_to_int(min))))

View File

@@ -0,0 +1,92 @@
{
lib,
stdenv,
coreutils,
fetchFromGitHub,
mtools,
p7zip,
wrapQtAppsHook,
qtbase,
qttools,
qmake,
syslinux,
util-linux,
which,
}:
stdenv.mkDerivation rec {
pname = "unetbootin";
version = "702";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "sha256-psX15XicPXAsd36BhuvK0G3GQS8hV/hazzO0HByCqV4=";
};
setSourceRoot = ''
sourceRoot=$(echo */src/unetbootin)
'';
buildInputs = [
qtbase
qttools
qmake
];
nativeBuildInputs = [ wrapQtAppsHook ];
# Lots of nice hard-coded paths...
postPatch = ''
substituteInPlace unetbootin.cpp \
--replace /bin/df ${coreutils}/bin/df \
--replace /sbin/blkid ${util-linux}/sbin/blkid \
--replace /sbin/fdisk ${util-linux}/sbin/fdisk \
--replace /sbin/sfdisk ${util-linux}/sbin/sfdisk \
--replace /usr/bin/syslinux ${syslinux}/bin/syslinux \
--replace /usr/bin/extlinux ${syslinux}/sbin/extlinux \
--replace /usr/share/syslinux ${syslinux}/share/syslinux
substituteInPlace main.cpp \
--replace /usr/share/unetbootin $out/share/unetbootin
substituteInPlace unetbootin.desktop \
--replace /usr/bin $out/bin
'';
preConfigure = ''
lupdate unetbootin.pro
lrelease unetbootin.pro
'';
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin unetbootin
install -Dm644 -t $out/share/unetbootin unetbootin_*.qm
install -Dm644 -t $out/share/applications unetbootin.desktop
runHook postInstall
'';
qtWrapperArgs = [
"--prefix PATH : ${
lib.makeBinPath [
mtools
p7zip
which
]
}"
"--set QT_X11_NO_MITSHM 1"
];
meta = with lib; {
description = "Tool to create bootable live USB drives from ISO images";
homepage = "https://unetbootin.github.io/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ebzzry ];
platforms = platforms.linux;
mainProgram = "unetbootin";
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitLab,
meson,
python3,
ninja,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bzip2-unstable";
version = "2020-08-11";
src = fetchFromGitLab {
owner = "federicomenaquintero";
repo = "bzip2";
rev = "15255b553e7c095fb7a26d4dc5819a11352ebba1";
hash = "sha256-BAyz35D62LWi47B/gNcCSKpdaECHBGSpt21vtnk3fKs=";
};
postPatch = ''
patchShebangs install_links.py
'';
nativeBuildInputs = [
meson
python3
ninja
];
outputs = [
"bin"
"dev"
"out"
"man"
];
mesonFlags = [
"-Ddocs=disabled"
];
strictDeps = true;
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "High-quality data compression program";
license = licenses.bsdOriginal;
pkgConfigModules = [ "bz2" ];
platforms = platforms.all;
maintainers = [ ];
};
})

View File

@@ -0,0 +1,84 @@
{
lib,
stdenv,
fetchurl,
enableStatic ? with stdenv.hostPlatform; isStatic || isCygwin,
enableShared ? true,
autoreconfHook,
testers,
}:
# 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 (
finalAttrs:
let
inherit (finalAttrs) version;
in
{
pname = "bzip2";
version = "1.0.8";
src = fetchurl {
url = "https://sourceware.org/pub/bzip2/bzip2-${version}.tar.gz";
sha256 = "sha256-q1oDF27hBtPw+pDjgdpHjdrkBZGBU8yiSOaCzQxKImk=";
};
patchFlags = [ "-p0" ];
patches = [
./patches/bzip2-1.0.6.2-autoconfiscated.patch
];
# Fix up hardcoded version from the above patch, e.g. seen in bzip2.pc or libbz2.so.1.0.N
postPatch = ''
patch <<-EOF
--- configure.ac
+++ configure.ac
@@ -3,3 +3,3 @@
-AC_INIT([bzip2], [1.0.6], [Julian Seward <jseward@bzip.org>])
+AC_INIT([bzip2], [${version}], [Julian Seward <jseward@bzip.org>])
BZIP2_LT_CURRENT=1
-BZIP2_LT_REVISION=6
+BZIP2_LT_REVISION=${lib.versions.patch version}
EOF
'';
strictDeps = true;
nativeBuildInputs = [ autoreconfHook ];
outputs = [
"bin"
"dev"
"out"
"man"
];
configureFlags = lib.concatLists [
(lib.optional enableStatic "--enable-static")
(lib.optional (!enableShared) "--disable-shared")
];
dontDisableStatic = enableStatic;
enableParallelBuilding = true;
postInstall = ''
ln -s $out/lib/libbz2.so.1.0.* $out/lib/libbz2.so.1.0
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "High-quality data compression program";
homepage = "https://www.sourceware.org/bzip2";
changelog = "https://sourceware.org/git/?p=bzip2.git;a=blob;f=CHANGES;hb=HEAD";
license = licenses.bsdOriginal;
pkgConfigModules = [ "bzip2" ];
platforms = platforms.all;
maintainers = with maintainers; [ mic92 ];
};
}
)

View File

@@ -0,0 +1,370 @@
--- /dev/null
+++ autogen.sh
@@ -0,0 +1,8 @@
+mv LICENSE COPYING
+mv CHANGES NEWS
+touch AUTHORS
+touch ChangeLog
+libtoolize --force
+aclocal
+automake --add-missing --gnu
+autoconf
--- /dev/null
+++ README.autotools
@@ -0,0 +1,41 @@
+bzip2 autoconfiscated
+=====================
+
+Temporarily at http://ftp.suse.com/pub/people/sbrabec/bzip2/ expecting
+that it will become a new upstream version to prevent per-distribution
+shared library patching done by nearly each Linux vendor separately.
+
+Autoconfiscation brings standard ./configure ; make ; make install
+installation, seamless support of DESTDIR, automatic check for supported
+CFLAGS, standard shared library support, automatic large files CFLAGS
+check and all things that are supported by automake.
+
+It makes obsolete Makefile-libbz2_so and README.COMPILATION.PROBLEMS.
+Now configure should automatically detect correct build flags.
+
+In case of any problem or question with autotools support feel free to
+contact me: Stanislav Brabec <sbrabec@suse.cz>
+
+Autoconfiscated version binaries are exactly equal to
+bzip2-1.0.6.tar.gz. There are only few changes. See below.
+
+
+New features:
+
+Trivial link man pages for bzcat and bunzip2 added.
+
+bzip2.pc file for pkg-config. Packages can use it for checks.
+
+
+Incompatible changes:
+
+soname change. Libtool has no support for two parts soname suffix (e. g.
+libbz2.so.1.0). It must be a single number (e. g. libbz2.so.1). That is
+why soname must change. But I see not a big problem with it. Several
+distributions already use the new number instead of the non-standard
+number from Makefile-libbz2_so.
+
+Shared library exports only public symbols.
+
+To be super-safe, I incremented minor number of the library file, so
+both instances of the shared library can live together.
--- /dev/null
+++ configure.ac
@@ -0,0 +1,62 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.57])
+AC_INIT([bzip2], [1.0.6], [Julian Seward <jseward@bzip.org>])
+BZIP2_LT_CURRENT=1
+BZIP2_LT_REVISION=6
+BZIP2_LT_AGE=0
+AC_CONFIG_SRCDIR([bzlib.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE([foreign subdir-objects])
+AM_MAINTAINER_MODE
+
+# Checks for programs.
+AC_PROG_AWK
+AC_PROG_CC_STDC
+AC_PROG_CC_C_O
+AC_USE_SYSTEM_EXTENSIONS
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+LT_INIT([disable-static pic-only])
+PKG_PROG_PKG_CONFIG
+gl_VISIBILITY
+# Checks for libraries.
+
+# Checks for header files.
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Check for system features.
+AC_SYS_LARGEFILE
+
+AC_MSG_CHECKING([whether compiler understands -Wall])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wall"
+AC_TRY_COMPILE([], [], [
+ AC_MSG_RESULT([yes])
+], [
+ AC_MSG_RESULT([no])
+ CFLAGS="$save_CFLAGS"
+])
+
+AC_MSG_CHECKING([whether compiler understands -Winline])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Winline"
+AC_TRY_COMPILE([], [], [
+ AC_MSG_RESULT([yes])
+], [
+ AC_MSG_RESULT([no])
+ CFLAGS="$save_CFLAGS"
+])
+
+# Checks for library functions.
+
+# Write the output.
+AC_SUBST([BZIP2_LT_CURRENT])
+AC_SUBST([BZIP2_LT_REVISION])
+AC_SUBST([BZIP2_LT_AGE])
+AC_CONFIG_FILES([Makefile bzip2.pc])
+AC_OUTPUT
--- /dev/null
+++ Makefile.am
@@ -0,0 +1,137 @@
+ACLOCAL_AMFLAGS = -I m4
+lib_LTLIBRARIES = libbz2.la
+AM_CFLAGS = $(CFLAG_VISIBILITY)
+libbz2_la_SOURCES = \
+ blocksort.c \
+ huffman.c \
+ crctable.c \
+ randtable.c \
+ compress.c \
+ decompress.c \
+ bzlib.c
+
+libbz2_la_LDFLAGS = \
+ -version-info $(BZIP2_LT_CURRENT):$(BZIP2_LT_REVISION):$(BZIP2_LT_AGE) \
+ -no-undefined
+
+include_HEADERS = bzlib.h
+
+noinst_HEADERS = bzlib_private.h
+
+bin_PROGRAMS = bzip2 bzip2recover
+
+bzip2_SOURCES = bzip2.c
+bzip2_LDADD = libbz2.la
+
+bzip2recover_SOURCES = bzip2recover.c
+bzip2recover_LDADD = libbz2.la
+
+bin_SCRIPTS = bzgrep bzmore bzdiff
+
+man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = bzip2.pc
+
+$(pkgconfig_DATA): $(srcdir)/bzip2.pc.in config.status
+
+install-exec-hook:
+ rm -f $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzgrep" | sed 's,^.*/,,;$(transform)'` $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'`
+ $(LN_S) `echo "bzgrep" | sed 's,^.*/,,;$(transform)'` $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'`
+ $(LN_S) `echo "bzmore" | sed 's,^.*/,,;$(transform)'` $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform)'`
+ $(LN_S) `echo "bzdiff" | sed 's,^.*/,,;$(transform)'` $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'`
+
+install-data-hook:
+ echo ".so man1/`echo "bzip2" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bunzip2" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzip2" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzcat" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzgrep" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzgrep" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzmore" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzless" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzdiff" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'`.1
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform)'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'`
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bunzip2" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzcat" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzless" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'`.1
+
+test: bzip2
+ @cat $(srcdir)/words1
+ ./bzip2 -1 <$(srcdir)/sample1.ref >sample1.rb2
+ ./bzip2 -2 <$(srcdir)/sample2.ref >sample2.rb2
+ ./bzip2 -3 <$(srcdir)/sample3.ref >sample3.rb2
+ ./bzip2 -d <$(srcdir)/sample1.bz2 >sample1.tst
+ ./bzip2 -d <$(srcdir)/sample2.bz2 >sample2.tst
+ ./bzip2 -ds <$(srcdir)/sample3.bz2 >sample3.tst
+ cmp $(srcdir)/sample1.bz2 sample1.rb2
+ cmp $(srcdir)/sample2.bz2 sample2.rb2
+ cmp $(srcdir)/sample3.bz2 sample3.rb2
+ cmp sample1.tst $(srcdir)/sample1.ref
+ cmp sample2.tst $(srcdir)/sample2.ref
+ cmp sample3.tst $(srcdir)/sample3.ref
+ @cat $(srcdir)/words3
+
+manual: $(srcdir)/manual.html $(srcdir)/manual.ps $(srcdir)/manual.pdf
+
+manual.ps: $(MANUAL_SRCS)
+ cd $(srcdir); ./xmlproc.sh -ps manual.xml
+
+manual.pdf: $(MANUAL_SRCS)
+ cd $(srcdir); ./xmlproc.sh -pdf manual.xml
+
+manual.html: $(MANUAL_SRCS)
+ cd $(srcdir); ./xmlproc.sh -html manual.xml
+
+EXTRA_DIST = \
+ $(bin_SCRIPTS) \
+ $(man_MANS) \
+ README.autotools \
+ README.XML.STUFF \
+ bz-common.xsl \
+ bz-fo.xsl \
+ bz-html.xsl \
+ bzip.css \
+ bzip2.1.preformatted \
+ bzip2.pc.in \
+ bzip2.txt \
+ dlltest.c \
+ dlltest.dsp \
+ entities.xml \
+ format.pl \
+ libbz2.def \
+ libbz2.dsp \
+ makefile.msc \
+ manual.html \
+ manual.pdf \
+ manual.ps \
+ manual.xml \
+ mk251.c \
+ sample1.bz2 \
+ sample1.ref \
+ sample2.bz2 \
+ sample2.ref \
+ sample3.bz2 \
+ sample3.ref \
+ spewG.c \
+ unzcrash.c \
+ words0 \
+ words1 \
+ words2 \
+ words3 \
+ xmlproc.sh
--- /dev/null
+++ bzip2.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: bzip2
+Description: Lossless, block-sorting data compression
+Version: @VERSION@
+Libs: -L${libdir} -lbz2
+Cflags: -I${includedir}
--- /dev/null
+++ m4/visibility.m4
@@ -0,0 +1,78 @@
+# visibility.m4 serial 4 (gettext-0.18.2)
+dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Tests whether the compiler supports the command-line option
+dnl -fvisibility=hidden and the function and variable attributes
+dnl __attribute__((__visibility__("hidden"))) and
+dnl __attribute__((__visibility__("default"))).
+dnl Does *not* test for __visibility__("protected") - which has tricky
+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
+dnl MacOS X.
+dnl Does *not* test for __visibility__("internal") - which has processor
+dnl dependent semantics.
+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
+dnl "really only recommended for legacy code".
+dnl Set the variable CFLAG_VISIBILITY.
+dnl Defines and sets the variable HAVE_VISIBILITY.
+
+AC_DEFUN([gl_VISIBILITY],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ CFLAG_VISIBILITY=
+ HAVE_VISIBILITY=0
+ if test -n "$GCC"; then
+ dnl First, check whether -Werror can be added to the command line, or
+ dnl whether it leads to an error because of some other option that the
+ dnl user has put into $CC $CFLAGS $CPPFLAGS.
+ AC_MSG_CHECKING([whether the -Werror option is usable])
+ AC_CACHE_VAL([gl_cv_cc_vis_werror], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [gl_cv_cc_vis_werror=yes],
+ [gl_cv_cc_vis_werror=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_vis_werror])
+ dnl Now check whether visibility declarations are supported.
+ AC_MSG_CHECKING([for simple visibility declarations])
+ AC_CACHE_VAL([gl_cv_cc_visibility], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ dnl We use the option -Werror and a function dummyfunc, because on some
+ dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
+ dnl "visibility attribute not supported in this configuration; ignored"
+ dnl at the first function definition in every compilation unit, and we
+ dnl don't want to use the option in this case.
+ if test $gl_cv_cc_vis_werror = yes; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+ extern __attribute__((__visibility__("default"))) int exportedvar;
+ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+ extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+ void dummyfunc (void) {}
+ ]],
+ [[]])],
+ [gl_cv_cc_visibility=yes],
+ [gl_cv_cc_visibility=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_visibility])
+ if test $gl_cv_cc_visibility = yes; then
+ CFLAG_VISIBILITY="-fvisibility=hidden"
+ HAVE_VISIBILITY=1
+ AC_DEFINE([BZ_EXTERN], [__attribute__((__visibility__("default")))], [To make symbol visible])
+ fi
+ fi
+ AC_SUBST([CFLAG_VISIBILITY])
+ AC_SUBST([HAVE_VISIBILITY])
+ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
--- bzlib.h.orig
+++ bzlib.h
@@ -91,9 +91,11 @@ typedef
# endif
#else
# define BZ_API(func) func
-# define BZ_EXTERN extern
#endif
+#ifndef BZ_EXTERN
+#define BZ_EXTERN extern
+#endif
/*-- Core (low-level) library functions --*/

View File

@@ -0,0 +1,85 @@
{
lib,
stdenv,
fetchurl,
makeShellWrapper,
updateAutotoolsGnuConfigScriptsHook,
runtimeShellPackage,
}:
# 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 = "gzip";
version = "1.14";
src = fetchurl {
url = "mirror://gnu/gzip/${pname}-${version}.tar.xz";
hash = "sha256-Aae4gb0iC/32Ffl7hxj4C9/T9q3ThbmT3Pbv0U6MCsY=";
};
outputs = [
"out"
"man"
"info"
];
enableParallelBuilding = true;
nativeBuildInputs = [
updateAutotoolsGnuConfigScriptsHook
makeShellWrapper
];
buildInputs = [ runtimeShellPackage ];
makeFlags = [
"SHELL=/bin/sh"
"GREP=grep"
# gzip 1.12 doesn't build `zless` unless it can find `less`, but we
# can avoid having `less` as a build input if we just override these.
"ZLESS_MAN=zless.1"
"ZLESS_PROG=zless"
];
# Many gzip executables are shell scripts that depend upon other gzip
# executables being in $PATH. Rather than try to re-write all the
# internal cross-references, just add $out/bin to PATH at the top of
# all the executables that are shell scripts.
preFixup = ''
sed -i '1{;/#!\/bin\/sh/aPATH="'$out'/bin:$PATH"
}' $out/bin/*
''
# run gzip with "-n" when $GZIP_NO_TIMESTAMPS (set by stdenv's setup.sh) is set to stop gzip from adding timestamps
# to archive headers: https://github.com/NixOS/nixpkgs/issues/86348
# if changing so that there's no longer a .gzip-wrapped then update copy in make-bootstrap-tools.nix
+ ''
wrapProgram $out/bin/gzip \
--add-flags "\''${GZIP_NO_TIMESTAMPS:+-n}"
'';
meta = {
homepage = "https://www.gnu.org/software/gzip/";
description = "GNU zip compression program";
longDescription = ''
gzip (GNU zip) is a popular data compression program written by
Jean-loup Gailly for the GNU project. Mark Adler wrote the
decompression part.
We developed this program as a replacement for compress because of
the Unisys and IBM patents covering the LZW algorithm used by
compress. These patents made it impossible for us to use compress,
and we needed a replacement. The superior compression ratio of gzip
is just a bonus.
'';
platforms = lib.platforms.all;
license = lib.licenses.gpl3Plus;
mainProgram = "gzip";
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "kzipmix";
version = "20200115";
src = fetchurl {
url = "http://static.jonof.id.au/dl/kenutils/kzipmix-${version}-linux.tar.gz";
sha256 = "sha256-ePgye0D6/ED53zx6xffLnYhkjed7SPU4BLOZQr9E3yA=";
};
installPhase = ''
mkdir -p $out/bin
cp amd64/{kzip,zipmix} $out/bin
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 $out/bin/kzip
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 $out/bin/zipmix
'';
meta = with lib; {
description = "Tool that aggressively optimizes the sizes of Zip archives";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
homepage = "http://advsys.net/ken/utils.htm";
maintainers = [ maintainers.sander ];
};
}

View File

@@ -0,0 +1,69 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
lzmaSupport ? true,
xz ? null,
}:
assert lzmaSupport -> xz != null;
let
mkWith = flag: name: if flag then "--with-${name}" else "--without-${name}";
in
stdenv.mkDerivation rec {
pname = "xdelta";
version = "3.1.0";
src = fetchFromGitHub {
sha256 = "09mmsalc7dwlvgrda56s2k927rpl3a5dzfa88aslkqcjnr790wjy";
rev = "v${version}";
repo = "xdelta-devel";
owner = "jmacd";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ ] ++ lib.optionals lzmaSupport [ xz ];
postPatch = ''
cd xdelta3
substituteInPlace Makefile.am --replace \
"common_CFLAGS =" \
"common_CFLAGS = -DXD3_USE_LARGESIZET=1"
'';
configureFlags = [
(mkWith lzmaSupport "liblzma")
];
enableParallelBuilding = true;
doCheck = true;
checkPhase = ''
mkdir $PWD/tmp
for i in testing/file.h xdelta3-test.h; do
substituteInPlace $i --replace /tmp $PWD/tmp
done
./xdelta3regtest
'';
installPhase = ''
install -D -m755 xdelta3 $out/bin/xdelta3
install -D -m644 xdelta3.1 $out/share/man/man1/xdelta3.1
'';
meta = with lib; {
description = "Binary differential compression in VCDIFF (RFC 3284) format";
longDescription = ''
xdelta is a command line program for delta encoding, which generates two
file differences. This is similar to diff and patch, but it is targeted
for binary files and does not generate human readable output.
'';
homepage = "http://xdelta.org/";
license = licenses.gpl2Plus;
mainProgram = "xdelta3";
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,105 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
enableStatic ? stdenv.hostPlatform.isStatic,
writeScript,
testers,
}:
# 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 (finalAttrs: {
pname = "xz";
version = "5.8.1";
src = fetchurl {
url =
with finalAttrs;
"https://github.com/tukaani-project/xz/releases/download/v${version}/xz-${version}.tar.xz";
hash = "sha256-C1T3nfhZElBN4LFK7Hlx4/lkSRrxgS2DRHAFgHUTzZ4=";
};
strictDeps = true;
outputs = [
"bin"
"dev"
"out"
"man"
"doc"
];
configureFlags = lib.optional enableStatic "--disable-shared";
enableParallelBuilding = true;
doCheck = true;
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isOpenBSD [
autoreconfHook
];
# this could be accomplished by updateAutotoolsGnuConfigScriptsHook, but that causes infinite recursion
# necessary for FreeBSD code path in configure
postPatch = ''
substituteInPlace ./build-aux/config.guess --replace-fail /usr/bin/uname uname
'';
preCheck = ''
# Tests have a /bin/sh dependency...
patchShebangs tests
'';
# In stdenv-linux, prevent a dependency on bootstrap-tools.
preConfigure = "CONFIG_SHELL=/bin/sh";
postInstall = "rm -rf $out/share/doc";
passthru = {
updateScript = writeScript "update-xz" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pcre common-updater-scripts
set -eu -o pipefail
# Expect the text in format of '>xz-5.2.6.tar.xz</a>'
# We pick first match where a stable release goes first.
new_version="$(curl -s https://tukaani.org/xz/ |
pcregrep -o1 '>xz-([0-9.]+)[.]tar[.]xz</a>' |
head -n1)"
update-source-version ${finalAttrs.pname} "$new_version"
'';
tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
};
meta = with lib; {
changelog = "https://github.com/tukaani-project/xz/releases/tag/v${finalAttrs.version}";
description = "General-purpose data compression software, successor of LZMA";
homepage = "https://tukaani.org/xz/";
longDescription = ''
XZ Utils is free general-purpose data compression software with high
compression ratio. XZ Utils were written for POSIX-like systems,
but also work on some not-so-POSIX systems. XZ Utils are the
successor to LZMA Utils.
The core of the XZ Utils compression code is based on LZMA SDK, but
it has been modified quite a lot to be suitable for XZ Utils. The
primary compression algorithm is currently LZMA2, which is used
inside the .xz container format. With typical files, XZ Utils
create 30 % smaller output than gzip and 15 % smaller output than
bzip2.
'';
license = with licenses; [
gpl2Plus
lgpl21Plus
];
maintainers = with maintainers; [ sander ];
platforms = platforms.all;
pkgConfigModules = [ "liblzma" ];
};
})

View File

@@ -0,0 +1,159 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
bashNonInteractive,
gnugrep,
fixDarwinDylibNames,
file,
legacySupport ? false,
static ? stdenv.hostPlatform.isStatic, # generates static libraries *only*
enableStatic ? static,
# these need to be ran on the host, thus disable when cross-compiling
buildContrib ? stdenv.hostPlatform == stdenv.buildPlatform,
doCheck ? stdenv.hostPlatform == stdenv.buildPlatform,
nix-update-script,
# for passthru.tests
libarchive,
rocksdb,
arrow-cpp,
libzip,
curl,
python3Packages,
haskellPackages,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "zstd";
version = "1.5.7";
src = fetchFromGitHub {
owner = "facebook";
repo = "zstd";
rev = "v${finalAttrs.version}";
hash = "sha256-tNFWIT9ydfozB8dWcmTMuZLCQmQudTFJIkSr0aG7S44=";
};
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = lib.optional stdenv.hostPlatform.isUnix bashNonInteractive;
patches = [
# This patches makes sure we do not attempt to use the MD5 implementation
# of the host platform when running the tests
./playtests-darwin.patch
# Pull missing manpages update:
# https://github.com/facebook/zstd/pull/4302
# TODO: remove with 1.5.8 release
(fetchpatch {
name = "man-fix.patch";
url = "https://github.com/facebook/zstd/commit/6af3842118ea5325480b403213b2a9fbed3d3d74.patch";
hash = "sha256-i+iv+owUXbKU3UtZBsjfj86kFB3TDlpcVDNsDX8dyZE=";
})
];
postPatch = lib.optionalString (!static) ''
substituteInPlace build/cmake/CMakeLists.txt \
--replace 'message(SEND_ERROR "You need to build static library to build tests")' ""
substituteInPlace build/cmake/tests/CMakeLists.txt \
--replace 'libzstd_static' 'libzstd_shared'
sed -i \
"1aexport ${lib.optionalString stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/build_/lib" \
tests/playTests.sh
'';
cmakeFlags =
lib.attrsets.mapAttrsToList (name: value: "-DZSTD_${name}:BOOL=${if value then "ON" else "OFF"}")
{
BUILD_SHARED = !static;
BUILD_STATIC = enableStatic;
BUILD_CONTRIB = buildContrib;
PROGRAMS_LINK_SHARED = !static;
LEGACY_SUPPORT = legacySupport;
BUILD_TESTS = doCheck;
};
cmakeDir = "../build/cmake";
dontUseCmakeBuildDir = true;
preConfigure = ''
mkdir -p build_ && cd $_
'';
nativeCheckInputs = [ file ];
inherit doCheck;
checkPhase = ''
runHook preCheck
# Patch shebangs for playTests
patchShebangs ../programs/zstdgrep
ctest -R playTests # The only relatively fast test.
runHook postCheck
'';
preInstall = ''
mkdir -p $bin/bin
substituteInPlace ../programs/zstdgrep \
--replace ":-grep" ":-${gnugrep}/bin/grep" \
--replace ":-zstdcat" ":-$bin/bin/zstdcat"
substituteInPlace ../programs/zstdless \
--replace "zstdcat" "$bin/bin/zstdcat"
''
+ lib.optionalString buildContrib (
''
cp contrib/pzstd/pzstd $bin/bin/pzstd
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
install_name_tool -change @rpath/libzstd.1.dylib $out/lib/libzstd.1.dylib $bin/bin/pzstd
''
);
outputs = [
"bin"
"dev"
]
++ lib.optional stdenv.hostPlatform.isUnix "man"
++ [ "out" ];
passthru = {
updateScript = nix-update-script { };
tests = {
# Reverse dependencies
inherit libarchive rocksdb arrow-cpp;
libzip = libzip.override { withZstd = true; };
curl = curl.override { zstdSupport = true; };
python-zstd = python3Packages.zstd;
haskell-zstd = haskellPackages.zstd;
haskell-hs-zstd = haskellPackages.hs-zstd;
# Package tests (coherent with overrides)
pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
};
};
meta = with lib; {
description = "Zstandard real-time compression algorithm";
longDescription = ''
Zstd, short for Zstandard, is a fast lossless compression algorithm,
targeting real-time compression scenarios at zlib-level compression
ratio. Zstd can also offer stronger compression ratio at the cost of
compression speed. Speed/ratio trade-off is configurable by small
increment, to fit different situations. Note however that decompression
speed is preserved and remain roughly the same at all settings, a
property shared by most LZ compression algorithms, such as zlib.
'';
homepage = "https://facebook.github.io/zstd/";
changelog = "https://github.com/facebook/zstd/blob/v${finalAttrs.version}/CHANGELOG";
license = with licenses; [ bsd3 ]; # Or, at your opinion, GPL-2.0-only.
mainProgram = "zstd";
platforms = platforms.all;
maintainers = with maintainers; [ orivej ];
pkgConfigModules = [ "libzstd" ];
};
})

View File

@@ -0,0 +1,37 @@
--- a/tests/playTests.sh
+++ b/tests/playTests.sh
@@ -119,16 +119,10 @@ case "$OS" in
esac
case "$UNAME" in
- Darwin) MD5SUM="md5 -r" ;;
- NetBSD) MD5SUM="md5 -n" ;;
- OpenBSD) MD5SUM="md5" ;;
*) MD5SUM="md5sum" ;;
esac
MTIME="stat -c %Y"
-case "$UNAME" in
- Darwin | FreeBSD | OpenBSD | NetBSD) MTIME="stat -f %m" ;;
-esac
assertSameMTime() {
MT1=$($MTIME "$1")
@@ -138,9 +132,6 @@ assertSameMTime() {
}
GET_PERMS="stat -c %a"
-case "$UNAME" in
- Darwin | FreeBSD | OpenBSD | NetBSD) GET_PERMS="stat -f %Lp" ;;
-esac
assertFilePermissions() {
STAT1=$($GET_PERMS "$1")
@@ -1155,7 +1146,6 @@ $MD5SUM dirTestDict/* > tmph1
zstd -f --rm dirTestDict/* -D tmpDictC
zstd -d --rm dirTestDict/*.zst -D tmpDictC # note : use internal checksum by default
case "$UNAME" in
- Darwin) println "md5sum -c not supported on OS-X : test skipped" ;; # not compatible with OS-X's md5
*) $MD5SUM -c tmph1 ;;
esac
rm -rf dirTestDict

View File

@@ -0,0 +1,340 @@
# This is is arrow-cpp < 20 used as a workaround for
# Ceph not supporting >= yet, taken from nixpkgs commit
# 97ae53798f6a7c7c3c259ad8c2cbcede6ca34b2a~
# This should be entirely removed when upstream bug
# https://tracker.ceph.com/issues/71269
# is fixed.
{
stdenv,
lib,
fetchurl,
fetchpatch2,
fetchFromGitHub,
fixDarwinDylibNames,
autoconf,
aws-sdk-cpp,
aws-sdk-cpp-arrow ? aws-sdk-cpp.override {
apis = [
"cognito-identity"
"config"
"identity-management"
"s3"
"sts"
"transfer"
];
},
boost,
brotli,
bzip2,
cmake,
crc32c,
curl,
flatbuffers,
gflags,
glog,
google-cloud-cpp,
grpc,
gtest,
libbacktrace,
lz4,
minio,
ninja,
nlohmann_json,
openssl,
perl,
pkg-config,
protobuf,
python3,
rapidjson,
re2,
snappy,
sqlite,
thrift,
tzdata,
utf8proc,
which,
zlib,
zstd,
testers,
enableShared ? !stdenv.hostPlatform.isStatic,
enableFlight ? stdenv.buildPlatform == stdenv.hostPlatform,
# Disable also on RiscV
# configure: error: cannot determine number of significant virtual address bits
enableJemalloc ?
!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch64 && !stdenv.hostPlatform.isRiscV64,
enableS3 ? true,
# google-cloud-cpp fails to build on RiscV
enableGcs ? !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isRiscV64,
}:
let
arrow-testing = fetchFromGitHub {
name = "arrow-testing";
owner = "apache";
repo = "arrow-testing";
rev = "4d209492d514c2d3cb2d392681b9aa00e6d8da1c";
hash = "sha256-IkiCbuy0bWyClPZ4ZEdkEP7jFYLhM7RCuNLd6Lazd4o=";
};
parquet-testing = fetchFromGitHub {
name = "parquet-testing";
owner = "apache";
repo = "parquet-testing";
rev = "c7cf1374cf284c0c73024cd1437becea75558bf8";
hash = "sha256-DThjyZ34LajHwXZy1IhYKUGUG/ejQ9WvBNuI8eUKmSs=";
};
version = "19.0.1";
in
stdenv.mkDerivation (finalAttrs: {
pname = "arrow-cpp";
inherit version;
src = fetchFromGitHub {
owner = "apache";
repo = "arrow";
rev = "apache-arrow-${version}";
hash = "sha256-toHwUIOZRpgR0K7pQtT5nqWpO9G7AuHYTcvA6UVg9lA=";
};
sourceRoot = "${finalAttrs.src.name}/cpp";
patches = [
(fetchpatch2 {
name = "protobuf-30-compat.patch";
url = "https://github.com/apache/arrow/pull/46136.patch";
hash = "sha256-WTpe/eT3himlCHN/R78w1sF0HG859mE2ZN70U+9N8Ag=";
stripLen = 1;
})
];
# versions are all taken from
# https://github.com/apache/arrow/blob/apache-arrow-${version}/cpp/thirdparty/versions.txt
# jemalloc: arrow uses a custom prefix to prevent default allocator symbol
# collisions as well as custom build flags
${if enableJemalloc then "ARROW_JEMALLOC_URL" else null} = fetchurl {
url = "https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2";
hash = "sha256-LbgtHnEZ3z5xt2QCGbbf6EeJvAU3mDw7esT3GJrs/qo=";
};
# mimalloc: arrow uses custom build flags for mimalloc
ARROW_MIMALLOC_URL = fetchFromGitHub {
owner = "microsoft";
repo = "mimalloc";
rev = "v2.0.6";
hash = "sha256-u2ITXABBN/dwU+mCIbL3tN1f4c17aBuSdNTV+Adtohc=";
};
ARROW_XSIMD_URL = fetchFromGitHub {
owner = "xtensor-stack";
repo = "xsimd";
rev = "13.0.0";
hash = "sha256-qElJYW5QDj3s59L3NgZj5zkhnUMzIP2mBa1sPks3/CE=";
};
ARROW_SUBSTRAIT_URL = fetchFromGitHub {
owner = "substrait-io";
repo = "substrait";
rev = "v0.44.0";
hash = "sha256-V739IFTGPtbGPlxcOi8sAaYSDhNUEpITvN9IqdPReug=";
};
nativeBuildInputs = [
cmake
pkg-config
ninja
autoconf # for vendored jemalloc
flatbuffers
]
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [
boost
brotli
bzip2
flatbuffers
gflags
glog
gtest
libbacktrace
lz4
nlohmann_json # alternative JSON parser to rapidjson
protobuf # substrait requires protobuf
rapidjson
re2
snappy
thrift
utf8proc
zlib
zstd
]
++ lib.optionals enableFlight [
grpc
openssl
protobuf
sqlite
]
++ lib.optionals enableS3 [
aws-sdk-cpp-arrow
openssl
]
++ lib.optionals enableGcs [
crc32c
curl
google-cloud-cpp
grpc
nlohmann_json
];
preConfigure = ''
patchShebangs build-support/
substituteInPlace "src/arrow/vendored/datetime/tz.cpp" \
--replace-fail 'discover_tz_dir();' '"${tzdata}/share/zoneinfo";'
'';
cmakeFlags = [
"-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON"
"-DARROW_BUILD_SHARED=${if enableShared then "ON" else "OFF"}"
"-DARROW_BUILD_STATIC=${if enableShared then "OFF" else "ON"}"
"-DARROW_BUILD_TESTS=${if enableShared then "ON" else "OFF"}"
"-DARROW_BUILD_INTEGRATION=ON"
"-DARROW_BUILD_UTILITIES=ON"
"-DARROW_EXTRA_ERROR_CONTEXT=ON"
"-DARROW_VERBOSE_THIRDPARTY_BUILD=ON"
"-DARROW_DEPENDENCY_SOURCE=SYSTEM"
"-Dxsimd_SOURCE=AUTO"
"-DARROW_DEPENDENCY_USE_SHARED=${if enableShared then "ON" else "OFF"}"
"-DARROW_COMPUTE=ON"
"-DARROW_CSV=ON"
"-DARROW_DATASET=ON"
"-DARROW_FILESYSTEM=ON"
"-DARROW_FLIGHT_SQL=${if enableFlight then "ON" else "OFF"}"
"-DARROW_HDFS=ON"
"-DARROW_IPC=ON"
"-DARROW_JEMALLOC=${if enableJemalloc then "ON" else "OFF"}"
"-DARROW_JSON=ON"
"-DARROW_USE_GLOG=ON"
"-DARROW_WITH_BACKTRACE=ON"
"-DARROW_WITH_BROTLI=ON"
"-DARROW_WITH_BZ2=ON"
"-DARROW_WITH_LZ4=ON"
"-DARROW_WITH_NLOHMANN_JSON=ON"
"-DARROW_WITH_SNAPPY=ON"
"-DARROW_WITH_UTF8PROC=ON"
"-DARROW_WITH_ZLIB=ON"
"-DARROW_WITH_ZSTD=ON"
"-DARROW_MIMALLOC=ON"
"-DARROW_SUBSTRAIT=ON"
"-DARROW_FLIGHT=${if enableFlight then "ON" else "OFF"}"
"-DARROW_FLIGHT_TESTING=${if enableFlight then "ON" else "OFF"}"
"-DARROW_S3=${if enableS3 then "ON" else "OFF"}"
"-DARROW_GCS=${if enableGcs then "ON" else "OFF"}"
# Parquet options:
"-DARROW_PARQUET=ON"
"-DPARQUET_BUILD_EXECUTABLES=ON"
"-DPARQUET_REQUIRE_ENCRYPTION=ON"
]
++ lib.optionals (!enableShared) [ "-DARROW_TEST_LINKAGE=static" ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
"-DCMAKE_INSTALL_RPATH=@loader_path/../lib" # needed for tools executables
]
++ lib.optionals (!stdenv.hostPlatform.isx86_64) [ "-DARROW_USE_SIMD=OFF" ]
++ lib.optionals enableS3 [
"-DAWSSDK_CORE_HEADER_FILE=${aws-sdk-cpp-arrow}/include/aws/core/Aws.h"
];
doInstallCheck = true;
ARROW_TEST_DATA = lib.optionalString finalAttrs.doInstallCheck "${arrow-testing}/data";
PARQUET_TEST_DATA = lib.optionalString finalAttrs.doInstallCheck "${parquet-testing}/data";
GTEST_FILTER =
let
# Upstream Issue: https://issues.apache.org/jira/browse/ARROW-11398
filteredTests =
lib.optionals stdenv.hostPlatform.isAarch64 [
"TestFilterKernelWithNumeric/3.CompareArrayAndFilterRandomNumeric"
"TestFilterKernelWithNumeric/7.CompareArrayAndFilterRandomNumeric"
"TestCompareKernel.PrimitiveRandomTests"
]
++ lib.optionals enableS3 [
"S3OptionsTest.FromUri"
"S3RegionResolutionTest.NonExistentBucket"
"S3RegionResolutionTest.PublicBucket"
"S3RegionResolutionTest.RestrictedBucket"
"TestMinioServer.Connect"
"TestS3FS.*"
"TestS3FSGeneric.*"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# TODO: revisit at 12.0.0 or when
# https://github.com/apache/arrow/commit/295c6644ca6b67c95a662410b2c7faea0920c989
# is available, see
# https://github.com/apache/arrow/pull/15288#discussion_r1071244661
"ExecPlanExecution.StressSourceSinkStopped"
];
in
lib.optionalString finalAttrs.doInstallCheck "-${lib.concatStringsSep ":" filteredTests}";
__darwinAllowLocalNetworking = true;
nativeInstallCheckInputs = [
perl
which
sqlite
]
++ lib.optionals enableS3 [ minio ]
++ lib.optionals enableFlight [ python3 ];
installCheckPhase =
let
disabledTests = [
# flaky
"arrow-flight-test"
# requires networking
"arrow-gcsfs-test"
"arrow-flight-integration-test"
];
in
''
runHook preInstallCheck
ctest -L unittest --exclude-regex '^(${lib.concatStringsSep "|" disabledTests})$'
runHook postInstallCheck
'';
meta = with lib; {
description = "Cross-language development platform for in-memory data";
homepage = "https://arrow.apache.org/docs/cpp/";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [
tobim
veprbl
cpcloud
];
pkgConfigModules = [
"arrow"
"arrow-acero"
"arrow-compute"
"arrow-csv"
"arrow-dataset"
"arrow-filesystem"
"arrow-flight"
"arrow-flight-sql"
"arrow-flight-testing"
"arrow-json"
"arrow-substrait"
"arrow-testing"
"parquet"
];
};
passthru = {
inherit
enableFlight
enableJemalloc
enableS3
enableGcs
;
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
})

View File

@@ -0,0 +1,69 @@
Backported from <https://github.com/ceph/ceph/commit/857eedbe6c9ed80ed0625bd0aa27b1a1e85f8d59>.
Original author: Adam Emerson <aemerson@redhat.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bbd63a6a006..bbd7c737feb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -666,7 +666,7 @@ option(WITH_SYSTEM_BOOST "require and build with system Boost" OFF)
# Boost::thread depends on Boost::atomic, so list it explicitly.
set(BOOST_COMPONENTS
atomic chrono thread system regex random program_options date_time
- iostreams context coroutine)
+ iostreams context coroutine url)
set(BOOST_HEADER_COMPONENTS container)
if(WITH_MGR)
diff --git a/src/mds/BoostUrlImpl.cc b/src/mds/BoostUrlImpl.cc
deleted file mode 100644
index 479f4c6d75d..00000000000
--- a/src/mds/BoostUrlImpl.cc
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * https://www.boost.org/doc/libs/1_82_0/libs/url/doc/html/url/overview.html#url.overview.requirements
- *
- * To use the library as header-only; that is, to eliminate the requirement
- * to link a program to a static or dynamic Boost.URL library,
- * simply place the following line in exactly one source file in your project.
- */
-#include <boost/url/src.hpp>
diff --git a/src/mds/CMakeLists.txt b/src/mds/CMakeLists.txt
index 0c6c31a3c51..5c98db76e4d 100644
--- a/src/mds/CMakeLists.txt
+++ b/src/mds/CMakeLists.txt
@@ -45,12 +45,12 @@ set(mds_srcs
QuiesceDbManager.cc
QuiesceAgent.cc
MDSRankQuiesce.cc
- BoostUrlImpl.cc
${CMAKE_SOURCE_DIR}/src/common/TrackedOp.cc
${CMAKE_SOURCE_DIR}/src/common/MemoryModel.cc
${CMAKE_SOURCE_DIR}/src/osdc/Journaler.cc
${CMAKE_SOURCE_DIR}/src/mgr/MDSPerfMetricTypes.cc)
add_library(mds STATIC ${mds_srcs})
target_link_libraries(mds PRIVATE
+ Boost::url
heap_profiler cpu_profiler osdc ${LUA_LIBRARIES})
target_include_directories(mds PRIVATE "${LUA_INCLUDE_DIR}")
diff --git a/src/test/mds/CMakeLists.txt b/src/test/mds/CMakeLists.txt
index f80abe75083..18ebb648e68 100644
--- a/src/test/mds/CMakeLists.txt
+++ b/src/test/mds/CMakeLists.txt
@@ -18,11 +18,10 @@ target_link_libraries(unittest_mds_sessionfilter mds osdc ceph-common global ${B
add_executable(unittest_mds_quiesce_db
TestQuiesceDb.cc
../../../src/mds/QuiesceDbManager.cc
- ../../../src/mds/BoostUrlImpl.cc
$<TARGET_OBJECTS:unit-main>
)
add_ceph_unittest(unittest_mds_quiesce_db)
-target_link_libraries(unittest_mds_quiesce_db ceph-common global)
+target_link_libraries(unittest_mds_quiesce_db ceph-common global Boost::url)
# unittest_mds_quiesce_agent
add_executable(unittest_mds_quiesce_agent
--
2.47.0

View File

@@ -0,0 +1,20 @@
Excerpted from <https://aur.archlinux.org/cgit/aur.git/commit/?h=ceph&id=8c5cc7d8deec002f7596b6d0860859a0a718f12b>.
Original author: Bazaah <github@luxolus.com>
diff --git a/src/mgr/PyModule.cc b/src/mgr/PyModule.cc
index 084cf3ffc1e..010a1177a88 100644
--- a/src/mgr/PyModule.cc
+++ b/src/mgr/PyModule.cc
@@ -36,6 +36,11 @@ std::string PyModule::mgr_store_prefix = "mgr/";
// Courtesy of http://stackoverflow.com/questions/1418015/how-to-get-python-exception-text
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
+// Fix instances of "'BOOST_PP_ITERATION_02' was not declared in this scope; did you mean 'BOOST_PP_ITERATION_05'"
+// and related macro error bullshit that spans 300 lines of errors
+//
+// Apparently you can't include boost/python stuff _and_ have this header defined
+#undef BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
// Boost apparently can't be bothered to fix its own usage of its own
// deprecated features.
#include <boost/python/extract.hpp>

View File

@@ -0,0 +1,621 @@
{
lib,
stdenv,
runCommand,
fetchurl,
fetchFromGitHub,
fetchPypi,
fetchpatch2,
# Build time
autoconf,
automake,
cmake,
ensureNewerSourcesHook,
fmt,
git,
libtool,
makeWrapper,
nasm,
pkg-config,
which,
openssl,
# Tests
nixosTests,
# Runtime dependencies
arrow-cpp,
babeltrace,
# Note when trying to upgrade boost:
# * When upgrading Ceph, it's recommended to check which boost version Ceph uses on Fedora,
# and default to that.
# * The version that Ceph downloads if `-DWITH_SYSTEM_BOOST:BOOL=ON` is not given
# is declared in `cmake/modules/BuildBoost.cmake` line `set(boost_version ...)`.
#
# If you want to upgrade to boost >= 1.86, you need a Ceph version that
# has this PR in:
# https://github.com/ceph/ceph/pull/61312
boost183,
bzip2,
cryptsetup,
cunit,
e2fsprogs,
doxygen,
gperf,
graphviz,
gnugrep,
gtest,
icu,
kmod,
libcap,
libcap_ng,
libnbd,
libnl,
libxml2,
lmdb,
lttng-ust,
lua,
lvm2,
lz4,
oath-toolkit,
openldap,
parted,
python311, # to get an idea which Python versions are supported by Ceph, see upstream `do_cmake.sh` (see `PYBUILD=` variable)
rdkafka,
rocksdb,
snappy,
openssh,
sqlite,
utf8proc,
xfsprogs,
zlib,
zstd,
# Dependencies of overridden Python dependencies, hopefully we can remove these soon.
rustPlatform,
# Optional Dependencies
curl ? null,
expat ? null,
fuse ? null,
libatomic_ops ? null,
libedit ? null,
libs3 ? null,
yasm ? null,
# Mallocs
gperftools ? null,
jemalloc ? null,
# Crypto Dependencies
cryptopp ? null,
nspr ? null,
nss ? null,
# Linux Only Dependencies
linuxHeaders,
util-linux,
libuuid,
udev,
keyutils,
rdma-core,
rabbitmq-c,
libaio ? null,
libxfs ? null,
liburing ? null,
zfs ? null,
...
}:
# We must have one crypto library
assert cryptopp != null || (nss != null && nspr != null);
let
shouldUsePkg =
pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
optYasm = shouldUsePkg yasm;
optExpat = shouldUsePkg expat;
optCurl = shouldUsePkg curl;
optFuse = shouldUsePkg fuse;
optLibedit = shouldUsePkg libedit;
optLibatomic_ops = shouldUsePkg libatomic_ops;
optLibs3 = shouldUsePkg libs3;
optJemalloc = shouldUsePkg jemalloc;
optGperftools = shouldUsePkg gperftools;
optCryptopp = shouldUsePkg cryptopp;
optNss = shouldUsePkg nss;
optNspr = shouldUsePkg nspr;
optLibaio = shouldUsePkg libaio;
optLibxfs = shouldUsePkg libxfs;
optZfs = shouldUsePkg zfs;
# Downgrade rocksdb, 7.10 breaks ceph
rocksdb' = rocksdb.overrideAttrs {
version = "7.9.2";
src = fetchFromGitHub {
owner = "facebook";
repo = "rocksdb";
rev = "refs/tags/v7.9.2";
hash = "sha256-5P7IqJ14EZzDkbjaBvbix04ceGGdlWBuVFH/5dpD5VM=";
};
};
hasRadosgw = optExpat != null && optCurl != null && optLibedit != null;
# Malloc implementation (can be jemalloc, tcmalloc or null)
malloc = if optJemalloc != null then optJemalloc else optGperftools;
# We prefer nss over cryptopp
cryptoStr =
if optNss != null && optNspr != null then
"nss"
else if optCryptopp != null then
"cryptopp"
else
"none";
cryptoLibsMap = {
nss = [
optNss
optNspr
];
cryptopp = [ optCryptopp ];
none = [ ];
};
getMeta = description: {
homepage = "https://ceph.io/en/";
inherit description;
license = with lib.licenses; [
lgpl21
gpl2Only
bsd3
mit
publicDomain
];
maintainers = with lib.maintainers; [
adev
ak
johanot
krav
nh2
benaryorg
];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
};
ceph-common =
with python.pkgs;
buildPythonPackage {
pname = "ceph-common";
format = "setuptools";
inherit src version;
sourceRoot = "ceph-${version}/src/python-common";
propagatedBuildInputs = [
pyyaml
];
nativeCheckInputs = [
pytestCheckHook
];
disabledTests = [
# requires network access
"test_valid_addr"
];
meta = getMeta "Ceph common module for code shared by manager modules";
};
# Watch out for python <> boost compatibility
python = python311.override {
self = python;
packageOverrides =
self: super:
let
bcryptOverrideVersion = "4.0.1";
in
{
# Ceph does not support the following yet:
# * `bcrypt` > 4.0
# * `cryptography` > 40
# See:
# * https://github.com/NixOS/nixpkgs/pull/281858#issuecomment-1899358602
# * Upstream issue: https://tracker.ceph.com/issues/63529
# > Python Sub-Interpreter Model Used by ceph-mgr Incompatible With Python Modules Based on PyO3
# * Moved to issue: https://tracker.ceph.com/issues/64213
# > MGR modules incompatible with later PyO3 versions - PyO3 modules may only be initialized once per interpreter process
bcrypt = super.bcrypt.overridePythonAttrs (old: rec {
pname = "bcrypt";
version = bcryptOverrideVersion;
src = fetchPypi {
inherit pname version;
hash = "sha256-J9N1kDrIJhz+QEf2cJ0W99GNObHskqr3KvmJVSplDr0=";
};
cargoRoot = "src/_bcrypt";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit
pname
version
src
cargoRoot
;
hash = "sha256-8PyCgh/rUO8uynzGdgylAsb5k55dP9fCnf40UOTCR/M=";
};
});
# We pin the older `cryptography` 40 here;
# this also forces us to pin other packages, see below
cryptography = self.callPackage ./old-python-packages/cryptography.nix { };
# This is the most recent version of `pyopenssl` that's still compatible with `cryptography` 40.
# See https://github.com/NixOS/nixpkgs/pull/281858#issuecomment-1899358602
# and https://github.com/pyca/pyopenssl/blob/d9752e44127ba36041b045417af8a0bf16ec4f1e/CHANGELOG.rst#2320-2023-05-30
pyopenssl = super.pyopenssl.overridePythonAttrs (old: rec {
version = "23.1.1";
src = fetchPypi {
pname = "pyOpenSSL";
inherit version;
hash = "sha256-hBSYub7GFiOxtsR+u8AjZ8B9YODhlfGXkIF/EMyNsLc=";
};
disabledTests = old.disabledTests or [ ] ++ [
"test_export_md5_digest"
];
disabledTestPaths = old.disabledTestPaths or [ ] ++ [
"tests/test_ssl.py"
];
propagatedBuildInputs = old.propagatedBuildInputs or [ ] ++ [
self.flaky
];
# hack: avoid building docs due to incompatibility with current sphinx
nativeBuildInputs = [ openssl ]; # old.nativeBuildInputs but without sphinx*
outputs = lib.filter (o: o != "doc") old.outputs;
});
# This is the most recent version of `trustme` that's still compatible with `cryptography` 40.
# See https://github.com/NixOS/nixpkgs/issues/359723
# and https://github.com/python-trio/trustme/commit/586f7759d5c27beb44da60615a71848eb2a5a490
trustme = self.callPackage ./old-python-packages/trustme.nix { };
fastapi = super.fastapi.overridePythonAttrs (old: {
# Flaky test:
# ResourceWarning: Unclosed <MemoryObjectSendStream>
# Unclear whether it's flaky in general or only in this overridden package set.
doCheck = false;
});
# Ceph does not support `kubernetes` >= 19, see:
# https://github.com/NixOS/nixpkgs/pull/281858#issuecomment-1900324090
kubernetes = super.kubernetes.overridePythonAttrs (old: rec {
version = "18.20.0";
src = fetchFromGitHub {
owner = "kubernetes-client";
repo = "python";
rev = "v${version}";
sha256 = "1sawp62j7h0yksmg9jlv4ik9b9i1a1w9syywc9mv8x89wibf5ql1";
fetchSubmodules = true;
};
});
};
};
boost' = boost183.override {
enablePython = true;
inherit python;
};
# TODO: split this off in build and runtime environment
ceph-python-env = python.withPackages (
ps: with ps; [
ceph-common
# build time
cython_0
# debian/control
bcrypt
cherrypy
influxdb
jinja2
kubernetes
natsort
numpy
pecan
prettytable
pyjwt
pyopenssl
python-dateutil
pyyaml
requests
routes
scikit-learn
scipy
setuptools
sphinx
virtualenv
werkzeug
# src/cephadm/zipapp-reqs.txt
markupsafe
# src/pybind/mgr/requirements-required.txt
cryptography
jsonpatch
# src/tools/cephfs/shell/setup.py
cmd2
colorama
]
);
inherit (ceph-python-env.python) sitePackages;
version = "19.2.3";
src = fetchurl {
url = "https://download.ceph.com/tarballs/ceph-${version}.tar.gz";
hash = "sha256-zlgp28C81SZbaFJ4yvQk4ZgYz4K/aZqtcISTO8LscSU=";
};
in
rec {
ceph = stdenv.mkDerivation {
pname = "ceph";
inherit src version;
patches = [
./boost-1.85.patch
(fetchpatch2 {
name = "ceph-boost-1.86-uuid.patch";
url = "https://github.com/ceph/ceph/commit/01306208eac492ee0e67bff143fc32d0551a2a6f.patch?full_index=1";
hash = "sha256-OnDrr72inzGXXYxPFQevsRZImSvI0uuqFHqtFU2dPQE=";
})
# See:
# * <https://github.com/boostorg/python/issues/394>
# * <https://aur.archlinux.org/cgit/aur.git/commit/?h=ceph&id=8c5cc7d8deec002f7596b6d0860859a0a718f12b>
# * <https://github.com/ceph/ceph/pull/60999>
./boost-1.86-PyModule.patch
];
nativeBuildInputs = [
autoconf # `autoreconf` is called, e.g. for `qatlib_ext`
automake # `aclocal` is called, e.g. for `qatlib_ext`
cmake
fmt
git
makeWrapper
libtool # used e.g. for `qatlib_ext`
nasm
pkg-config
python
python.pkgs.python # for the toPythonPath function
python.pkgs.wrapPython
which
(ensureNewerSourcesHook { year = "1980"; })
# for building docs/man-pages presumably
doxygen
graphviz
];
buildInputs =
cryptoLibsMap.${cryptoStr}
++ [
arrow-cpp
babeltrace
boost'
bzip2
# Adding `ceph-python-env` here adds the env's `site-packages` to `PYTHONPATH` during the build.
# This is important, otherwise the build system may not find the Python deps and then
# silently skip installing ceph-volume and other Ceph python tools.
ceph-python-env
cryptsetup
cunit
e2fsprogs # according to `debian/control` file, `ceph-volume` is supposed to use it
gperf
gtest
icu
libcap
libnbd
libnl
libxml2
lmdb
lttng-ust
lua
lvm2 # according to `debian/control` file, e.g. `pvs` command used by `src/ceph-volume/ceph_volume/api/lvm.py`
lz4
malloc
oath-toolkit
openldap
optLibatomic_ops
optLibs3
optYasm
parted # according to `debian/control` file, used by `src/ceph-volume/ceph_volume/util/disk.py`
rdkafka
rocksdb'
snappy
openssh # according to `debian/control` file, `ssh` command used by `cephadm`
sqlite
utf8proc
xfsprogs # according to `debian/control` file, `ceph-volume` is supposed to use it
zlib
zstd
]
++ lib.optionals stdenv.hostPlatform.isLinux [
keyutils
libcap_ng
liburing
libuuid
linuxHeaders
optLibaio
optLibxfs
optZfs
rabbitmq-c
rdma-core
udev
util-linux
]
++ lib.optionals hasRadosgw [
optCurl
optExpat
optFuse
optLibedit
];
# Picked up, amongst others, by `wrapPythonPrograms`.
pythonPath = [
ceph-python-env
"${placeholder "out"}/${ceph-python-env.sitePackages}"
];
# * `unset AS` because otherwise the Ceph CMake build errors with
# configure: error: No modern nasm or yasm found as required. Nasm should be v2.11.01 or later (v2.13 for AVX512) and yasm should be 1.2.0 or later.
# because the code at
# https://github.com/intel/isa-l/blob/633add1b569fe927bace3960d7c84ed9c1b38bb9/configure.ac#L99-L191
# doesn't even consider using `nasm` or `yasm` but instead uses `$AS`
# from `gcc-wrapper`.
# (Ceph's error message is extra confusing, because it says
# `No modern nasm or yasm found` when in fact it found e.g. `nasm`
# but then uses `$AS` instead.
# * replace /sbin and /bin based paths with direct nix store paths
# * increase the `command` buffer size since 2 nix store paths cannot fit within 128 characters
preConfigure = ''
unset AS
substituteInPlace src/common/module.c \
--replace "char command[128];" "char command[256];" \
--replace "/sbin/modinfo" "${kmod}/bin/modinfo" \
--replace "/sbin/modprobe" "${kmod}/bin/modprobe" \
--replace "/bin/grep" "${gnugrep}/bin/grep"
# Patch remount to use full path to mount(8), otherwise ceph-fuse fails when run
# from a systemd unit for example.
substituteInPlace src/client/fuse_ll.cc \
--replace-fail "mount -i -o remount" "${util-linux}/bin/mount -i -o remount"
# The install target needs to be in PYTHONPATH for "*.pth support" check to succeed
export PYTHONPATH=$PYTHONPATH:$lib/${sitePackages}:$out/${sitePackages}
patchShebangs src/
'';
cmakeFlags = [
"-DCMAKE_INSTALL_DATADIR=${placeholder "lib"}/lib"
"-DWITH_CEPHFS_SHELL:BOOL=ON"
"-DWITH_SYSTEMD:BOOL=OFF"
# `WITH_JAEGER` requires `thrift` as a depenedncy (fine), but the build fails with:
# CMake Error at src/opentelemetry-cpp-stamp/opentelemetry-cpp-build-Release.cmake:49 (message):
# Command failed: 2
#
# 'make' 'opentelemetry_trace' 'opentelemetry_exporter_jaeger_trace'
#
# See also
#
# /build/ceph-18.2.0/build/src/opentelemetry-cpp/src/opentelemetry-cpp-stamp/opentelemetry-cpp-build-*.log
# and that file contains:
# /build/ceph-18.2.0/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.cc: In member function 'virtual void opentelemetry::v1::exporter::jaeger::TUDPTransport::close()':
# /build/ceph-18.2.0/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/TUDPTransport.cc:71:7: error: '::close' has not been declared; did you mean 'pclose'?
# 71 | ::THRIFT_CLOSESOCKET(socket_);
# | ^~~~~~~~~~~~~~~~~~
# Looks like `close()` is somehow not included.
# But the relevant code is already removed in `open-telemetry` 1.10: https://github.com/open-telemetry/opentelemetry-cpp/pull/2031
# So it's probably not worth trying to fix that for this Ceph version,
# and instead just disable Ceph's Jaeger support.
"-DWITH_JAEGER:BOOL=OFF"
"-DWITH_TESTS:BOOL=OFF"
# Use our own libraries, where possible
"-DWITH_SYSTEM_ARROW:BOOL=ON" # Only used if other options enable Arrow support.
"-DWITH_SYSTEM_BOOST:BOOL=ON"
"-DWITH_SYSTEM_GTEST:BOOL=ON"
"-DWITH_SYSTEM_ROCKSDB:BOOL=ON"
"-DWITH_SYSTEM_UTF8PROC:BOOL=ON"
"-DWITH_SYSTEM_ZSTD:BOOL=ON"
# Use our own python libraries too, see:
# https://github.com/NixOS/nixpkgs/pull/344993#issuecomment-2391046329
"-DCEPHADM_BUNDLED_DEPENDENCIES=none"
# TODO breaks with sandbox, tries to download stuff with npm
"-DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF"
# WITH_XFS has been set default ON from Ceph 16, keeping it optional in nixpkgs for now
''-DWITH_XFS=${if optLibxfs != null then "ON" else "OFF"}''
]
++ lib.optional stdenv.hostPlatform.isLinux "-DWITH_SYSTEM_LIBURING=ON";
preBuild =
# The legacy-option-headers target is not correctly empbedded in the build graph.
# It also contains some internal race conditions that we work around by building with `-j 1`.
# Upstream discussion for additional context at https://tracker.ceph.com/issues/63402.
''
cmake --build . --target legacy-option-headers -j 1
'';
postFixup = ''
wrapPythonPrograms
wrapProgram $out/bin/ceph-mgr --prefix PYTHONPATH ":" "$(toPythonPath ${placeholder "out"}):$(toPythonPath ${ceph-python-env})"
# Test that ceph-volume exists since the build system has a tendency to
# silently drop it with misconfigurations.
test -f $out/bin/ceph-volume
'';
outputs = [
"out"
"lib"
"dev"
"doc"
"man"
];
doCheck = false; # uses pip to install things from the internet
# Takes 7+h to build with 2 cores.
requiredSystemFeatures = [ "big-parallel" ];
meta = getMeta "Distributed storage system";
passthru = {
inherit version;
inherit python; # to be able to test our overridden packages above individually with `nix-build -A`
tests = {
inherit (nixosTests)
ceph-multi-node
ceph-single-node
ceph-single-node-bluestore
ceph-single-node-bluestore-dmcrypt
;
};
};
};
ceph-client =
runCommand "ceph-client-${version}"
{
meta = getMeta "Tools needed to mount Ceph's RADOS Block Devices/Cephfs";
}
''
mkdir -p $out/{bin,etc,${sitePackages},share/bash-completion/completions}
cp -r ${ceph}/bin/{ceph,.ceph-wrapped,rados,rbd,rbdmap} $out/bin
cp -r ${ceph}/bin/ceph-{authtool,conf,dencoder,rbdnamer,syn} $out/bin
cp -r ${ceph}/bin/rbd-replay* $out/bin
cp -r ${ceph}/sbin/mount.ceph $out/bin
cp -r ${ceph}/sbin/mount.fuse.ceph $out/bin
ln -s bin $out/sbin
cp -r ${ceph}/${sitePackages}/* $out/${sitePackages}
cp -r ${ceph}/etc/bash_completion.d $out/share/bash-completion/completions
# wrapPythonPrograms modifies .ceph-wrapped, so lets just update its paths
substituteInPlace $out/bin/ceph --replace ${ceph} $out
substituteInPlace $out/bin/.ceph-wrapped --replace ${ceph} $out
'';
}

View File

@@ -0,0 +1,36 @@
# This older version only exists because `ceph` needs it, see `cryptography.nix`.
{
buildPythonPackage,
fetchPypi,
lib,
cryptography,
}:
buildPythonPackage rec {
pname = "cryptography-vectors";
# The test vectors must have the same version as the cryptography package
inherit (cryptography) version;
format = "setuptools";
src = fetchPypi {
pname = "cryptography_vectors";
inherit version;
hash = "sha256-hGBwa1tdDOSoVXHKM4nPiPcAu2oMYTPcn+D1ovW9oEE=";
};
# No tests included
doCheck = false;
pythonImportsCheck = [ "cryptography_vectors" ];
meta = with lib; {
description = "Test vectors for the cryptography package";
homepage = "https://cryptography.io/en/latest/development/test-vectors/";
# Source: https://github.com/pyca/cryptography/tree/master/vectors;
license = with licenses; [
asl20
bsd3
];
maintainers = with maintainers; [ nh2 ];
};
}

View File

@@ -0,0 +1,138 @@
# This older version only exists because `ceph` needs it, see its package.
{
lib,
stdenv,
callPackage,
buildPythonPackage,
fetchPypi,
fetchpatch,
rustPlatform,
cargo,
rustc,
setuptoolsRustBuildHook,
openssl,
Security ? null,
isPyPy,
cffi,
pkg-config,
pytestCheckHook,
pytest-subtests,
pythonOlder,
pretend,
libiconv,
libxcrypt,
iso8601,
py,
pytz,
hypothesis,
}:
let
cryptography-vectors = callPackage ./cryptography-vectors.nix { };
in
buildPythonPackage rec {
pname = "cryptography";
version = "40.0.1"; # Also update the hash in vectors.nix
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-KAPy+LHpX2FEGZJsfm9V2CivxhTKXtYVQ4d65mjMNHI=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit
pname
version
src
cargoRoot
;
hash = "sha256-pZHu3Oo9DWRAtldU0UvrH1FIg0bEvyfizPUhj9IBL58=";
};
# Since Cryptography v40 is quite outdated, we need to backport
# security fixes that are only available in newer versions.
patches = [
# Fix https://nvd.nist.gov/vuln/detail/CVE-2023-49083 which has no upstream backport.
# See https://github.com/pyca/cryptography/commit/f09c261ca10a31fe41b1262306db7f8f1da0e48a#diff-f5134bf8f3cf0a5cc8601df55e50697acc866c603a38caff98802bd8e17976c5R1893
./python-cryptography-Cherry-pick-fix-for-CVE-2023-49083-on-cryptography-40.patch
# Fix https://nvd.nist.gov/vuln/detail/CVE-2024-26130
# See https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55
(fetchpatch {
name = "python-cryptography-CVE-2024-26130-dont-crash-when-a-PKCS-12-key-and-cert-dont-match-mmap-mode.patch";
url = "https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55.patch";
hash = "sha256-l45NOzOWhHW4nY4OIRpdjYQRvUW8BROGWdpkAtvVn0Y=";
})
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--benchmark-disable" ""
'';
cargoRoot = "src/rust";
nativeBuildInputs = [
rustPlatform.cargoSetupHook
setuptoolsRustBuildHook
cargo
rustc
pkg-config
]
++ lib.optionals (!isPyPy) [ cffi ];
buildInputs = [
openssl
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
]
++ lib.optionals (pythonOlder "3.9") [ libxcrypt ];
propagatedBuildInputs = lib.optionals (!isPyPy) [ cffi ];
nativeCheckInputs = [
cryptography-vectors
hypothesis
iso8601
pretend
py
pytestCheckHook
pytest-subtests
pytz
];
pytestFlags = [ "--disable-pytest-warnings" ];
disabledTestPaths = [
# save compute time by not running benchmarks
"tests/bench"
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
# aarch64-darwin forbids W+X memory, but this tests depends on it:
# * https://cffi.readthedocs.io/en/latest/using.html#callbacks
"tests/hazmat/backends/test_openssl_memleak.py"
];
meta = with lib; {
description = "Package which provides cryptographic recipes and primitives";
longDescription = ''
Cryptography includes both high level recipes and low level interfaces to
common cryptographic algorithms such as symmetric ciphers, message
digests, and key derivation functions.
Our goal is for it to be your "cryptographic standard library". It
supports Python 2.7, Python 3.5+, and PyPy 5.4+.
'';
homepage = "https://github.com/pyca/cryptography";
changelog =
"https://cryptography.io/en/latest/changelog/#v" + replaceStrings [ "." ] [ "-" ] version;
license = with licenses; [
asl20
bsd3
psfl
];
maintainers = with maintainers; [ nh2 ];
};
}

View File

@@ -0,0 +1,44 @@
commit 08dbad8552ecca85d3e38072f94eb864b143d218
Author: Niklas Hambüchen <mail@nh2.me>
Date: Mon Jan 22 12:52:06 2024 +0000
Cherry-pick fix for CVE-2023-49083
Cherry-Picked-From: f09c261ca10a31fe41b1262306db7f8f1da0e48a
Cherry-Picked-By: Niklas Hambüchen <mail@nh2.me>
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py
index a3fe1bce4..58e7207c4 100644
--- a/src/cryptography/hazmat/backends/openssl/backend.py
+++ b/src/cryptography/hazmat/backends/openssl/backend.py
@@ -2383,9 +2383,12 @@ class Backend:
_Reasons.UNSUPPORTED_SERIALIZATION,
)
+ certs: list[x509.Certificate] = []
+ if p7.d.sign == self._ffi.NULL:
+ return certs
+
sk_x509 = p7.d.sign.cert
num = self._lib.sk_X509_num(sk_x509)
- certs = []
for i in range(num):
x509 = self._lib.sk_X509_value(sk_x509, i)
self.openssl_assert(x509 != self._ffi.NULL)
diff --git a/tests/hazmat/primitives/test_pkcs7.py b/tests/hazmat/primitives/test_pkcs7.py
index 4e61c5ef5..d8170bfb9 100644
--- a/tests/hazmat/primitives/test_pkcs7.py
+++ b/tests/hazmat/primitives/test_pkcs7.py
@@ -89,6 +89,12 @@ class TestPKCS7Loading:
mode="rb",
)
+ def test_load_pkcs7_empty_certificates(self, backend):
+ der = b"\x30\x0B\x06\x09\x2A\x86\x48\x86\xF7\x0D\x01\x07\x02"
+
+ certificates = pkcs7.load_der_pkcs7_certificates(der)
+ assert certificates == []
+
# We have no public verification API and won't be adding one until we get
# some requirements from users so this function exists to give us basic

View File

@@ -0,0 +1,52 @@
# This older version only exists because `ceph` needs it, see its package.
{
lib,
buildPythonPackage,
cryptography,
fetchPypi,
idna,
pyopenssl,
pytestCheckHook,
pythonOlder,
service-identity,
}:
buildPythonPackage rec {
pname = "trustme";
version = "1.1.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-U3Wtf7QnB0vslWWS4NTuKkz02miTThukvPQhcSa8ReY=";
};
propagatedBuildInputs = [
cryptography
idna
];
nativeCheckInputs = [
pyopenssl
pytestCheckHook
service-identity
];
# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "trustme" ];
meta = with lib; {
description = "High quality TLS certs while you wait, for the discerning tester";
homepage = "https://github.com/python-trio/trustme";
changelog = "https://trustme.readthedocs.io/en/latest/#change-history";
license = with licenses; [
mit
asl20
];
maintainers = with maintainers; [ jfly ];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
fuse,
attr,
asciidoc,
}:
stdenv.mkDerivation rec {
pname = "disorderfs";
version = "0.5.11";
src = fetchurl {
url = "http://http.debian.net/debian/pool/main/d/disorderfs/disorderfs_${version}.orig.tar.bz2";
sha256 = "sha256-KqAMKVUykCgVdNyjacZjpVXqVdeob76v0iOuSd4TNIY=";
};
nativeBuildInputs = [
pkg-config
asciidoc
];
buildInputs = [
fuse
attr
];
installFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
description = "Overlay FUSE filesystem that introduces non-determinism into filesystem metadata";
mainProgram = "disorderfs";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ pSub ];
};
}

View File

@@ -0,0 +1,71 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
perl,
gettext,
fuse,
openssl,
tinyxml2,
gtest,
}:
stdenv.mkDerivation rec {
pname = "encfs";
version = "1.9.5";
src = fetchFromGitHub {
sha256 = "099rjb02knr6yz7przlnyj62ic0ag5ncs7vvcc36ikyqrmpqsdch";
rev = "v${version}";
repo = "encfs";
owner = "vgough";
};
patches = lib.optionals stdenv.cc.isClang [
# Fixes a build failure when building with newer versions of clang.
# https://github.com/vgough/encfs/pull/650
(fetchpatch {
url = "https://github.com/vgough/encfs/commit/406b63bfe234864710d1d23329bf41d48001fbfa.patch";
hash = "sha256-VunC5ICRJBgCXqkr7ad7DPzweRJr1bdOpo1LKNCs4zY=";
})
];
buildInputs = [
fuse
openssl
tinyxml2
gtest
];
nativeBuildInputs = [
cmake
pkg-config
perl
gettext
];
strictDeps = true;
cmakeFlags = [
"-DUSE_INTERNAL_TINYXML=OFF"
"-DBUILD_SHARED_LIBS=ON"
"-DINSTALL_LIBENCFS=ON"
# Fix the build with CMake 4.
#
# Upstream is deprecated, so it wont be fixed there. We should
# probably phase this package out.
"-DCMAKE_POLICY_VERSION_MINIMUM=3.10"
];
meta = with lib; {
description = "Encrypted filesystem in user-space via FUSE";
homepage = "https://vgough.github.io/encfs";
license = with licenses; [
gpl3Plus
lgpl3Plus
];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,99 @@
{
lib,
rustPlatform,
fetchFromGitea,
openssl,
pkg-config,
protobuf,
cacert,
nixosTests,
}:
let
generic =
{
version,
hash,
cargoHash,
cargoPatches ? [ ],
eol ? false,
broken ? false,
}:
rustPlatform.buildRustPackage {
pname = "garage";
inherit version;
src = fetchFromGitea {
domain = "git.deuxfleurs.fr";
owner = "Deuxfleurs";
repo = "garage";
rev = "v${version}";
inherit hash;
};
inherit cargoHash cargoPatches;
nativeBuildInputs = [
protobuf
pkg-config
];
buildInputs = [
openssl
];
checkInputs = [
cacert
];
OPENSSL_NO_VENDOR = true;
# See https://git.deuxfleurs.fr/Deuxfleurs/garage/src/tag/v2.1.0/nix/compile.nix#L71-L78
# on version changes for checking if changes are required here
buildFeatures = [
"bundled-libs"
"consul-discovery"
"fjall"
"journald"
"k2v"
"kubernetes-discovery"
"lmdb"
"metrics"
"sqlite"
"syslog"
"telemetry-otlp"
];
passthru.tests = nixosTests."garage_${lib.versions.major version}";
meta = {
description = "S3-compatible object store for small self-hosted geo-distributed deployments";
changelog = "https://git.deuxfleurs.fr/Deuxfleurs/garage/releases/tag/v${version}";
homepage = "https://garagehq.deuxfleurs.fr";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
adamcstephens
nickcao
_0x4A6F
teutat3s
];
knownVulnerabilities = (lib.optional eol "Garage version ${version} is EOL");
inherit broken;
mainProgram = "garage";
};
};
in
rec {
garage_1 = generic {
version = "1.3.0";
hash = "sha256-6w+jun0UmQHmoXcokGpPM95BbQyOKefTeAelAFKxNCM=";
cargoHash = "sha256-mWLsOTWxzMdDfzEDu+WHJ12SVscEVfBVuOTVFbfnk0g=";
};
garage_2 = generic {
version = "2.1.0";
hash = "sha256-GGwF6kVIJ7MPvO6VRj2ebquJEjJQBwpW18P6L2sGVDs=";
cargoHash = "sha256-0pT2fqseN1numJZdC0FFg1JXbDq1YmlmBPQVbOpxtkw=";
};
garage = garage_1;
}

View File

@@ -0,0 +1,111 @@
diff --git a/Cargo.lock b/Cargo.lock
index 23604c99e5..58355d867e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -223,7 +223,7 @@
"http",
"hyper",
"ring",
- "time 0.3.28",
+ "time 0.3.36",
"tokio",
"tower",
"tracing",
@@ -393,7 +393,7 @@
"percent-encoding",
"regex",
"sha2",
- "time 0.3.28",
+ "time 0.3.36",
"tracing",
]
@@ -533,7 +533,7 @@
"itoa",
"num-integer",
"ryu",
- "time 0.3.28",
+ "time 0.3.36",
]
[[package]]
@@ -932,9 +932,12 @@
[[package]]
name = "deranged"
-version = "0.3.8"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+]
[[package]]
name = "derivative"
@@ -2410,6 +2413,12 @@
]
[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
+[[package]]
name = "num-integer"
version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2747,6 +2756,12 @@
]
[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
+[[package]]
name = "ppv-lite86"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3666,11 +3681,13 @@
[[package]]
name = "time"
-version = "0.3.28"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
+ "num-conv",
+ "powerfmt",
"serde",
"time-core",
"time-macros",
@@ -3678,16 +3695,17 @@
[[package]]
name = "time-core"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
-version = "0.2.14"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
+ "num-conv",
"time-core",
]

View File

@@ -0,0 +1,28 @@
diff --git a/Cargo.lock b/Cargo.lock
index 9cb4b57ee5..b23da31151 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4082,9 +4082,9 @@
[[package]]
name = "time"
-version = "0.3.34"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"num-conv",
@@ -4102,9 +4102,9 @@
[[package]]
name = "time-macros"
-version = "0.2.17"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
"num-conv",
"time-core",

View File

@@ -0,0 +1,38 @@
{
lib,
mkDerivation,
fetchgit,
cmake,
extra-cmake-modules,
kio,
fuse3,
}:
mkDerivation rec {
pname = "kio-fuse";
version = "5.1.0";
src = fetchgit {
url = "https://invent.kde.org/system/kio-fuse.git";
hash = "sha256-xVeDNkSeHCk86L07lPVokSgHNkye2tnLoCkdw4g2Jv0=";
rev = "v${version}";
};
nativeBuildInputs = [
cmake
extra-cmake-modules
];
buildInputs = [
kio
fuse3
];
meta = with lib; {
description = "FUSE Interface for KIO";
homepage = "https://invent.kde.org/system/kio-fuse";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ _1000teslas ];
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchFromGitHub,
automake,
autoconf,
pkg-config,
gettext,
libtool,
pandoc,
which,
attr,
libiconv,
}:
stdenv.mkDerivation rec {
pname = "mergerfs";
version = "2.40.2";
src = fetchFromGitHub {
owner = "trapexit";
repo = pname;
rev = version;
sha256 = "sha256-3DfSGuTtM+h0IdtsIhLVXQxX5/Tj9G5Qcha3DWmyyq4=";
};
nativeBuildInputs = [
automake
autoconf
pkg-config
gettext
libtool
pandoc
which
];
prePatch = ''
sed -i -e '/chown/d' -e '/chmod/d' libfuse/Makefile
'';
buildInputs = [
attr
libiconv
];
preConfigure = ''
echo "${version}" > VERSION
'';
makeFlags = [
"DESTDIR=${placeholder "out"}"
"XATTR_AVAILABLE=1"
"PREFIX=/"
"SBINDIR=/bin"
];
enableParallelBuilding = true;
postFixup = ''
ln -srf $out/bin/mergerfs $out/bin/mount.fuse.mergerfs
ln -srf $out/bin/mergerfs $out/bin/mount.mergerfs
'';
meta = {
description = "FUSE based union filesystem";
homepage = "https://github.com/trapexit/mergerfs";
license = lib.licenses.isc;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ makefu ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
coreutils,
makeWrapper,
rsync,
python3,
}:
stdenv.mkDerivation rec {
pname = "mergerfs-tools";
version = "20230912";
src = fetchFromGitHub {
owner = "trapexit";
repo = pname;
rev = "80d6c9511da554009415d67e7c0ead1256c1fc41";
hash = "sha256-9sn2ziIjes2squSGbjjXVch2zDFjQruWB4282p4jWcY=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python3 ];
makeFlags = [
"INSTALL=${coreutils}/bin/install"
"PREFIX=${placeholder "out"}"
];
postInstall = ''
wrapProgram $out/bin/mergerfs.balance --prefix PATH : ${lib.makeBinPath [ rsync ]}
wrapProgram $out/bin/mergerfs.dup --prefix PATH : ${lib.makeBinPath [ rsync ]}
wrapProgram $out/bin/mergerfs.mktrash --prefix PATH : ${lib.makeBinPath [ python3.pkgs.xattr ]}
'';
meta = with lib; {
description = "Optional tools to help manage data in a mergerfs pool";
homepage = "https://github.com/trapexit/mergerfs-tools";
license = licenses.isc;
platforms = platforms.linux;
maintainers = with maintainers; [ makefu ];
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitHub,
pkgsBuildHost,
versionCheckHook,
}:
# Changing the variables CPPFLAGS and BUILD_CONFIG_NAME can be done by
# overriding the same-named attributes. See ./presets.nix for examples.
stdenv.mkDerivation (finalAttrs: {
pname = "mkspiffs";
version = "0.2.3";
src = fetchFromGitHub {
owner = "igrr";
repo = "mkspiffs";
tag = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-oa6Lmo2yb66IjtEKkZyJBgM/p7rdvmrKfgNd2rAM/Lk=";
};
# 1) Fix build for Darwin
# 2) Fix cross
# 3) Do not run test as part of the buildPhase - the checkPhase will run it as `make test`
postPatch = ''
substituteInPlace Makefile \
--replace-fail "-arch i386 -arch x86_64" "" \
--replace-fail "strip" "${pkgsBuildHost.binutils.targetPrefix}strip" \
--replace-fail "dist: test" ""
'';
strictDeps = true;
buildFlags = [ "dist" ];
makeFlags = [
"VERSION=${finalAttrs.version}"
"SPIFFS_VERSION=unknown"
];
installPhase = ''
install -Dm755 -t $out/bin mkspiffs
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
meta = {
description = "Tool to build and unpack SPIFFS images";
license = lib.licenses.mit;
homepage = "https://github.com/igrr/mkspiffs";
maintainers = [ lib.maintainers.haslersn ];
platforms = lib.platforms.all;
mainProgram = "mkspiffs";
};
})

View File

@@ -0,0 +1,23 @@
{ lib, mkspiffs }:
# We provide the same presets as the upstream
lib.mapAttrs
(
name:
{ CPPFLAGS }:
mkspiffs.overrideAttrs {
inherit CPPFLAGS;
BUILD_CONFIG_NAME = "-${name}";
}
)
{
arduino-esp8266.CPPFLAGS = [
"-DSPIFFS_USE_MAGIC_LENGTH=0"
"-DSPIFFS_ALIGNED_OBJECT_INDEX_TABLES=1"
];
arduino-esp32.CPPFLAGS = [ "-DSPIFFS_OBJ_META_LEN=4" ];
esp-idf.CPPFLAGS = [ "-DSPIFFS_OBJ_META_LEN=4" ];
}

View File

@@ -0,0 +1,107 @@
{
stdenv,
lib,
gitUpdater,
testers,
fetchFromGitHub,
meson,
ninja,
pkg-config,
bison,
flex,
libiconv,
libpng,
libjpeg,
libwebp,
zlib,
withGUI ? true,
qtbase ? null,
wrapQtAppsHook ? null,
}:
assert withGUI -> qtbase != null && wrapQtAppsHook != null;
stdenv.mkDerivation (finalAttrs: {
pname = "alice-tools" + lib.optionalString withGUI "-qt${lib.versions.major qtbase.version}";
version = "0.13.0";
src = fetchFromGitHub {
owner = "nunuhara";
repo = "alice-tools";
rev = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-DazWnBeI5XShkIx41GFZLP3BbE0O8T9uflvKIZUXCHo=";
};
postPatch = lib.optionalString (withGUI && lib.versionAtLeast qtbase.version "6.0") ''
# Use Meson's Qt6 module
substituteInPlace src/meson.build \
--replace qt5 qt6
# For some reason Meson uses QMake instead of pkg-config detection method for Qt6 on Darwin, which gives wrong search paths for tools
export PATH=${qtbase.dev}/libexec:$PATH
'';
mesonFlags = lib.optionals (withGUI && lib.versionAtLeast qtbase.version "6.0") [
# Qt6 requires at least C++17, project uses compiler's default, default too old on Darwin & aarch64-linux
"-Dcpp_std=c++17"
];
nativeBuildInputs = [
meson
ninja
pkg-config
bison
flex
]
++ lib.optionals withGUI [
wrapQtAppsHook
];
buildInputs = [
libiconv
libpng
libjpeg
libwebp
zlib
]
++ lib.optionals withGUI [
qtbase
];
dontWrapQtApps = true;
# Default install step only installs a static library of a build dependency
installPhase = ''
runHook preInstall
install -Dm755 src/alice $out/bin/alice
''
+ lib.optionalString withGUI ''
install -Dm755 src/galice $out/bin/galice
wrapQtApp $out/bin/galice
''
+ ''
runHook postInstall
'';
passthru = {
updateScript = gitUpdater { };
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command =
lib.optionalString withGUI "env QT_QPA_PLATFORM=minimal "
+ "${lib.getExe finalAttrs.finalPackage} --version";
};
};
meta = with lib; {
description = "Tools for extracting/editing files from AliceSoft games";
homepage = "https://github.com/nunuhara/alice-tools";
license = licenses.gpl2Plus;
platforms = platforms.all;
maintainers = with maintainers; [ OPNA2608 ];
mainProgram = if withGUI then "galice" else "alice";
};
})

View File

@@ -0,0 +1,117 @@
{
lib,
stdenv,
fetchFromGitHub,
libgamemode32,
makeWrapper,
meson,
ninja,
pkg-config,
dbus,
inih,
systemd,
appstream,
findutils,
gawk,
procps,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gamemode";
version = "1.8.2";
src = fetchFromGitHub {
owner = "FeralInteractive";
repo = "gamemode";
tag = finalAttrs.version;
hash = "sha256-V0rewbSVOGFqJqXyCz4jXpuDM0EfjdkpGPl+WdDwI5I=";
};
outputs = [
"out"
"dev"
"lib"
"man"
];
patches = [
# Add @libraryPath@ template variable to fix loading the PRELOAD library
./preload-nix-workaround.patch
];
postPatch = ''
substituteInPlace data/gamemoderun \
--subst-var-by libraryPath ${
lib.makeLibraryPath (
[
(placeholder "lib")
]
++ lib.optionals (stdenv.hostPlatform.system == "x86_64-linux") [
# Support wrapping 32bit applications on a 64bit linux system
libgamemode32
]
)
}
'';
nativeBuildInputs = [
makeWrapper
meson
ninja
pkg-config
];
buildInputs = [
dbus
inih
systemd
];
mesonFlags = [
"-Dwith-pam-limits-dir=etc/security/limits.d"
"-Dwith-systemd-user-unit-dir=lib/systemd/user"
"-Dwith-systemd-group-dir=lib/sysusers.d"
# The meson builder installs internal executables to $lib/lib by
# default, but they should be installed to "$out". It's also more
# appropriate to install these executables under a libexec
# directory instead of lib.
"--libexecdir=libexec"
];
doCheck = true;
nativeCheckInputs = [
appstream
];
postFixup = ''
# Add $lib/lib to gamemoded & gamemode-simulate-game's rpath since
# they use dlopen to load libgamemode. Can't use makeWrapper since
# it would break the security wrapper in the NixOS module.
for bin in "$out/bin/gamemoded" "$out/bin/gamemode-simulate-game"; do
patchelf --set-rpath "$lib/lib:$(patchelf --print-rpath "$bin")" "$bin"
done
wrapProgram "$out/bin/gamemodelist" \
--prefix PATH : ${
lib.makeBinPath [
findutils
gawk
procps
]
}
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Optimise Linux system performance on demand";
homepage = "https://feralinteractive.github.io/gamemode";
changelog = "https://github.com/FeralInteractive/gamemode/blob/${finalAttrs.version}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = with maintainers; [ kira-bruneau ];
platforms = platforms.linux;
mainProgram = "gamemoderun"; # Requires NixOS module to run
};
})

View File

@@ -0,0 +1,12 @@
diff --git a/data/gamemoderun b/data/gamemoderun
index 573b3e4..6f2799e 100755
--- a/data/gamemoderun
+++ b/data/gamemoderun
@@ -5,5 +5,6 @@ GAMEMODEAUTO_NAME="libgamemodeauto.so.0"
# ld will find the right path to load the library, including for 32-bit apps.
LD_PRELOAD="${GAMEMODEAUTO_NAME}${LD_PRELOAD:+:$LD_PRELOAD}"
+LD_LIBRARY_PATH="@libraryPath@${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
-exec env LD_PRELOAD="${LD_PRELOAD}" $GAMEMODERUNEXEC "$@"
+exec env LD_PRELOAD="${LD_PRELOAD}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" $GAMEMODERUNEXEC "$@"

View File

@@ -0,0 +1,16 @@
{
recurseIntoAttrs,
callPackage,
lib,
}:
# All versions are taken from `version.json` created by `update.py`, and realised with `generic.nix`.
# The `update.py` is a web scraper script that writes the latest versions into `version.json`.
# The `versions.json` can be automatically updated and committed with a commit summary.
# To do so, change directory to nixpkgs root, and do:
# $ nix-shell ./maintainers/scripts/update.nix --argstr package optifinePackages.optifine-latest --argstr commit true
recurseIntoAttrs (
lib.mapAttrs (name: value: callPackage ./generic.nix value) (lib.importJSON ./versions.json)
)

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