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,42 @@
{
stdenv,
lib,
fetchurl,
cmake,
buildPackages,
pkg-config,
python3,
rinutils,
}:
stdenv.mkDerivation rec {
pname = "black-hole-solver";
version = "1.14.0";
src = fetchurl {
url = "https://fc-solve.shlomifish.org/downloads/fc-solve/${pname}-${version}.tar.xz";
sha256 = "sha256-XEe9CT27Fg9LCQ/WcKt8ErQ3HTmxezu9jGxKEpdVV8A=";
};
nativeBuildInputs = [
cmake
(buildPackages.perl.withPackages (ps: [ ps.PathTiny ]))
pkg-config
python3
];
buildInputs = [
rinutils
];
prePatch = ''
patchShebangs ./scripts
'';
meta = {
description = "Solver for Solitaire variants Golf, Black Hole, and All in a Row";
mainProgram = "black-hole-solve";
homepage = "https://www.shlomifish.org/open-source/projects/black-hole-solitaire-solver/";
license = lib.licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
gtk-engine-murrine,
}:
stdenv.mkDerivation {
pname = "Blackbird";
version = "2017-12-13";
src = fetchFromGitHub {
repo = "Blackbird";
owner = "shimmerproject";
rev = "a1c5674c0ec38b4cc8ba41d2c0e6187987ae7eb4";
sha256 = "0xskcw36ci2ykra5gir5pkrawh2qkcv18p4fp2kxivssbd20d4jw";
};
nativeBuildInputs = [ autoreconfHook ];
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
meta = {
description = "Dark Desktop Suite for Gtk, Xfce and Metacity";
homepage = "https://github.com/shimmerproject/Blackbird";
license = with lib.licenses; [
gpl2Plus
cc-by-nc-sa-30
];
platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.romildo ];
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchFromGitLab,
meson,
ninja,
pkg-config,
vala,
gobject-introspection,
gtk4,
gtk3,
desktop-file-utils,
}:
stdenv.mkDerivation {
pname = "marble";
version = "unstable-2023-05-11";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "raggesilver";
repo = "marble";
# the same used on flatpak
rev = "f240b2ec7d5cdacb8fdcc553703420dc5101ffdb";
sha256 = "sha256-obtz7zOyEZPgi/NNjtLr6aFm/1UVTzjTdJpN3JQfpUs=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
vala
gtk3 # For gtk-update-icon-cache
desktop-file-utils # For update-desktop-database
gobject-introspection # For g-ir-compiler
];
buildInputs = [ gtk4 ];
meta = with lib; {
description = "Raggesilver's GTK library";
homepage = "https://gitlab.gnome.org/raggesilver/marble";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ chuangzhu ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,119 @@
{
lib,
stdenv,
fetchFromGitLab,
fetchpatch,
meson,
ninja,
pkg-config,
vala,
gtk4,
vte-gtk4,
json-glib,
sassc,
libadwaita,
pcre2,
libsixel,
libxml2,
librsvg,
libgee,
callPackage,
python3,
desktop-file-utils,
wrapGAppsHook4,
sixelSupport ? false,
}:
let
marble = callPackage ./marble.nix { };
in
stdenv.mkDerivation rec {
pname = "blackbox";
version = "0.14.0";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "raggesilver";
repo = "blackbox";
rev = "v${version}";
hash = "sha256-ebwh9WTooJuvYFIygDBn9lYC7+lx9P1HskvKU8EX9jw=";
};
patches = [
# Fix closing confirmation dialogs not showing
(fetchpatch {
url = "https://gitlab.gnome.org/raggesilver/blackbox/-/commit/3978c9b666d27adba835dd47cf55e21515b6d6d9.patch";
hash = "sha256-L/Ci4YqYNzb3F49bUwEWSjzr03MIPK9A5FEJCCct+7A=";
})
# Fix build with GCC 14
# https://gitlab.gnome.org/GNOME/vala/-/merge_requests/369#note_1986032
# https://gitlab.gnome.org/raggesilver/blackbox/-/merge_requests/143
(fetchpatch {
url = "https://gitlab.gnome.org/raggesilver/blackbox/-/commit/2f45717f1c18f710d9b9fbf21830027c8f0794e7.patch";
hash = "sha256-VlXttqOTbhD6Rp7ZODgsafOjeY+Lb5sZP277bC9ENXU=";
})
];
postPatch = ''
substituteInPlace build-aux/meson/postinstall.py \
--replace-fail 'gtk-update-icon-cache' 'gtk4-update-icon-cache'
patchShebangs build-aux/meson/postinstall.py
'';
nativeBuildInputs = [
meson
ninja
pkg-config
vala
sassc
wrapGAppsHook4
python3
desktop-file-utils # For update-desktop-database
];
buildInputs = [
gtk4
(vte-gtk4.overrideAttrs (
old:
{
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = "vte";
rev = "3c8f66be867aca6656e4109ce880b6ea7431b895";
hash = "sha256-vz9ircmPy2Q4fxNnjurkgJtuTSS49rBq/m61p1B43eU=";
};
patches = lib.optional (old ? patches) (lib.head old.patches);
postPatch = (old.postPatch or "") + ''
patchShebangs src/box_drawing_generate.sh
'';
}
// lib.optionalAttrs sixelSupport {
buildInputs = old.buildInputs ++ [ libsixel ];
mesonFlags = old.mesonFlags ++ [ "-Dsixel=true" ];
}
))
json-glib
marble
libadwaita
pcre2
libxml2
librsvg
libgee
];
mesonFlags = [ "-Dblackbox_is_flatpak=false" ];
meta = {
description = "Beautiful GTK 4 terminal";
mainProgram = "blackbox";
homepage = "https://gitlab.gnome.org/raggesilver/blackbox";
changelog = "https://gitlab.gnome.org/raggesilver/blackbox/-/raw/v${version}/CHANGELOG.md";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
chuangzhu
linsui
];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,119 @@
{
stdenv,
lib,
fetchurl,
dpkg,
writeShellScript,
curl,
jq,
common-updater-scripts,
}:
stdenv.mkDerivation rec {
pname = "blackfire";
version = "2.29.1";
src =
passthru.sources.${stdenv.hostPlatform.system}
or (throw "Unsupported platform for blackfire: ${stdenv.hostPlatform.system}");
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
dpkg
];
dontUnpack = true;
installPhase = ''
runHook preInstall
if ${lib.boolToString stdenv.hostPlatform.isLinux}
then
dpkg-deb -x $src $out
mv $out/usr/* $out
rmdir $out/usr
# Fix ExecStart path and replace deprecated directory creation method,
# use dynamic user.
substituteInPlace "$out/lib/systemd/system/blackfire-agent.service" \
--replace-fail '/usr/' "$out/" \
--replace-fail 'ExecStartPre=/bin/mkdir -p /var/run/blackfire' 'RuntimeDirectory=blackfire' \
--replace-fail 'ExecStartPre=/bin/chown blackfire: /var/run/blackfire' "" \
--replace-fail 'User=blackfire' 'DynamicUser=yes' \
--replace-fail 'PermissionsStartOnly=true' ""
# Modernize socket path.
substituteInPlace "$out/etc/blackfire/agent" \
--replace-fail '/var/run' '/run'
else
mkdir $out
tar -zxvf $src
mv etc $out
mv usr/* $out
fi
runHook postInstall
'';
passthru = {
sources = {
"x86_64-linux" = fetchurl {
url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_amd64.deb";
sha256 = "n4jG21FgJbRtxhQSxXNKNFJHPqb9CmQFMd2P3+vnHVE=";
};
"i686-linux" = fetchurl {
url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_i386.deb";
sha256 = "eX8kMQM9ofssQ9USft69ZzMV/pl1CV5EnUMgxOLuIcA=";
};
"aarch64-linux" = fetchurl {
url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_arm64.deb";
sha256 = "LCqGWc/KJHa5YA1Ex35qI/wVbe1leBwPeG6SUlxrpvY=";
};
"aarch64-darwin" = fetchurl {
url = "https://packages.blackfire.io/blackfire/${version}/blackfire-darwin_arm64.pkg.tar.gz";
sha256 = "RlTCB0lARb94dwDnDh9L6QYMZXTD/v5Ae756RETias0=";
};
"x86_64-darwin" = fetchurl {
url = "https://packages.blackfire.io/blackfire/${version}/blackfire-darwin_amd64.pkg.tar.gz";
sha256 = "PGfBHkKOSd4uRKWW95MwyFRD7SWQzck9g6Jk/mWC384=";
};
};
updateScript = writeShellScript "update-blackfire" ''
set -o errexit
export PATH="${
lib.makeBinPath [
curl
jq
common-updater-scripts
]
}"
NEW_VERSION=$(curl -s https://blackfire.io/api/v1/releases | jq .cli --raw-output)
if [[ "${version}" = "$NEW_VERSION" ]]; then
echo "The new version same as the old version."
exit 0
fi
for platform in ${lib.escapeShellArgs meta.platforms}; do
update-source-version "blackfire" "$NEW_VERSION" --ignore-same-version --source-key="sources.$platform"
done
'';
};
meta = with lib; {
description = "Profiler agent and client";
homepage = "https://blackfire.io/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = [ ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"i686-linux"
"x86_64-darwin"
"aarch64-darwin"
];
};
}

View File

@@ -0,0 +1,169 @@
{
stdenv,
lib,
fetchurl,
autoPatchelfHook,
php,
writeShellScript,
curl,
jq,
common-updater-scripts,
}:
assert lib.assertMsg (!php.ztsSupport) "blackfire only supports non zts versions of PHP";
let
phpMajor = lib.versions.majorMinor php.version;
inherit (stdenv.hostPlatform) system;
version = "1.92.42";
hashes = {
"x86_64-linux" = {
system = "amd64";
hash = {
"8.1" = "sha256-vj/Z7fGQqUfWOpCi2TV4tiu2LCdTPhUJXeinL09LgeM=";
"8.2" = "sha256-K1h0fH9PH/LT+8EecJ0GTJxpuc4hszG9mbcvNc/6bEs=";
"8.3" = "sha256-U0meas8ZMPnlDuMsMoGLYBZsRBrrSmTSuryhFRmzZ/4=";
"8.4" = "sha256-znvTd6QR+rfRQG1w0SEWgEDxzBWiVWOf7VH25b2Sryo=";
};
};
"i686-linux" = {
system = "i386";
hash = {
"8.1" = "sha256-B2FcYKVz4sDSUlI5QifUCbX7XZME2XqaAhUVnHH+C2s=";
"8.2" = "sha256-k6C7Wl9O0icBQjYOjO0Hy0NitKbM9TOxTV0F4OM04LQ=";
"8.3" = "sha256-4EaRYLJ1I7oH0Ux1/IrOD67iWVKx9GU1uMVUA0AwrRk=";
"8.4" = "sha256-aNcl27Do6NoCuUHiFeDwTSVU1m0imxrMR+yiyq7/owQ=";
};
};
"aarch64-linux" = {
system = "arm64";
hash = {
"8.1" = "sha256-5PcD4HnlZmgkP+fsZhBaDGbDQCoQ/Om3om3cpouTF8s=";
"8.2" = "sha256-wIa2Yv4q0d3jtNvMAFTq8d3Gznl88uhqyvCBtwJtMkY=";
"8.3" = "sha256-Fwhv7rVGsmXFcBR5E17S4tt1mEzYlxbzaz996sqbwxs=";
"8.4" = "sha256-ftsKeJ/TOJAavNt8VGSzJR+Bo/KcW+o5Dym2flbHxag=";
};
};
"aarch64-darwin" = {
system = "arm64";
hash = {
"8.1" = "sha256-MR4Icjufw5dSxRKv1gJPP38Vow+PZp2/OofKOGkr/Nk=";
"8.2" = "sha256-RRwF0NKhGxZH0SNOGzr2eVg6ZDDThNgd9HBgv+Q9wCw=";
"8.3" = "sha256-91uv7sxf19+12/Rja1SehbIKBiE+teZv+F0lOi7KUEQ=";
"8.4" = "sha256-v4SnkF4DtPpB5TBiSnJYJs+KRI5IpIcKeQECVCrkdLw=";
};
};
"x86_64-darwin" = {
system = "amd64";
hash = {
"8.1" = "sha256-HzBzT8pTsc/iIMDcEQlb24f8EIYdhRqxKjb7FxB6OaY=";
"8.2" = "sha256-Tr9quIzQWmSMHpvZ18u2OoCP16CHpcbWxKyZeY4zJJM=";
"8.3" = "sha256-PmPxE29qwHJKSaTdoZQiJcwobkDMKMEcEB8ZZWFonb4=";
"8.4" = "sha256-f+Hn9yCtaDmWendB85ca4+6xd9eG3y+5tLTV7Qi9lPA=";
};
};
};
makeSource =
{ system, phpMajor }:
let
isLinux = builtins.match ".+-linux" system != null;
in
fetchurl {
url = "https://packages.blackfire.io/binaries/blackfire-php/${version}/blackfire-php-${
if isLinux then "linux" else "darwin"
}_${hashes.${system}.system}-php-${builtins.replaceStrings [ "." ] [ "" ] phpMajor}.so";
hash = hashes.${system}.hash.${phpMajor};
};
in
assert lib.assertMsg (
hashes ? ${system}.hash.${phpMajor}
) "blackfire does not support PHP version ${phpMajor} on ${system}.";
stdenv.mkDerivation (finalAttrs: {
pname = "php-blackfire";
extensionName = "blackfire";
inherit version;
src = makeSource {
inherit system phpMajor;
};
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
autoPatchelfHook
];
sourceRoot = ".";
dontUnpack = true;
installPhase = ''
runHook preInstall
install -D ${finalAttrs.src} $out/lib/php/extensions/blackfire.so
runHook postInstall
'';
passthru = {
updateScript = writeShellScript "update-${finalAttrs.pname}" ''
set -o errexit
export PATH="${
lib.makeBinPath [
curl
jq
common-updater-scripts
]
}"
NEW_VERSION=$(curl --silent https://blackfire.io/api/v1/releases | jq .probe.php --raw-output)
if [[ "${version}" = "$NEW_VERSION" ]]; then
echo "The new version same as the old version."
exit 0
fi
for source in ${lib.concatStringsSep " " (builtins.attrNames finalAttrs.passthru.updateables)}; do
update-source-version "$UPDATE_NIX_ATTR_PATH.updateables.$source" "$NEW_VERSION" --ignore-same-version
done
'';
# All sources for updating by the update script.
updateables =
let
createName =
{ phpMajor, system }: "php${builtins.replaceStrings [ "." ] [ "" ] phpMajor}_${system}";
createUpdateable =
sourceParams:
lib.nameValuePair (createName sourceParams) (
finalAttrs.finalPackage.overrideAttrs (attrs: {
src = makeSource sourceParams;
})
);
in
lib.concatMapAttrs (
system:
{ hash, ... }:
lib.mapAttrs' (phpMajor: _hash: createUpdateable { inherit phpMajor system; }) hash
) hashes;
};
meta = {
description = "Blackfire Profiler PHP module";
homepage = "https://blackfire.io/";
license = lib.licenses.unfree;
maintainers = [ ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"i686-linux"
"x86_64-darwin"
"aarch64-darwin"
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})

View File

@@ -0,0 +1,141 @@
{
autoPatchelfHook,
cacert,
common-updater-scripts,
curl,
gcc,
jq,
lib,
libGL,
libcxx,
runCommandLocal,
stdenv,
writeShellApplication,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blackmagic-desktop-video";
version = "15.1";
buildInputs = [
autoPatchelfHook
libcxx
libGL
gcc.cc.lib
];
# yes, the below download function is an absolute mess.
# blame blackmagicdesign.
src =
runCommandLocal "${finalAttrs.pname}-${lib.versions.majorMinor finalAttrs.version}-src.tar.gz"
{
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "sha256-nZXfUbUyk9PDhBeXUHGt6T95hfMMDEH1oOgcm1wwi3E=";
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
nativeBuildInputs = [
curl
jq
];
# ENV VARS
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
DOWNLOADSURL = "https://www.blackmagicdesign.com/api/support/us/downloads.json";
USERAGENT = builtins.concatStringsSep " " [
"User-Agent: Mozilla/5.0 (X11; Linux ${stdenv.hostPlatform.linuxArch})"
"AppleWebKit/537.36 (KHTML, like Gecko)"
"Chrome/77.0.3865.75"
"Safari/537.36"
];
REQJSON = builtins.toJSON {
"country" = "nl";
"downloadOnly" = true;
"platform" = "Linux";
"policy" = true;
};
PRODUCT = "Desktop Video";
VERSION = finalAttrs.version;
}
''
DOWNLOADID=$(
curl --silent --compressed "$DOWNLOADSURL" \
| jq --raw-output '.downloads[] | .urls.Linux?[]? | select(.downloadTitle | test("^'"$PRODUCT $VERSION"'( Update)?$")) | .downloadId'
)
REFERID=$(
curl --silent --compressed "$DOWNLOADSURL" \
| jq --raw-output '.downloads[] | .urls.Linux?[]? | select(.downloadTitle | test("^'"$PRODUCT $VERSION"'( Update)?$")) | .releaseId'
)
echo "Download ID is $DOWNLOADID"
echo "Refer ID is $REFERID"
test -n "$REFERID"
test -n "$DOWNLOADID"
SITEURL="https://www.blackmagicdesign.com/api/register/us/download/$DOWNLOADID";
RESOLVEURL=$(curl \
-s \
-H "$USERAGENT" \
-H 'Content-Type: application/json;charset=UTF-8' \
-H "Referer: https://www.blackmagicdesign.com/support/download/$REFERID/Linux" \
--data-ascii "$REQJSON" \
--compressed \
"$SITEURL")
curl \
--retry 3 --retry-delay 3 \
--compressed \
"$RESOLVEURL" \
> $out
'';
passthru.updateScript = lib.getExe (writeShellApplication {
# mostly stolen from pkgs/by-name/da/davinci-resolve/package.nix :)
name = "update-blackmagic-desktop-video";
runtimeInputs = [
common-updater-scripts
curl
jq
];
text = ''
set -o errexit
downloadsJSON="$(curl --fail --silent https://www.blackmagicdesign.com/api/support/us/downloads.json)"
latestLinuxVersion="$(echo "$downloadsJSON" | jq '[.downloads[] | select(.urls.Linux) | .urls.Linux[] | select(.downloadTitle | test("Desktop Video")) | .downloadTitle]' | grep -oP 'Desktop Video \K\d\d\.\d+(\.\d+)?' | sort | tail -n 1)"
update-source-version blackmagic-desktop-video "$latestLinuxVersion"
'';
});
postUnpack =
let
arch = stdenv.hostPlatform.uname.processor;
in
''
tar xf Blackmagic_Desktop_Video_Linux_${finalAttrs.version}/other/${arch}/desktopvideo-${finalAttrs.version}*-${arch}.tar.gz
unpacked=$NIX_BUILD_TOP/desktopvideo-${finalAttrs.version}*-${stdenv.hostPlatform.uname.processor}
'';
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/doc,lib/systemd/system}
cp -r $unpacked/usr/share/doc/desktopvideo $out/share/doc
cp $unpacked/usr/lib/*.so $out/lib
cp $unpacked/usr/lib/systemd/system/DesktopVideoHelper.service $out/lib/systemd/system
cp $unpacked/usr/lib/blackmagic/DesktopVideo/DesktopVideoHelper $out/bin/
substituteInPlace $out/lib/systemd/system/DesktopVideoHelper.service \
--replace-fail "/usr/lib/blackmagic/DesktopVideo/DesktopVideoHelper" "$out/bin/DesktopVideoHelper"
runHook postInstall
'';
# need to tell the DesktopVideoHelper where to find its own library
appendRunpaths = [ "${placeholder "out"}/lib" ];
meta = with lib; {
homepage = "https://www.blackmagicdesign.com/support/family/capture-and-playback";
maintainers = [ maintainers.naxdy ];
license = licenses.unfree;
description = "Supporting applications for Blackmagic Decklink. Doesn't include the desktop applications, only the helper required to make the driver work";
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,143 @@
{
stdenv,
lib,
fetchFromGitHub,
gcc-arm-embedded-13,
pkg-config,
meson,
ninja,
hidapi,
libftdi1,
libusb1,
libgpiod_1,
versionCheckHook,
udevCheckHook,
}:
let
libopencm3Src = fetchFromGitHub {
owner = "libopencm3";
repo = "libopencm3";
rev = "8a96a9d95a8e5c187a53652540b25a8f4d73a432";
hash = "sha256-PylP95hpPeg3rqfelHW9qz+pi/qOP60RfvkurxbkWDs=";
};
ctxlinkWinc1500Src = fetchFromGitHub {
owner = "sidprice";
repo = "ctxlink_winc1500";
rev = "debeab9516e33622439f727a68bddabcdf52c528";
hash = "sha256-IWLIJu2XuwsnP8/2C9uj09EBU2VtwTke3XXbc3NyZt4=";
};
in
stdenv.mkDerivation rec {
pname = "blackmagic";
version = "2.0.0";
# `git describe --always`
firmwareVersion = "v${version}";
src = fetchFromGitHub {
owner = "blackmagic-debug";
repo = "blackmagic";
rev = firmwareVersion;
hash = "sha256-JbPeN0seSkxV2uZ8BvsvjDUBMOyJu2BxqMgNkhLOiFI=";
};
nativeBuildInputs = [
gcc-arm-embedded-13 # fails to build with 14
pkg-config
meson
ninja
udevCheckHook
];
buildInputs = [
hidapi
libftdi1
libusb1
]
++ lib.optional stdenv.hostPlatform.isLinux libgpiod_1;
strictDeps = true;
postUnpack = ''
mkdir -p $sourceRoot/deps/libopencm3
cp -r ${libopencm3Src}/* $sourceRoot/deps/libopencm3/
mkdir -p $sourceRoot/deps/winc1500
cp -r ${ctxlinkWinc1500Src}/* $sourceRoot/deps/winc1500/
'';
buildPhase = ''
runHook preBuild
echo "Building host cli"
meson compile -C .
echo "Building probe firmware"
pushd ..
for cf in cross-file/*.ini; do
target=$(basename "''${cf%.ini}")
if [ "$target" = "arm-none-eabi" ]; then
echo "Skipping arm-none-eabi target"
continue
fi
echo "Building target: $target"
mkdir -p "build/firmware/$target"
meson setup "build/firmware/$target" --cross-file "$cf"
meson compile -C "build/firmware/$target"
done
popd
runHook postBuild
'';
installPhase = ''
runHook preInstall
echo "Installing host cli"
install -Dm555 blackmagic $out/bin/blackmagic
echo "Installing probe firmware"
for targetDir in firmware/*; do
target=$(basename "$targetDir")
echo "Installing firmware for target: $target"
for f in $targetDir/*.{bin,elf}; do
install -Dm444 $f $out/firmware/$target/$(basename "$f")
done
done
echo "Installing udev rules"
install -Dm444 ../driver/99-blackmagic-plugdev.rules $out/lib/udev/rules.d/99-blackmagic-plugdev.rules
runHook postInstall
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--help";
doInstallCheck = true;
meta = with lib; {
description = "In-application debugger for ARM Cortex microcontrollers";
mainProgram = "blackmagic";
longDescription = ''
The Black Magic Probe is a modern, in-application debugging tool
for embedded microprocessors. It allows you to see what is going
on "inside" an application running on an embedded microprocessor
while it executes.
This package builds the firmware for all supported platforms,
placing them in separate directories under the firmware
directory. It also places the FTDI version of the blackmagic
executable in the bin directory.
'';
homepage = "https://github.com/blacksphere/blackmagic";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
pjones
sorki
carlossless
];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
fetchFromGitHub,
stdenvNoCC,
}:
stdenvNoCC.mkDerivation {
pname = "blackout";
version = "2014-07-29";
src = fetchFromGitHub {
owner = "theleagueof";
repo = "blackout";
rev = "4864cfc1749590e9f78549c6e57116fe98480c0f";
hash = "sha256-UmJVmtuPQYW/w+mdnJw9Ql4R1xf/07l+/Ky1wX9WKqw=";
};
installPhase = ''
runHook preInstall
install -D -m444 -t $out/share/fonts/truetype $src/*.ttf
runHook postInstall
'';
meta = {
description = "Bad-ass, unholy-mother-shut-your-mouth stencil sans-serif";
longDescription = ''
Eats holes for breakfast lunch and dinner. Inspired by filling in
sans-serif newspaper headlines. Continually updated with coffee and
music. Makes your work louder than the next persons.
Comes in three styles: Midnight (solid), 2AM (reversed), & Sunrise
(stroked).
'';
homepage = "https://www.theleagueofmoveabletype.com/blackout";
license = lib.licenses.ofl;
maintainers = with lib.maintainers; [ minijackson ];
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromSourcehut,
glfw,
libGL,
libGLU,
libsndfile,
openal,
zig_0_14,
runCommand,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blackshades";
version = "2.5.2-unstable-2025-03-12";
src = fetchFromSourcehut {
owner = "~cnx";
repo = "blackshades";
rev = "a2fbe0e08bedbbbb1089dbb8f3e3cb4d76917bd0";
fetchSubmodules = true;
hash = "sha256-W6ltmWCw7jfiTiNlh60YVF7mz//8s+bgu4F9gy5cDgw=";
};
postUnpack = ''
ln -s ${
zig_0_14.fetchDeps {
inherit (finalAttrs)
src
pname
version
;
hash = "sha256-wBIfLeaKtTow2Z7gjEgIFmqcTGWgpRWI+k0t294BslM=";
}
} $ZIG_GLOBAL_CACHE_DIR/p
'';
nativeBuildInputs = [ zig_0_14.hook ];
buildInputs = [
glfw
libGLU
libGL
libsndfile
openal
];
meta = {
homepage = "https://sr.ht/~cnx/blackshades";
description = "Psychic bodyguard FPS";
changelog = "https://git.sr.ht/~cnx/blackshades/refs/${finalAttrs.version}";
mainProgram = "blackshades";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ McSinyx ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,84 @@
{
lib,
stdenv,
fetchFromGitHub,
makeDesktopItem,
imagemagick,
glew110,
SDL_compat,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blackvoxel";
version = "2.5";
src = fetchFromGitHub {
owner = "Blackvoxel";
repo = "Blackvoxel";
tag = finalAttrs.version;
hash = "sha256-Uj3TfxAsLddsPiWDcLKjpduqvgVjnESZM4YPHT90YYY=";
};
nativeBuildInputs = [ imagemagick ];
buildInputs = [
glew110
SDL_compat
];
enableParallelBuilding = true;
postPatch = ''
substituteInPlace src/sc_Squirrel3/sq/Makefile --replace-fail " -m64" ""
substituteInPlace src/sc_Squirrel3/sqstdlib/Makefile --replace-fail " -m64" ""
substituteInPlace src/sc_Squirrel3/squirrel/Makefile --replace-fail " -m64" ""
'';
buildFlags = [ "BV_DATA_LOCATION_DIR=${placeholder "out"}/data" ];
# data/gui/gametype_back.bmp isn't exactly the official icon but since
# there is no official icon we use that one
postBuild = ''
convert gui/gametype_back.bmp blackvoxel.png
'';
installFlags = [
"doinstall=true"
"BV_DATA_INSTALL_DIR=${placeholder "out"}/data"
"BV_BINARY_INSTALL_DIR=${placeholder "out"}/bin"
];
postInstall = ''
install -Dm644 blackvoxel.png $out/share/icons/hicolor/1024x1024/apps/blackvoxel.png
'';
desktopItems = [
(makeDesktopItem {
name = "blackvoxel";
desktopName = "Blackvoxel";
exec = "blackvoxel";
icon = "blackvoxel";
categories = [ "Game" ];
})
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Sci-Fi game with industry and automation";
homepage = "https://www.blackvoxel.com";
changelog = "https://github.com/Blackvoxel/Blackvoxel/releases/tag/${finalAttrs.version}";
license = with lib.licenses; [
# blackvoxel
gpl3Plus
# Squirrel
mit
];
maintainers = with lib.maintainers; [
ethancedwards8
marcin-serwin
];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,78 @@
{
stdenvNoCC,
lib,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
yarnInstallHook,
nodejs,
nix-update-script,
testers,
writeText,
runCommand,
blade-formatter,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "blade-formatter";
version = "1.44.2";
src = fetchFromGitHub {
owner = "shufo";
repo = "blade-formatter";
rev = "v${finalAttrs.version}";
hash = "sha256-FrP+D7SYUPSn82TIRGh9mo/ZpbYxmiTOKagbl/9D7Hk=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-XUd1p9AQXVUtADERNcHY7pHkMCr2g7+N/Dy7z4hL0g4=";
};
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
yarnInstallHook
nodejs
];
passthru = {
updateScript = nix-update-script { };
tests = {
version = testers.testVersion {
package = blade-formatter;
command = "blade-formatter --version";
};
simple = testers.testEqualContents {
assertion = "blade-formatter formats a basic blade file";
expected = writeText "expected" ''
@if (true)
Hello world!
@endif
'';
actual =
runCommand "actual"
{
nativeBuildInputs = [ blade-formatter ];
base = writeText "base" ''
@if( true ) Hello world! @endif
'';
}
''
blade-formatter $base > $out
'';
};
};
};
meta = {
description = "Laravel Blade template formatter";
homepage = "https://github.com/shufo/blade-formatter";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ lelgenio ];
mainProgram = "blade-formatter";
inherit (nodejs.meta) platforms;
};
})

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
crystal,
fetchFromGitHub,
# https://crystal-lang.org/2019/09/06/parallelism-in-crystal/
multithreading ? true,
static ? stdenv.hostPlatform.isStatic,
}:
crystal.buildCrystalPackage rec {
pname = "blahaj";
version = "2.2.0";
src = fetchFromGitHub {
owner = "GeopJr";
repo = "BLAHAJ";
rev = "v${version}";
hash = "sha256-CmMF9jDKUo+c8dYc2UEHKdBDE4dgwExcRS5sSUsUJik=";
};
buildTargets = [ "${if static then "static" else "build"}${if multithreading then "_mt" else ""}" ];
meta = with lib; {
description = "Gay sharks at your local terminal - lolcat-like CLI tool";
homepage = "https://blahaj.queer.software";
license = licenses.bsd2;
maintainers = with maintainers; [
aleksana
cafkafk
];
mainProgram = "blahaj";
};
}

View File

@@ -0,0 +1,80 @@
{
fetchFromGitHub,
lib,
stdenv,
libiconv,
texliveFull,
xercesc,
}:
stdenv.mkDerivation rec {
pname = "blahtexml";
version = "1.0";
src = fetchFromGitHub {
owner = "gvanas";
repo = "blahtexml";
rev = "v${version}";
hash = "sha256-DL5DyfARHHbwWBVHSa/VwHzNaAx/v7EDdnw1GLOk+y0=";
};
postPatch =
lib.optionalString stdenv.cc.isClang ''
substituteInPlace makefile \
--replace "\$(CXX)" "\$(CXX) -std=c++98"
''
+
# fix the doc build on TeX Live 2023
''
substituteInPlace Documentation/manual.tex \
--replace '\usepackage[utf8x]{inputenc}' '\usepackage[utf8]{inputenc}'
'';
outputs = [
"out"
"doc"
];
nativeBuildInputs = [ texliveFull ]; # scheme-full needed for ucs package
buildInputs = [ xercesc ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
buildFlags = [
"doc"
]
++ (
if stdenv.hostPlatform.isDarwin then
[
"blahtex-mac"
"blahtexml-mac"
]
else
[
"blahtex-linux"
"blahtexml-linux"
]
);
installPhase = ''
install -D -t "$out/bin" blahtex blahtexml
install -m644 -D -t "$doc/share/doc/blahtexml" Documentation/manual.pdf
'';
meta = with lib; {
homepage = "https://gva.noekeon.org/blahtexml/";
description = "TeX to MathML converter";
longDescription = ''
Blahtex is a program written in C++, which converts an equation given in
a syntax close to TeX into MathML. It is designed by David Harvey and is
aimed at supporting equations in MediaWiki.
Blahtexml is a simple extension of blahtex, written by Gilles Van Assche.
In addition to the functionality of blahtex, blahtexml has XML processing
in mind and is able to process a whole XML document into another XML
document. Instead of converting only one formula at a time, blahtexml can
convert all the formulas of the given XML file into MathML.
'';
license = licenses.bsd3;
maintainers = [ maintainers.xworld21 ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,76 @@
{
lib,
fetchFromGitHub,
meson,
ninja,
pkg-config,
wrapGAppsHook4,
blueprint-compiler,
desktop-file-utils,
python3Packages,
glib,
gtk4,
libadwaita,
gobject-introspection,
gst_all_1,
nix-update-script,
}:
python3Packages.buildPythonApplication rec {
pname = "blanket";
version = "0.8.0";
src = fetchFromGitHub {
owner = "rafaelmardojai";
repo = "blanket";
tag = version;
hash = "sha256-LnHL/1DJXiKx9U+JkT4Wjx1vtTmKLpzZ8q6uLT5a2MY=";
};
nativeBuildInputs = [
blueprint-compiler
meson
ninja
pkg-config
wrapGAppsHook4
desktop-file-utils
gobject-introspection
];
buildInputs = [
glib
gtk4
libadwaita
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
];
propagatedBuildInputs = with python3Packages; [ pygobject3 ];
pyproject = false;
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Listen to different sounds";
changelog = "https://github.com/rafaelmardojai/blanket/releases/tag/${version}";
homepage = "https://github.com/rafaelmardojai/blanket";
license = lib.licenses.gpl3Plus;
mainProgram = "blanket";
maintainers = with lib.maintainers; [
onny
];
teams = [ lib.teams.gnome-circle ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchurl,
cmake,
gfortran,
# Whether to build with ILP64 interface
blas64 ? false,
}:
stdenv.mkDerivation rec {
pname = "blas";
version = "3.12.0";
src = fetchurl {
url = "http://www.netlib.org/blas/${pname}-${version}.tgz";
sha256 = "sha256-zMQbXQiOUNsAMDF66bDJrzdXEME5KsrR/iCWAtpaWq0=";
};
passthru = { inherit blas64; };
nativeBuildInputs = [
cmake
gfortran
];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ] ++ lib.optional blas64 "-DBUILD_INDEX64=ON";
postInstall =
let
canonicalExtension =
if stdenv.hostPlatform.isLinux then
"${stdenv.hostPlatform.extensions.sharedLibrary}.${lib.versions.major version}"
else
stdenv.hostPlatform.extensions.sharedLibrary;
in
lib.optionalString blas64 ''
ln -s $out/lib/libblas64${canonicalExtension} $out/lib/libblas${canonicalExtension}
'';
preFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
for fn in $(find $out/lib -name "*.so*"); do
if [ -L "$fn" ]; then continue; fi
install_name_tool -id "$fn" "$fn"
done
'';
meta = with lib; {
description = "Basic Linear Algebra Subprograms";
license = licenses.publicDomain;
maintainers = [ maintainers.markuskowa ];
homepage = "http://www.netlib.org/blas/";
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,312 @@
{
lib,
stdenv,
lapack-reference,
openblas,
isILP64 ? false,
blasProvider ? openblas,
}:
let
blasFortranSymbols = [
"caxpy"
"ccopy"
"cdotc"
"cdotu"
"cgbmv"
"cgemm"
"cgemv"
"cgerc"
"cgeru"
"chbmv"
"chemm"
"chemv"
"cher"
"cher2"
"cher2k"
"cherk"
"chpmv"
"chpr"
"chpr2"
"crotg"
"cscal"
"csrot"
"csscal"
"cswap"
"csymm"
"csyr2k"
"csyrk"
"ctbmv"
"ctbsv"
"ctpmv"
"ctpsv"
"ctrmm"
"ctrmv"
"ctrsm"
"ctrsv"
"dasum"
"daxpy"
"dcabs1"
"dcopy"
"ddot"
"dgbmv"
"dgemm"
"dgemv"
"dger"
"dnrm2"
"drot"
"drotg"
"drotm"
"drotmg"
"dsbmv"
"dscal"
"dsdot"
"dspmv"
"dspr"
"dspr2"
"dswap"
"dsymm"
"dsymv"
"dsyr"
"dsyr2"
"dsyr2k"
"dsyrk"
"dtbmv"
"dtbsv"
"dtpmv"
"dtpsv"
"dtrmm"
"dtrmv"
"dtrsm"
"dtrsv"
"dzasum"
"dznrm2"
"icamax"
"idamax"
"isamax"
"izamax"
"lsame"
"sasum"
"saxpy"
"scabs1"
"scasum"
"scnrm2"
"scopy"
"sdot"
"sdsdot"
"sgbmv"
"sgemm"
"sgemv"
"sger"
"snrm2"
"srot"
"srotg"
"srotm"
"srotmg"
"ssbmv"
"sscal"
"sspmv"
"sspr"
"sspr2"
"sswap"
"ssymm"
"ssymv"
"ssyr"
"ssyr2"
"ssyr2k"
"ssyrk"
"stbmv"
"stbsv"
"stpmv"
"stpsv"
"strmm"
"strmv"
"strsm"
"strsv"
"xerbla"
"xerbla_array"
"zaxpy"
"zcopy"
"zdotc"
"zdotu"
"zdrot"
"zdscal"
"zgbmv"
"zgemm"
"zgemv"
"zgerc"
"zgeru"
"zhbmv"
"zhemm"
"zhemv"
"zher"
"zher2"
"zher2k"
"zherk"
"zhpmv"
"zhpr"
"zhpr2"
"zrotg"
"zscal"
"zswap"
"zsymm"
"zsyr2k"
"zsyrk"
"ztbmv"
"ztbsv"
"ztpmv"
"ztpsv"
"ztrmm"
"ztrmv"
"ztrsm"
"ztrsv"
];
version = "3";
canonicalExtension =
if stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isStatic then
"${stdenv.hostPlatform.extensions.sharedLibrary}.${version}"
else
stdenv.hostPlatform.extensions.sharedLibrary or ".a";
blasImplementation = lib.getName blasProvider;
blasProvider' =
if blasImplementation == "mkl" then blasProvider else blasProvider.override { blas64 = isILP64; };
in
assert isILP64 -> blasImplementation == "mkl" || blasProvider'.blas64;
stdenv.mkDerivation {
pname = "blas";
inherit version;
outputs = [
"out"
"dev"
];
meta = (blasProvider'.meta or { }) // {
description = "${lib.getName blasProvider} with just the BLAS C and FORTRAN ABI";
};
passthru = {
inherit isILP64;
provider = blasProvider';
implementation = blasImplementation;
};
dontBuild = true;
dontConfigure = true;
unpackPhase = "src=$PWD";
dontPatchELF = true;
installPhase = (
''
mkdir -p $out/lib $dev/include $dev/lib/pkgconfig
libblas="${lib.getLib blasProvider'}/lib/libblas${canonicalExtension}"
if ! [ -e "$libblas" ]; then
echo "$libblas does not exist, ${blasProvider'.name} does not provide libblas."
exit 1
fi
''
+ lib.optionalString (!stdenv.hostPlatform.isStatic) ''
$NM -an "$libblas" | cut -f3 -d' ' > symbols
for symbol in ${toString blasFortranSymbols}; do
grep -q "^$symbol_$" symbols || { echo "$symbol" was not found in "$libblas"; exit 1; }
done
''
+ ''
cp -L "$libblas" $out/lib/libblas${canonicalExtension}
chmod +w $out/lib/libblas${canonicalExtension}
''
+ (
if (stdenv.hostPlatform.isElf && !stdenv.hostPlatform.isStatic) then
''
patchelf --set-soname libblas${canonicalExtension} $out/lib/libblas${canonicalExtension}
patchelf --set-rpath "$(patchelf --print-rpath $out/lib/libblas${canonicalExtension}):${lib.getLib blasProvider'}/lib" $out/lib/libblas${canonicalExtension}
''
else
lib.optionalString (stdenv.hostPlatform.isDarwin) ''
install_name_tool \
-id $out/lib/libblas${canonicalExtension} \
-add_rpath ${lib.getLib blasProvider'}/lib \
$out/lib/libblas${canonicalExtension}
''
)
+ ''
if [ "$out/lib/libblas${canonicalExtension}" != "$out/lib/libblas${
stdenv.hostPlatform.extensions.sharedLibrary or ".a"
}" ]; then
ln -s $out/lib/libblas${canonicalExtension} "$out/lib/libblas${
stdenv.hostPlatform.extensions.sharedLibrary or ".a"
}"
fi
cat <<EOF > $dev/lib/pkgconfig/blas.pc
Name: blas
Version: ${version}
Description: BLAS FORTRAN implementation
Libs: -L$out/lib -lblas
Cflags: -I$dev/include
EOF
libcblas="${lib.getLib blasProvider'}/lib/libcblas${canonicalExtension}"
if ! [ -e "$libcblas" ]; then
echo "$libcblas does not exist, ${blasProvider'.name} does not provide libcblas."
exit 1
fi
cp -L "$libcblas" $out/lib/libcblas${canonicalExtension}
chmod +w $out/lib/libcblas${canonicalExtension}
''
+ (
if (stdenv.hostPlatform.isElf && !stdenv.hostPlatform.isStatic) then
''
patchelf --set-soname libcblas${canonicalExtension} $out/lib/libcblas${canonicalExtension}
patchelf --set-rpath "$(patchelf --print-rpath $out/lib/libcblas${canonicalExtension}):${lib.getLib blasProvider'}/lib" $out/lib/libcblas${canonicalExtension}
''
else
lib.optionalString stdenv.hostPlatform.isDarwin ''
install_name_tool \
-id $out/lib/libcblas${canonicalExtension} \
-add_rpath ${lib.getLib blasProvider'}/lib \
$out/lib/libcblas${canonicalExtension}
''
)
+ ''
if [ "$out/lib/libcblas${canonicalExtension}" != "$out/lib/libcblas${
stdenv.hostPlatform.extensions.sharedLibrary or ".a"
}" ]; then
ln -s $out/lib/libcblas${canonicalExtension} "$out/lib/libcblas${
stdenv.hostPlatform.extensions.sharedLibrary or ".a"
}"
fi
cp ${lib.getDev lapack-reference}/include/cblas{,_mangling}.h $dev/include
cat <<EOF > $dev/lib/pkgconfig/cblas.pc
Name: cblas
Version: ${version}
Description: BLAS C implementation
Cflags: -I$dev/include
Libs: -L$out/lib -lcblas
EOF
''
+ lib.optionalString (blasImplementation == "mkl") ''
mkdir -p $out/nix-support
echo 'export MKL_INTERFACE_LAYER=${lib.optionalString isILP64 "I"}LP64,GNU' > $out/nix-support/setup-hook
ln -s $out/lib/libblas${canonicalExtension} $out/lib/libmkl_rt${
stdenv.hostPlatform.extensions.sharedLibrary or ".a"
}
ln -sf ${blasProvider'}/include/* $dev/include
''
);
}

View File

@@ -0,0 +1,40 @@
{
cmake,
fetchFromGitHub,
fetchpatch,
lib,
stdenv,
withTarget ? "GENERIC",
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blasfeo";
version = "0.1.4.2";
src = fetchFromGitHub {
owner = "giaf";
repo = "blasfeo";
rev = finalAttrs.version;
hash = "sha256-p1pxqJ38h6RKXMg1t+2RHlfmRKPuM18pbUarUx/w9lw=";
};
patches = [
(fetchpatch {
name = "blasfeo-fix-cmake-4.patch";
url = "https://github.com/giaf/blasfeo/commit/75078e2b6153d1c8bc5329e83a82d4d4d3eefd76.patch";
hash = "sha256-bH5xUKAjNFCO9rRc655BcMiUesNFFln+iEPC5JHcQAU=";
})
];
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DTARGET=${withTarget}" ];
meta = {
description = "Basic linear algebra subroutines for embedded optimization";
homepage = "https://github.com/giaf/blasfeo";
changelog = "https://github.com/giaf/blasfeo/blob/${finalAttrs.version}/Changelog.txt";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ nim65s ];
};
})

View File

@@ -0,0 +1,81 @@
{
lib,
stdenv,
fetchurl,
python3,
perl,
blast,
autoPatchelfHook,
zlib,
bzip2,
glib,
libxml2,
coreutils,
sqlite,
}:
let
pname = "blast-bin";
version = "2.16.0";
srcs = {
x86_64-linux = fetchurl {
url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-x64-linux.tar.gz";
hash = "sha256-sLEwmMkB0jsyStFwDnRxu3QIp/f1F9dNX6rXEb526PQ=";
};
aarch64-linux = fetchurl {
url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-aarch64-linux.tar.gz";
hash = "sha256-1EeiMu08R9Glq8qRky4OTT5lQPLJcM7iaqUrmUOS4MI=";
};
x86_64-darwin = fetchurl {
url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-x64-macosx.tar.gz";
hash = "sha256-fu4edyD12q8G452ckrEl2Qct5+uB9JnABd7bCLkyMkw=";
};
aarch64-darwin = fetchurl {
url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-aarch64-macosx.tar.gz";
hash = "sha256-6NpPNLBCHaBRscLZ5fjh5Dv3bjjPk2Gh2+L7xEtiJNs=";
};
};
src = srcs.${stdenv.hostPlatform.system};
in
stdenv.mkDerivation {
inherit pname version src;
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
buildInputs = [
python3
perl
]
++ lib.optionals stdenv.hostPlatform.isLinux [
zlib
bzip2
glib
libxml2
sqlite
];
installPhase = ''
runHook preInstall
install -Dm755 bin/* -t $out/bin
runHook postInstall
'';
preFixup = ''
substituteInPlace $out/bin/get_species_taxids.sh \
--replace /bin/rm ${coreutils}/bin/rm
'';
meta = with lib; {
inherit (blast.meta) description homepage license;
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ natsukium ];
};
}

View File

@@ -0,0 +1,178 @@
diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/collect_outside_libs.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/collect_outside_libs.sh
--- ncbi-blast-2.9.0+-src/scripts/common/impl/collect_outside_libs.sh 2014-08-01 22:01:17.000000000 +0800
+++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/collect_outside_libs.sh 2019-05-15 12:40:44.145239480 +0800
@@ -1,8 +1,5 @@
#!/bin/sh
set -e
-PATH=/bin:/usr/bin
-export PATH
-unset CDPATH
base=$1
search=`echo ${2-$LD_LIBRARY_PATH} | tr : ' '`
diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/create_flat_tuneups.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/create_flat_tuneups.sh
--- ncbi-blast-2.9.0+-src/scripts/common/impl/create_flat_tuneups.sh 2011-08-17 02:55:10.000000000 +0800
+++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/create_flat_tuneups.sh 2019-05-15 12:40:48.449276574 +0800
@@ -1,9 +1,6 @@
#!/bin/sh
id='$Id: create_flat_tuneups.sh 331412 2011-08-16 18:55:10Z ucko $'
-PATH=/bin:/usr/bin
-export PATH
-
exec > auto_flat_tuneups.mk
cat <<EOF
diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/get_lock.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/get_lock.sh
--- ncbi-blast-2.9.0+-src/scripts/common/impl/get_lock.sh 2011-08-20 04:12:28.000000000 +0800
+++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/get_lock.sh 2019-05-15 12:40:52.901315000 +0800
@@ -1,7 +1,5 @@
#!/bin/sh
-PATH=/bin:/usr/bin
-export PATH
dir=$1.lock
diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/if_diff.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/if_diff.sh
--- ncbi-blast-2.9.0+-src/scripts/common/impl/if_diff.sh 2014-07-30 22:06:45.000000000 +0800
+++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/if_diff.sh 2019-05-15 12:42:57.298410841 +0800
@@ -4,9 +4,6 @@
# Author: Denis Vakatov (vakatov@ncbi.nlm.nih.gov)
#################################
-orig_PATH=$PATH
-PATH=/bin:/usr/bin
-
script_name=`basename $0`
script_args="$*"
@@ -16,7 +13,7 @@
base_action=`basename "$action"`
case "$base_action" in
cp | cp\ * | ln | ln\ * )
- action=/bin/$base_action
+ action=$base_action
rm="rm -f"
;;
* )
@@ -58,10 +55,8 @@
shift
cmd="$* $dest_file"
test "$quiet" = yes || echo "$cmd"
- PATH=$orig_PATH
"$@" "$dest"
status=$?
- PATH=/bin:/usr/bin
return $status
}
@@ -74,7 +69,7 @@
case "$base_action" in
ln | ln\ -f )
test "$quiet" = yes || echo "failed; trying \"cp -p ...\" instead"
- cmd="/bin/cp -p $src_file $dest_file"
+ cmd="cp -p $src_file $dest_file"
ExecHelper "$dest_file" /bin/cp -p "$src_file" ||
Usage "\"$cmd\" failed"
;;
diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/make_lock_map.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/make_lock_map.sh
--- ncbi-blast-2.9.0+-src/scripts/common/impl/make_lock_map.sh 2011-11-17 04:43:52.000000000 +0800
+++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/make_lock_map.sh 2019-05-15 12:40:56.769348434 +0800
@@ -1,8 +1,6 @@
#!/bin/sh
# $Id: make_lock_map.sh 344587 2011-11-16 20:43:52Z ucko $
-PATH=/bin:/usr/bin
-export PATH
act=false
cache_dir='.#SRC-cache'
diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/run_with_lock.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/run_with_lock.sh
--- ncbi-blast-2.9.0+-src/scripts/common/impl/run_with_lock.sh 2015-10-29 22:36:05.000000000 +0800
+++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/run_with_lock.sh 2019-05-15 12:41:53.401842849 +0800
@@ -1,10 +1,6 @@
#!/bin/sh
# $Id: run_with_lock.sh 483249 2015-10-29 14:36:05Z ucko $
-orig_PATH=$PATH
-PATH=/bin:/usr/bin
-export PATH
-
base=
logfile=
map=
@@ -23,7 +19,7 @@
: ${base:=`basename "$1"`}
clean_up () {
- /bin/rm -rf "$base.lock"
+ rm -rf "$base.lock"
}
case $0 in
@@ -45,7 +41,7 @@
trap "clean_up; exit $error_status" 1 2 15
if [ -n "$logfile" ]; then
status_file=$base.lock/status
- (PATH=$orig_PATH; export PATH; "$@"; echo $? > "$status_file") 2>&1 \
+ ("$@"; echo $? > "$status_file") 2>&1 \
| tee "$logfile.new"
# Emulate egrep -q to avoid having to move from under scripts.
if [ ! -f "$logfile" ] \
@@ -58,8 +54,6 @@
status=1
fi
else
- PATH=$orig_PATH
- export PATH
"$@"
status=$?
fi
diff -u --recursive ncbi-blast-2.9.0+-src/scripts/common/impl/strip_for_install.sh ncbi-blast-2.9.0+-src.patched/scripts/common/impl/strip_for_install.sh
--- ncbi-blast-2.9.0+-src/scripts/common/impl/strip_for_install.sh 2013-09-24 03:06:51.000000000 +0800
+++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/strip_for_install.sh 2019-05-15 12:40:13.272975092 +0800
@@ -1,8 +1,5 @@
#!/bin/sh
-PATH=/bin:/usr/bin:/usr/ccs/bin
-export PATH
-
case "$1" in
--dirs )
shift
--- ncbi-blast-2.9.0+-src/scripts/common/impl/update_configurable.sh 2017-07-13 22:53:24.000000000 +0800
+++ ncbi-blast-2.9.0+-src.patched/scripts/common/impl/update_configurable.sh 2019-05-15 15:03:35.861276083 +0800
@@ -1,6 +1,4 @@
#!/bin/sh
-PATH=/bin:/usr/bin
-export PATH
script_name=`basename $0`
script_dir=`dirname $0`
--- ncbi-blast-2.9.0+-src/src/build-system/Makefile.mk.in 2019-01-04 01:38:37.000000000 +0800
+++ ncbi-blast-2.9.0+-src.patched/src/build-system/Makefile.mk.in 2019-05-15 15:14:41.749416495 +0800
@@ -50,12 +50,12 @@
### Auxiliary commands, filters
-RM = /bin/rm -f
-RMDIR = /bin/rm -rf
-COPY = /bin/cp -p
+RM = rm -f
+RMDIR = rm -rf
+COPY = cp -p
BINCOPY = @BINCOPY@
TOUCH = @TOUCH@
-MKDIR = /bin/mkdir
+MKDIR = mkdir
BINTOUCH = $(TOUCH)
LN_S = @LN_S@
GREP = @GREP@
--- ncbi-blast-2.9.0+-src/src/build-system/configure 2019-03-05 00:49:08.000000000 +0800
+++ ncbi-blast-2.9.0+-src.patched/src/build-system/configure 2019-05-15 16:55:40.711795042 +0800
@@ -10417,4 +10417,0 @@
-case "$LN_S" in
- /*) ;;
- * ) LN_S=/bin/$LN_S ;;
-esac

View File

@@ -0,0 +1,130 @@
{
lib,
stdenv,
buildPackages,
fetchurl,
zlib,
bzip2,
perl,
cpio,
gawk,
coreutils,
}:
stdenv.mkDerivation rec {
pname = "blast";
version = "2.14.1";
src = fetchurl {
url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-src.tar.gz";
sha256 = "sha256-cSwtvfD7E8wcLU9O9d0c5LBsO1fpbf6o8j5umfWxZQ4=";
};
sourceRoot = "ncbi-blast-${version}+-src/c++";
configureFlags = [
# With flat Makefile we can use all_projects in order not to build extra.
# These extra cause clang to hang on Darwin.
"--with-flat-makefile"
"--without-makefile-auto-update"
"--with-dll" # build dynamic libraries (static are default)
];
makeFlags = [ "all_projects=app/" ];
preConfigure = ''
export NCBICXX_RECONF_POLICY=warn
export PWD=$(pwd)
export HOME=$PWD
# The configure scripts wants to set AR="ar cr" unless it is already set in
# the environment. Because stdenv sets AR="ar", the result is a bad call to
# the assembler later in the process. Thus, we need to unset AR
unset AR
for awks in scripts/common/impl/is_log_interesting.awk \
scripts/common/impl/report_duplicates.awk; do
substituteInPlace $awks \
--replace-fail "/usr/bin/awk" "${gawk}/bin/awk"
done
for mk in src/build-system/Makefile.meta.in \
src/build-system/helpers/run_with_lock.c ; do
substituteInPlace $mk \
--replace-fail "/bin/rm" "${coreutils}/bin/rm"
done
for mk in src/build-system/Makefile.meta.gmake=no \
src/build-system/Makefile.meta_l \
src/build-system/Makefile.meta_r \
src/build-system/Makefile.requirements \
src/build-system/Makefile.rules_with_autodep.in; do
substituteInPlace $mk \
--replace-fail "/bin/echo" "${coreutils}/bin/echo"
done
for mk in src/build-system/Makefile.meta_p \
src/build-system/Makefile.rules_with_autodep.in \
src/build-system/Makefile.protobuf.in ; do
substituteInPlace $mk \
--replace-fail "/bin/mv" "${coreutils}/bin/mv"
done
substituteInPlace src/build-system/configure \
--replace-fail "/bin/pwd" "${coreutils}/bin/pwd" \
--replace-fail "/bin/ln" "${coreutils}/bin/ln"
substituteInPlace src/build-system/configure.ac \
--replace-fail "/bin/pwd" "${coreutils}/bin/pwd" \
--replace-fail "/bin/ln" "${coreutils}/bin/ln"
substituteInPlace src/build-system/Makefile.meta_l \
--replace-fail "/bin/date" "${coreutils}/bin/date"
'';
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [
cpio
perl
];
# perl is necessary in buildInputs so that installed perl scripts get patched
# correctly
buildInputs = [
coreutils
perl
gawk
zlib
bzip2
];
strictDeps = true;
hardeningDisable = [ "format" ];
postInstall = ''
substituteInPlace $out/bin/get_species_taxids.sh \
--replace-fail "/bin/rm" "${coreutils}/bin/rm"
'';
patches = [ ./no_slash_bin.patch ];
enableParallelBuilding = true;
# Many tests require either network access or locally available databases
doCheck = false;
meta = with lib; {
description = ''Basic Local Alignment Search Tool (BLAST) finds regions of similarity between biological sequences'';
homepage = "https://blast.ncbi.nlm.nih.gov/Blast.cgi";
license = licenses.publicDomain;
# Version 2.10.0 fails on Darwin
# See https://github.com/NixOS/nixpkgs/pull/61430
platforms = platforms.linux;
maintainers = with maintainers; [ luispedro ];
};
}

View File

@@ -0,0 +1,80 @@
{
lib,
stdenv,
fetchhg,
pkg-config,
makeBinaryWrapper,
SDL2,
glew,
gtk3,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blastem";
version = "0.6.2-unstable-2024-08-14";
src = fetchhg {
url = "https://www.retrodev.com/repos/blastem";
rev = "aa888682faa0";
hash = "sha256-0xw9O0o1pkJiXHyZer4nMJeLlRXS3Z4YYoLgfkrz3Yo=";
};
# will probably be fixed in https://github.com/NixOS/nixpkgs/pull/302481
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace Makefile \
--replace-fail "-flto" ""
'';
nativeBuildInputs = [
pkg-config
makeBinaryWrapper
];
buildInputs = [
gtk3
SDL2
glew
];
# Note: menu.bin cannot be generated yet, because it would
# need the `vasmm68k_mot` executable (part of vbcc for amigaos68k
# Luckily, menu.bin doesn't need to be present for the emulator to function
makeFlags = [ "HOST_ZLIB=1" ];
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2}/include/SDL2";
installPhase = ''
runHook preInstall
# not sure if any executable other than blastem is really needed here
install -Dm755 blastem dis zdis termhelper -t $out/share/blastem
install -Dm644 gamecontrollerdb.txt default.cfg rom.db -t $out/share/blastem
cp -r shaders $out/share/blastem/shaders
# wrapping instead of sym-linking makes sure argv0 stays at the original location
makeWrapper $out/share/blastem/blastem $out/bin/blastem
runHook postInstall
'';
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "blastem -v";
version = "0.6.3-pre"; # remove line when moving to a stable version
};
meta = {
description = "Fast and accurate Genesis emulator";
homepage = "https://www.retrodev.com/blastem/";
license = lib.licenses.gpl3Plus;
mainProgram = "blastem";
maintainers = with lib.maintainers; [ tomasajt ];
platforms = [
"i686-linux"
"x86_64-linux"
"x86_64-darwin"
];
};
})

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchFromBitbucket,
cmake,
blas,
lapack-reference,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blaze";
version = "3.8.2";
src = fetchFromBitbucket {
owner = "blaze-lib";
repo = "blaze";
rev = "v${finalAttrs.version}";
hash = "sha256-Jl9ZWFqBvLgQwCoMNX3g7z02yc7oYx+d6mbyLBzBJOs=";
};
strictDeps = true;
nativeBuildInputs = [ cmake ];
buildInputs = [
blas
lapack-reference
];
meta = with lib; {
description = "High performance C++ math library";
homepage = "https://bitbucket.org/blaze-lib/blaze";
license = with licenses; [ bsd3 ];
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1 @@
{ python3Packages }: with python3Packages; toPythonApplication ble-serial

View File

@@ -0,0 +1,74 @@
{
lib,
python3Packages,
fetchurl,
gettext,
gobject-introspection,
wrapGAppsHook3,
glib,
gtk3,
libnotify,
}:
python3Packages.buildPythonApplication rec {
pname = "bleachbit";
version = "5.0.0";
format = "other";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
sha256 = "sha256-CU5IW8NVWuPl4PHu6mYpD5mOpRiDq6oZk9pDmuz8PjA=";
};
nativeBuildInputs = [
gettext
gobject-introspection
wrapGAppsHook3
];
buildInputs = [
glib
gtk3
libnotify
];
propagatedBuildInputs = with python3Packages; [
chardet
pygobject3
requests
];
# Patch the many hardcoded uses of /usr/share/ and /usr/bin
postPatch = ''
find -type f -exec sed -i -e 's@/usr/share@${placeholder "out"}/share@g' {} \;
find -type f -exec sed -i -e 's@/usr/bin@${placeholder "out"}/bin@g' {} \;
find -type f -exec sed -i -e 's@${placeholder "out"}/bin/python3@${python3Packages.python}/bin/python3@' {} \;
'';
dontBuild = true;
installFlags = [
"prefix=${placeholder "out"}"
];
# Prevent double wrapping from wrapGApps and wrapPythonProgram
dontWrapGApps = true;
makeWrapperArgs = [
"\${gappsWrapperArgs[@]}"
];
strictDeps = false;
meta = with lib; {
homepage = "https://bleachbit.sourceforge.net";
description = "Program to clean your computer";
longDescription = "BleachBit helps you easily clean your computer to free space and maintain privacy.";
license = licenses.gpl3;
maintainers = with maintainers; [
leonardoce
mbprtpmnr
];
mainProgram = "bleachbit";
};
}

View File

@@ -0,0 +1,81 @@
{
stdenvNoCC,
fetchzip,
autoPatchelfHook,
installShellFiles,
makeWrapper,
lib,
zlib,
testers,
}:
let
platform =
{
x86_64-linux = "x86_64-pc-linux";
x86_64-darwin = "x86_64-apple-darwin";
aarch64-darwin = "arm64-apple-darwin";
}
."${stdenvNoCC.system}" or (throw "unsupported system ${stdenvNoCC.hostPlatform.system}");
hash =
{
x86_64-linux = "sha256-SGV0fEuwmGwpqmD42a+x0fIK50RWSHEYDesH4obgRhg=";
x86_64-darwin = "sha256-fOeYUchUE1Jj4xSrYjljEUpGrW8cvev7d/qywc81vFo=";
aarch64-darwin = "sha256-qL0hjEdfkN62NDvhlzVgW4TYWv0IReo2Fo5eVhUaOrI=";
}
."${stdenvNoCC.system}" or (throw "unsupported system ${stdenvNoCC.hostPlatform.system}");
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "bleep";
version = "0.0.13";
src = fetchzip {
url = "https://github.com/oyvindberg/bleep/releases/download/v${finalAttrs.version}/bleep-${platform}.tar.gz";
hash = hash;
};
nativeBuildInputs = [
installShellFiles
makeWrapper
]
++ lib.optional stdenvNoCC.hostPlatform.isLinux autoPatchelfHook;
buildInputs = [ zlib ];
installPhase = ''
runHook preInstall
install -Dm755 bleep -t $out/bin/
runHook postInstall
'';
dontAutoPatchelf = true;
postFixup =
lib.optionalString stdenvNoCC.hostPlatform.isLinux ''
autoPatchelf $out
''
+ lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
export PATH=$PATH:$out/bin
installShellCompletion --cmd bleep \
--bash <(bleep install-tab-completions-bash --stdout) \
--zsh <(bleep install-tab-completions-zsh --stdout) \
'';
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "bleep --help | sed -n '/Bleeping/s/[^0-9.]//gp'";
};
meta = {
homepage = "https://bleep.build/";
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
license = lib.licenses.mit;
description = "Bleeping fast scala build tool";
mainProgram = "bleep";
platforms = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
maintainers = with lib.maintainers; [ kristianan ];
};
})

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
asmjit,
}:
stdenv.mkDerivation {
pname = "blend2d";
version = "0.12";
src = fetchFromGitHub {
owner = "blend2d";
repo = "blend2d";
rev = "717cbf4bc0f2ca164cf2f0c48f0497779241b6c5";
hash = "sha256-L3wDsjy0cocncZqKLy8in2yirrFJoqU3tFBfeBxlhs0=";
};
outputs = [
"out"
"dev"
];
nativeBuildInputs = [ cmake ];
cmakeFlags = [ (lib.cmakeFeature "ASMJIT_DIR" (toString asmjit.src)) ];
meta = {
description = "2D Vector Graphics Engine Powered by a JIT Compiler";
homepage = "https://blend2d.com";
license = lib.licenses.zlib;
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,93 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0611614fe18..a6dcb2f04b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2567,7 +2567,7 @@ if(WITH_COMPILER_SHORT_FILE_MACRO)
)
if(C_MACRO_PREFIX_MAP AND CXX_MACRO_PREFIX_MAP)
if(APPLE)
- if(XCODE AND ${XCODE_VERSION} VERSION_LESS 12.0)
+ if(FALSE)
# Developers may have say LLVM Clang-10.0.1 toolchain (which supports the flag)
# with Xcode-11 (the Clang of which doesn't support the flag).
message(
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index b2db64bbd2e..aac4b552655 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -55,7 +55,6 @@ if(NOT DEFINED LIBDIR)
endif()
endif()
if(NOT EXISTS "${LIBDIR}/.git")
- message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
endif()
if(FIRST_RUN)
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
@@ -121,10 +120,6 @@ if(WITH_CODEC_SNDFILE)
find_library(_sndfile_VORBIS_LIBRARY NAMES vorbis HINTS ${LIBDIR}/ffmpeg/lib)
find_library(_sndfile_VORBISENC_LIBRARY NAMES vorbisenc HINTS ${LIBDIR}/ffmpeg/lib)
list(APPEND LIBSNDFILE_LIBRARIES
- ${_sndfile_FLAC_LIBRARY}
- ${_sndfile_OGG_LIBRARY}
- ${_sndfile_VORBIS_LIBRARY}
- ${_sndfile_VORBISENC_LIBRARY}
)
print_found_status("SndFile libraries" "${LIBSNDFILE_LIBRARIES}")
@@ -168,9 +163,7 @@ if(WITH_CODEC_FFMPEG)
set(FFMPEG_ROOT_DIR ${LIBDIR}/ffmpeg)
set(FFMPEG_FIND_COMPONENTS
avcodec avdevice avformat avutil
- mp3lame ogg opus swresample swscale
- theora theoradec theoraenc vorbis vorbisenc
- vorbisfile vpx x264)
+ swresample swscale)
if(EXISTS ${LIBDIR}/ffmpeg/lib/libaom.a)
list(APPEND FFMPEG_FIND_COMPONENTS aom)
endif()
@@ -285,7 +278,6 @@ endif()
add_bundled_libraries(boost/lib)
if(WITH_CODEC_FFMPEG)
- string(APPEND PLATFORM_LINKFLAGS " -liconv") # ffmpeg needs it !
endif()
if(WITH_PUGIXML)
@@ -361,7 +353,7 @@ endif()
# CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
if(WITH_OPENMP)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
- if(${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 17.0)
+ if(FALSE) # clang in nix was compatible with openmp
if(WITH_STRICT_BUILD_OPTIONS)
message(SEND_ERROR "OpenMP library is not compatible with the current Clang version")
else()
@@ -446,7 +438,7 @@ string(APPEND PLATFORM_LINKFLAGS
" -Wl,-unexported_symbols_list,'${PLATFORM_SYMBOLS_MAP}'"
)
-if(${XCODE_VERSION} VERSION_GREATER_EQUAL 15.0)
+if(FALSE)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
# Silence "no platform load command found in <static library>, assuming: macOS".
string(APPEND PLATFORM_LINKFLAGS " -Wl,-ld_classic")
diff --git a/source/blender/blendthumb/CMakeLists.txt b/source/blender/blendthumb/CMakeLists.txt
index 935b3f94ee1..f3d73637f71 100644
--- a/source/blender/blendthumb/CMakeLists.txt
+++ b/source/blender/blendthumb/CMakeLists.txt
@@ -65,15 +65,6 @@ elseif(APPLE)
# Prevent Xcode from overwriting the signature.
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ""
)
- # CMake needs the target defined in the same file as add_custom_command.
- # It needs to be code-signed (ad-hoc in this case)
- # even on developer machine to generate thumbnails.
- # Command taken from XCode build process.
- add_custom_command(
- TARGET blender-thumbnailer POST_BUILD
- COMMAND codesign --deep --force --sign - --entitlements "${CMAKE_SOURCE_DIR}/release/darwin/thumbnailer_entitlements.plist"
- --timestamp=none $<TARGET_BUNDLE_DIR:blender-thumbnailer>
- )
elseif(UNIX)
# -----------------------------------------------------------------------------
# Build `blender-thumbnailer` executable

View File

@@ -0,0 +1,34 @@
diff --git a/src/libdecor-plugin.h b/src/libdecor-plugin.h
index ba80ce6..59199dd 100644
--- a/src/libdecor-plugin.h
+++ b/src/libdecor-plugin.h
@@ -132,12 +132,6 @@ struct libdecor_plugin_interface {
struct wl_surface *
libdecor_frame_get_wl_surface(struct libdecor_frame *frame);
-int
-libdecor_frame_get_content_width(struct libdecor_frame *frame);
-
-int
-libdecor_frame_get_content_height(struct libdecor_frame *frame);
-
enum libdecor_window_state
libdecor_frame_get_window_state(struct libdecor_frame *frame);
diff --git a/src/libdecor.h b/src/libdecor.h
index af67e2f..b5eba41 100644
--- a/src/libdecor.h
+++ b/src/libdecor.h
@@ -532,6 +532,12 @@ bool
libdecor_configuration_get_window_state(struct libdecor_configuration *configuration,
enum libdecor_window_state *window_state);
+int
+libdecor_frame_get_content_width(struct libdecor_frame *frame);
+
+int
+libdecor_frame_get_content_height(struct libdecor_frame *frame);
+
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,453 @@
{
SDL,
addDriverRunpath,
alembic,
apple-sdk_15,
blender,
boost,
brotli,
callPackage,
cmake,
colladaSupport ? true,
config,
cudaPackages,
cudaSupport ? config.cudaSupport,
dbus,
embree,
fetchzip,
fetchFromGitHub,
ffmpeg,
fftw,
fftwFloat,
freetype,
gettext,
glew,
gmp,
hipSupport ? false,
jackaudioSupport ? false,
jemalloc,
lib,
libGL,
libGLU,
libX11,
libXext,
libXi,
libXrender,
libXxf86vm,
libdecor,
libepoxy,
libffi,
libharu,
libjack2,
libjpeg,
libpng,
libsamplerate,
libsndfile,
libspnav,
libtiff,
libwebp,
libxkbcommon,
llvmPackages,
makeWrapper,
manifold,
mesa,
nix-update-script,
openUsdSupport ? !stdenv.hostPlatform.isDarwin,
openal,
opencollada-blender,
opencolorio,
openexr,
openimagedenoise,
openimageio,
openjpeg,
openpgl,
opensubdiv,
openvdb,
openxr-loader,
pkg-config,
potrace,
pugixml,
python3Packages, # must use instead of python3.pkgs, see https://github.com/NixOS/nixpkgs/issues/211340
rocmPackages, # comes with a significantly larger closure size
runCommand,
shaderc,
spaceNavSupport ? stdenv.hostPlatform.isLinux,
sse2neon,
stdenv,
onetbb,
vulkan-headers,
vulkan-loader,
wayland,
wayland-protocols,
wayland-scanner,
waylandSupport ? stdenv.hostPlatform.isLinux,
zlib,
zstd,
}:
let
stdenv' = if cudaSupport then cudaPackages.backendStdenv else stdenv;
embreeSupport =
(!stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) || stdenv.hostPlatform.isDarwin;
openImageDenoiseSupport =
(!stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) || stdenv.hostPlatform.isDarwin;
vulkanSupport = !stdenv.hostPlatform.isDarwin;
python3 = python3Packages.python;
pyPkgsOpenusd = python3Packages.openusd.override (old: {
opensubdiv = old.opensubdiv.override { inherit cudaSupport; };
withOsl = false;
});
libdecor' = libdecor.overrideAttrs (old: {
# Blender uses private APIs, need to patch to expose them
patches = (old.patches or [ ]) ++ [ ./libdecor.patch ];
});
# See build_files/config/pipeline_config.yaml in upstream source for version
optix = fetchFromGitHub {
owner = "NVIDIA";
repo = "optix-dev";
tag = "v8.0.0";
hash = "sha256-SXkXZHzQH8JOkXypjjxNvT/lUlWZkCuhh6hNCHE7FkY=";
};
in
stdenv'.mkDerivation (finalAttrs: {
pname = "blender";
version = "4.5.3";
src = fetchzip {
name = "source";
url = "https://download.blender.org/source/blender-${finalAttrs.version}.tar.xz";
hash = "sha256-DNVZUZpysCyB/Xt8yB352gO+UK8Cd4aDFGYuUDKyIrs=";
};
postPatch =
(lib.optionalString stdenv.hostPlatform.isDarwin ''
: > build_files/cmake/platform/platform_apple_xcode.cmake
substituteInPlace source/creator/CMakeLists.txt \
--replace-fail '${"$"}{LIBDIR}/python' \
'${python3}' \
--replace-fail '${"$"}{LIBDIR}/materialx/' '${python3Packages.materialx}/'
substituteInPlace build_files/cmake/platform/platform_apple.cmake \
--replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlicommon-static.a' \
'${lib.getLib brotli}/lib/libbrotlicommon.dylib' \
--replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlidec-static.a' \
'${lib.getLib brotli}/lib/libbrotlidec.dylib'
'')
+ (lib.optionalString hipSupport ''
substituteInPlace extern/hipew/src/hipew.c --replace-fail '"/opt/rocm/hip/lib/libamdhip64.so.${lib.versions.major rocmPackages.clr.version}"' '"${rocmPackages.clr}/lib/libamdhip64.so"'
substituteInPlace extern/hipew/src/hipew.c --replace-fail '"opt/rocm/hip/bin"' '"${rocmPackages.clr}/bin"'
substituteInPlace extern/hipew/src/hiprtew.cc --replace-fail '"/opt/rocm/lib/libhiprt64.so"' '"${rocmPackages.hiprt}/lib/libhiprt64.so"'
'');
env.NIX_CFLAGS_COMPILE = "-I${python3}/include/${python3.libPrefix}";
cmakeFlags = [
"-DMaterialX_DIR=${python3Packages.materialx}/lib/cmake/MaterialX"
"-DPYTHON_INCLUDE_DIR=${python3}/include/${python3.libPrefix}"
"-DPYTHON_LIBPATH=${python3}/lib"
"-DPYTHON_LIBRARY=${python3.libPrefix}"
"-DPYTHON_NUMPY_INCLUDE_DIRS=${python3Packages.numpy_1}/${python3.sitePackages}/numpy/core/include"
"-DPYTHON_NUMPY_PATH=${python3Packages.numpy_1}/${python3.sitePackages}"
"-DPYTHON_VERSION=${python3.pythonVersion}"
"-DWITH_ALEMBIC=ON"
"-DWITH_ASSERT_ABORT=OFF"
"-DWITH_BUILDINFO=OFF"
"-DWITH_CODEC_FFMPEG=ON"
"-DWITH_CODEC_SNDFILE=ON"
"-DWITH_CPU_CHECK=OFF"
"-DWITH_CYCLES_DEVICE_HIP=${if hipSupport then "ON" else "OFF"}"
"-DWITH_CYCLES_DEVICE_OPTIX=${if cudaSupport then "ON" else "OFF"}"
"-DWITH_CYCLES_EMBREE=${if embreeSupport then "ON" else "OFF"}"
"-DWITH_CYCLES_OSL=OFF"
"-DWITH_FFTW3=ON"
"-DWITH_HYDRA=${if openUsdSupport then "ON" else "OFF"}"
"-DWITH_IMAGE_OPENJPEG=ON"
"-DWITH_INSTALL_PORTABLE=OFF"
"-DWITH_JACK=${if jackaudioSupport then "ON" else "OFF"}"
"-DWITH_LIBS_PRECOMPILED=OFF"
"-DWITH_MOD_OCEANSIM=ON"
"-DWITH_OPENCOLLADA=${if colladaSupport then "ON" else "OFF"}"
"-DWITH_OPENCOLORIO=ON"
"-DWITH_OPENIMAGEDENOISE=${if openImageDenoiseSupport then "ON" else "OFF"}"
"-DWITH_OPENSUBDIV=ON"
"-DWITH_OPENVDB=ON"
"-DWITH_PIPEWIRE=OFF"
"-DWITH_PULSEAUDIO=OFF"
"-DWITH_PYTHON_INSTALL=OFF"
"-DWITH_PYTHON_INSTALL_NUMPY=OFF"
"-DWITH_PYTHON_INSTALL_REQUESTS=OFF"
"-DWITH_SDL=OFF"
"-DWITH_STRICT_BUILD_OPTIONS=ON"
"-DWITH_TBB=ON"
"-DWITH_USD=${if openUsdSupport then "ON" else "OFF"}"
# Blender supplies its own FindAlembic.cmake (incompatible with the Alembic-supplied config file)
"-DALEMBIC_INCLUDE_DIR=${lib.getDev alembic}/include"
"-DALEMBIC_LIBRARY=${lib.getLib alembic}/lib/libAlembic${stdenv.hostPlatform.extensions.sharedLibrary}"
]
++ lib.optionals cudaSupport [
"-DOPTIX_ROOT_DIR=${optix}"
"-DWITH_CYCLES_CUDA_BINARIES=ON"
]
++ lib.optionals hipSupport [
"-DHIPRT_INCLUDE_DIR=${rocmPackages.hiprt}/include"
"-DWITH_CYCLES_DEVICE_HIPRT=ON"
"-DWITH_CYCLES_HIP_BINARIES=ON"
]
++ lib.optionals waylandSupport [
"-DWITH_GHOST_WAYLAND=ON"
"-DWITH_GHOST_WAYLAND_DBUS=ON"
"-DWITH_GHOST_WAYLAND_DYNLOAD=OFF"
"-DWITH_GHOST_WAYLAND_LIBDECOR=ON"
]
++ lib.optional stdenv.cc.isClang "-DPYTHON_LINKFLAGS=" # Clang doesn't support "-export-dynamic"
++ lib.optionals stdenv.hostPlatform.isDarwin [
"-DLIBDIR=/does-not-exist"
"-DSSE2NEON_INCLUDE_DIR=${sse2neon}/lib"
];
preConfigure = ''
(
expected_python_version=$(grep -E --only-matching 'set\(_PYTHON_VERSION_SUPPORTED [0-9.]+\)' build_files/cmake/Modules/FindPythonLibsUnix.cmake | grep -E --only-matching '[0-9.]+')
actual_python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[0:2])))')
if ! [[ "$actual_python_version" = "$expected_python_version" ]]; then
echo "wrong Python version, expected '$expected_python_version', got '$actual_python_version'" >&2
exit 1
fi
)
'';
nativeBuildInputs = [
cmake
llvmPackages.llvm.dev
makeWrapper
python3Packages.wrapPython
]
++ lib.optionals cudaSupport [
addDriverRunpath
cudaPackages.cuda_nvcc
]
++ lib.optionals waylandSupport [
pkg-config
wayland-scanner
];
buildInputs = [
alembic
boost
ffmpeg
fftw
fftwFloat
freetype
gettext
glew
gmp
jemalloc
libepoxy
libharu
libjpeg
libpng
libsamplerate
libsndfile
libtiff
libwebp
manifold
opencolorio
openexr
openimageio
openjpeg
openpgl
(opensubdiv.override { inherit cudaSupport; })
openvdb
potrace
pugixml
python3
python3Packages.materialx
onetbb
zlib
zstd
]
++ lib.optional embreeSupport embree
++ lib.optional hipSupport rocmPackages.clr
++ lib.optional openImageDenoiseSupport (openimagedenoise.override { inherit cudaSupport; })
++ (
if (!stdenv.hostPlatform.isDarwin) then
[
libGL
libGLU
libX11
libXext
libXi
libXrender
libXxf86vm
openal
openxr-loader
]
else
[
SDL
# blender chooses Metal features based on runtime system version
# lets use the latest SDK and let Blender handle falling back on older systems.
apple-sdk_15
brotli
llvmPackages.openmp
sse2neon
]
)
++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart ]
++ lib.optionals openUsdSupport [ pyPkgsOpenusd ]
++ lib.optionals waylandSupport [
dbus
libdecor'
libffi
libxkbcommon
wayland
wayland-protocols
]
++ lib.optional colladaSupport opencollada-blender
++ lib.optional jackaudioSupport libjack2
++ lib.optional spaceNavSupport libspnav
++ lib.optionals vulkanSupport [
shaderc
vulkan-headers
vulkan-loader
];
pythonPath =
let
ps = python3Packages;
in
[
ps.materialx
ps.numpy_1
ps.requests
ps.zstandard
]
++ lib.optionals openUsdSupport [ pyPkgsOpenusd ];
blenderExecutable =
placeholder "out"
+ (
if stdenv.hostPlatform.isDarwin then
"/Applications/Blender.app/Contents/MacOS/Blender"
else
"/bin/blender"
);
postInstall =
lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications
mv $out/Blender.app $out/Applications
''
+ ''
buildPythonPath "$pythonPath"
wrapProgram $blenderExecutable \
--prefix PATH : $program_PATH \
--prefix PYTHONPATH : "$program_PYTHONPATH" \
--add-flags '--python-use-system-env'
'';
# Set RUNPATH so that libcuda and libnvrtc in /run/opengl-driver(-32)/lib can be
# found. See the explanation in libglvnd.
postFixup =
lib.optionalString cudaSupport ''
for program in $out/bin/blender $out/bin/.blender-wrapped; do
addDriverRunpath "$program"
done
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
makeWrapper $out/Applications/Blender.app/Contents/MacOS/Blender $out/bin/blender
'';
passthru = {
python = python3;
pythonPackages = python3Packages;
withPackages =
f:
(callPackage ./wrapper.nix { }).override {
blender = finalAttrs.finalPackage;
extraModules = (f python3Packages);
};
tests = {
render = runCommand "${finalAttrs.pname}-test" { nativeBuildInputs = [ mesa.llvmpipeHook ]; } ''
set -euo pipefail
cat <<'PYTHON' > scene-config.py
import bpy
bpy.context.scene.eevee.taa_render_samples = 32
bpy.context.scene.cycles.samples = 32
if ${if (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) then "True" else "False"}:
bpy.context.scene.cycles.use_denoising = False
bpy.context.scene.render.resolution_x = 100
bpy.context.scene.render.resolution_y = 100
bpy.context.scene.render.threads_mode = 'FIXED'
bpy.context.scene.render.threads = 1
PYTHON
mkdir $out
for engine in BLENDER_EEVEE_NEXT CYCLES; do
echo "Rendering with $engine..."
# Beware that argument order matters
${lib.getExe finalAttrs.finalPackage} \
--background \
-noaudio \
--factory-startup \
--python-exit-code 1 \
--python scene-config.py \
--engine "$engine" \
--render-output "$out/$engine" \
--render-frame 1
done
'';
tester-cudaAvailable = cudaPackages.writeGpuTestPython { } ''
import subprocess
subprocess.run([${
lib.concatMapStringsSep ", " (x: ''"${x}"'') [
(lib.getExe (blender.override { cudaSupport = true; }))
"--background"
"-noaudio"
"--python-exit-code"
"1"
"--python"
"${./test-cuda.py}"
]
}], check=True) # noqa: E501
'';
};
updateScript = nix-update-script {
extraArgs = [
"--url=https://projects.blender.org/blender/blender"
];
};
};
meta = {
broken = stdenv.hostPlatform.isDarwin;
description = "3D Creation/Animation/Publishing System";
homepage = "https://www.blender.org";
# They comment two licenses: GPLv2 and Blender License, but they
# say: "We've decided to cancel the BL offering for an indefinite period."
# OptiX, enabled with cudaSupport, is non-free.
license =
with lib.licenses;
[ gpl2Plus ] ++ lib.optional cudaSupport (unfree // { shortName = "NVidia OptiX EULA"; });
platforms = [
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
"aarch64-darwin"
];
maintainers = with lib.maintainers; [
amarshall
veprbl
];
mainProgram = "blender";
};
})

View File

@@ -0,0 +1,8 @@
import bpy
preferences = bpy.context.preferences.addons["cycles"].preferences
devices = preferences.get_devices_for_type("CUDA")
ids = [d.id for d in devices]
assert any("CUDA" in i for i in ids), f"CUDA not present in {ids}"
print("CUDA is available")

View File

@@ -0,0 +1,32 @@
{
stdenv,
blender,
makeWrapper,
extraModules ? [ ],
}:
stdenv.mkDerivation (finalAttrs: {
pname = blender.pname + "-wrapped";
src = blender;
inherit (blender) version meta;
nativeBuildInputs = [
blender.pythonPackages.wrapPython
makeWrapper
];
installPhase = ''
mkdir $out/{share/applications,bin} -p
sed 's/Exec=blender/Exec=${finalAttrs.finalPackage.pname}/g' $src/share/applications/blender.desktop > $out/share/applications/${finalAttrs.finalPackage.pname}.desktop
cp -r $src/share/blender $out/share
cp -r $src/share/doc $out/share
cp -r $src/share/icons $out/share
buildPythonPath "$pythonPath"
makeWrapper ${blender}/bin/blender $out/bin/${finalAttrs.finalPackage.pname} \
--prefix PATH : $program_PATH \
--prefix PYTHONPATH : $program_PYTHONPATH
'';
pythonPath = extraModules;
})

287
pkgs/by-name/bl/blendfarm/deps.json generated Normal file
View File

@@ -0,0 +1,287 @@
[
{
"pname": "Avalonia",
"version": "0.10.15",
"hash": "sha256-YZCHjRkQ3b4sFQz/WcS68yWtHHDdjkcjmMup259JLgs="
},
{
"pname": "Avalonia.Angle.Windows.Natives",
"version": "2.1.0.2020091801",
"hash": "sha256-ahDcJNCqlNniItcat7owREQ0hfIwMWFNhnDu89lAVRI="
},
{
"pname": "Avalonia.Desktop",
"version": "0.10.15",
"hash": "sha256-5pIO3hCOyhfnjW0hIJf4tKeNZ6+JLa/t2esI8bYh7HE="
},
{
"pname": "Avalonia.FreeDesktop",
"version": "0.10.15",
"hash": "sha256-+vPpBkODP04gPiD2H+fw5jGqTBx5RV37S0u/WoOCAq8="
},
{
"pname": "Avalonia.Native",
"version": "0.10.15",
"hash": "sha256-Aiwl+EikxREOOVFihCzfoM8h/KuCUsOgu9vPQrGBEVw="
},
{
"pname": "Avalonia.Remote.Protocol",
"version": "0.10.15",
"hash": "sha256-4oBCoaplaEEPObr32WpBpoBSKtfkSdkFDyZkZz//Se0="
},
{
"pname": "Avalonia.Skia",
"version": "0.10.15",
"hash": "sha256-EDz78nCxmdPyGRHMtGT7q37K6Gigh7+8ZZmIr7VVlnY="
},
{
"pname": "Avalonia.Win32",
"version": "0.10.15",
"hash": "sha256-nPv8iPGBCOVBMKjeTw8xjHk6ZcGDsdGIPIwvpCiSqtM="
},
{
"pname": "Avalonia.X11",
"version": "0.10.15",
"hash": "sha256-ahqoRw/htLvmyl+bpmpr7kAiV8hlm1BCFWs0hWIKDYg="
},
{
"pname": "HarfBuzzSharp",
"version": "2.8.2-preview.178",
"hash": "sha256-dtvXNjVSU1WZ4kFsT6VV56R8iGMPHtdM09dfeejnttw="
},
{
"pname": "HarfBuzzSharp.NativeAssets.Linux",
"version": "2.8.2-preview.178",
"hash": "sha256-Vyy8zgtqw1uLJTbWNTS+wt/7yNuO4qzYU5a91Sf1ApA="
},
{
"pname": "HarfBuzzSharp.NativeAssets.macOS",
"version": "2.8.2-preview.178",
"hash": "sha256-YqGYQttBmNRCmkSS+JRfqTsPnuMdKxkYU9ctS5mKFV0="
},
{
"pname": "HarfBuzzSharp.NativeAssets.WebAssembly",
"version": "2.8.2-preview.178",
"hash": "sha256-QAwWpNc03Vh2RSqIW0xE/rmQCvl/IWs87QREqZNXMtk="
},
{
"pname": "HarfBuzzSharp.NativeAssets.Win32",
"version": "2.8.2-preview.178",
"hash": "sha256-J9exQ3FxRHMF8tHTc4zhjYGQ6eBYb4ZKwWhzk2L0uuQ="
},
{
"pname": "JetBrains.Annotations",
"version": "10.3.0",
"hash": "sha256-6I/8HtwvEK0JLgRcSrCzCtUfMylj88s5JNcl9ZDoLb8="
},
{
"pname": "Microsoft.Bcl.AsyncInterfaces",
"version": "5.0.0",
"hash": "sha256-bpJjcJSUSZH0GeOXoZI12xUQOf2SRtxG7sZV0dWS5TI="
},
{
"pname": "Microsoft.NETCore.Platforms",
"version": "1.0.1",
"hash": "sha256-mZotlGZqtrqDSoBrZhsxFe6fuOv5/BIo0w2Z2x0zVAU="
},
{
"pname": "Microsoft.NETCore.Platforms",
"version": "1.1.0",
"hash": "sha256-FeM40ktcObQJk4nMYShB61H/E8B7tIKfl9ObJ0IOcCM="
},
{
"pname": "Microsoft.NETCore.Platforms",
"version": "2.0.0",
"hash": "sha256-IEvBk6wUXSdyCnkj6tHahOJv290tVVT8tyemYcR0Yro="
},
{
"pname": "Microsoft.NETCore.Platforms",
"version": "3.1.1",
"hash": "sha256-ByV7aEFjGR4L4Tudg4KaJ96lnzr7RhOxzWGE0p5XFRY="
},
{
"pname": "Microsoft.NETCore.Targets",
"version": "1.0.1",
"hash": "sha256-lxxw/Gy32xHi0fLgFWNj4YTFBSBkjx5l6ucmbTyf7V4="
},
{
"pname": "Microsoft.Win32.SystemEvents",
"version": "4.5.0",
"hash": "sha256-WFqy842DMQG4W1H2ewXWflfBJ+lQf/LwP0KI4OfY0zo="
},
{
"pname": "Microsoft.Win32.SystemEvents",
"version": "6.0.0",
"hash": "sha256-N9EVZbl5w1VnMywGXyaVWzT9lh84iaJ3aD48hIBk1zA="
},
{
"pname": "NETStandard.Library",
"version": "2.0.3",
"hash": "sha256-Prh2RPebz/s8AzHb2sPHg3Jl8s31inv9k+Qxd293ybo="
},
{
"pname": "runtime.any.System.Runtime",
"version": "4.1.0",
"hash": "sha256-FZC+BNSzSkN3rObLJJAqwW/vNnJ+PiwdvNNufuISWVY="
},
{
"pname": "runtime.native.System",
"version": "4.0.0",
"hash": "sha256-bmaM0ovT4X4aqDJOR255Yda/u3fmHZskU++lMnsy894="
},
{
"pname": "runtime.unix.System.Private.Uri",
"version": "4.0.1",
"hash": "sha256-1Q50COfWkU4/y9eBWj0jPDp3qvy19vRCZnDKQthrhUU="
},
{
"pname": "SharpCompress",
"version": "0.26.0",
"hash": "sha256-BcdSBd4Hv1zg1YGpfgKGG37DcxeWpW+sW0EScpF7ng0="
},
{
"pname": "SkiaSharp",
"version": "2.88.0",
"hash": "sha256-0YpAxE+MyEydxBSmI9zqqqSII2Qvp2gz9pVUcf1/DnM="
},
{
"pname": "SkiaSharp",
"version": "2.88.1-preview.1",
"hash": "sha256-FdKGXukqhZiejuTqq57Yp3L6sU2LYLfq8zNlBo/pN8Q="
},
{
"pname": "SkiaSharp.NativeAssets.Linux",
"version": "2.88.1-preview.1",
"hash": "sha256-oR0fcdtU5K8H0M/9URAIVXqUPRZiPHh+0BzMHdnIOOU="
},
{
"pname": "SkiaSharp.NativeAssets.Linux.NoDependencies",
"version": "2.88.0",
"hash": "sha256-JzA3K9sOuwLrD0ZPLMrzlCQa8sFQlvWL0a1ihPELtsM="
},
{
"pname": "SkiaSharp.NativeAssets.macOS",
"version": "2.88.0",
"hash": "sha256-eMTo8zA0VHOOU8JPc+viWUaWJBy19vm2G97JYCprFzQ="
},
{
"pname": "SkiaSharp.NativeAssets.macOS",
"version": "2.88.1-preview.1",
"hash": "sha256-kIgfxQYu1eshg80JfmERNkjBVVJFRTqN1VcQenm2pfA="
},
{
"pname": "SkiaSharp.NativeAssets.WebAssembly",
"version": "2.88.1-preview.1",
"hash": "sha256-OH8aBCNQPR0QQWg3cUytuYW49JET+wF8poDYR6gXklc="
},
{
"pname": "SkiaSharp.NativeAssets.Win32",
"version": "2.88.0",
"hash": "sha256-dxdvAJOIw55u0Dd9NOyNYfE2XAg3Jv89J54TtTKJtow="
},
{
"pname": "SkiaSharp.NativeAssets.Win32",
"version": "2.88.1-preview.1",
"hash": "sha256-m24HrDOUXn6s+HJqMs3eQb2Q5lqTTZp+cvEeEtpSoMw="
},
{
"pname": "System.Buffers",
"version": "4.5.1",
"hash": "sha256-wws90sfi9M7kuCPWkv1CEYMJtCqx9QB/kj0ymlsNaxI="
},
{
"pname": "System.ComponentModel.Annotations",
"version": "4.5.0",
"hash": "sha256-15yE2NoT9vmL9oGCaxHClQR1jLW1j1ef5hHMg55xRso="
},
{
"pname": "System.Drawing.Common",
"version": "4.5.0",
"hash": "sha256-DLYGJraIfSj0Zmpi2H5Am2AsZ+kP5UVGdjakqj9Q2E4="
},
{
"pname": "System.Drawing.Common",
"version": "6.0.0",
"hash": "sha256-/9EaAbEeOjELRSMZaImS1O8FmUe8j4WuFUw1VOrPyAo="
},
{
"pname": "System.Memory",
"version": "4.5.3",
"hash": "sha256-Cvl7RbRbRu9qKzeRBWjavUkseT2jhZBUWV1SPipUWFk="
},
{
"pname": "System.Memory",
"version": "4.5.4",
"hash": "sha256-3sCEfzO4gj5CYGctl9ZXQRRhwAraMQfse7yzKoRe65E="
},
{
"pname": "System.Numerics.Vectors",
"version": "4.5.0",
"hash": "sha256-qdSTIFgf2htPS+YhLGjAGiLN8igCYJnCCo6r78+Q+c8="
},
{
"pname": "System.Private.Uri",
"version": "4.0.1",
"hash": "sha256-MjVaZHx8DUFnVUxOEEaU9GxF6EyEXbcuI1V7yRXEp0w="
},
{
"pname": "System.Reactive",
"version": "5.0.0",
"hash": "sha256-M5Z8pw8rVb8ilbnTdaOptzk5VFd5DlKa7zzCpuytTtE="
},
{
"pname": "System.Reflection.Emit",
"version": "4.7.0",
"hash": "sha256-Fw/CSRD+wajH1MqfKS3Q/sIrUH7GN4K+F+Dx68UPNIg="
},
{
"pname": "System.Runtime",
"version": "4.1.0",
"hash": "sha256-FViNGM/4oWtlP6w0JC0vJU+k9efLKZ+yaXrnEeabDQo="
},
{
"pname": "System.Runtime.CompilerServices.Unsafe",
"version": "4.6.0",
"hash": "sha256-FTjQeMuvqnKxpoVsVh/OlQ21NMaZiFtOdv7VdZ+Iv3Y="
},
{
"pname": "System.Runtime.CompilerServices.Unsafe",
"version": "5.0.0",
"hash": "sha256-neARSpLPUzPxEKhJRwoBzhPxK+cKIitLx7WBYncsYgo="
},
{
"pname": "System.Security.Principal.Windows",
"version": "4.7.0",
"hash": "sha256-rWBM2U8Kq3rEdaa1MPZSYOOkbtMGgWyB8iPrpIqmpqg="
},
{
"pname": "System.Text.Encoding.CodePages",
"version": "4.7.1",
"hash": "sha256-OUA8ttAKGgqD5KUwtnO2OewBF/tJI0nO3YcunK5qMPg="
},
{
"pname": "System.Text.Encodings.Web",
"version": "5.0.0",
"hash": "sha256-IYctBEelnDQbDTPJh0yfFRucAQvPkXaymmswWYx/l5A="
},
{
"pname": "System.Text.Json",
"version": "5.0.0",
"hash": "sha256-epL8glCZZnsgW+dcmVtsYX0uZ08Jvhkzri9j81Gg774="
},
{
"pname": "System.Threading.Tasks.Extensions",
"version": "4.5.4",
"hash": "sha256-owSpY8wHlsUXn5xrfYAiu847L6fAKethlvYx97Ri1ng="
},
{
"pname": "System.ValueTuple",
"version": "4.5.0",
"hash": "sha256-niH6l2fU52vAzuBlwdQMw0OEoRS/7E1w5smBFoqSaAI="
},
{
"pname": "Tmds.DBus",
"version": "0.9.0",
"hash": "sha256-w332WVsJrdAOnlSUtgvatSTtnoC81C3LG6J2ip42fW8="
}
]

View File

@@ -0,0 +1,143 @@
From aecfb0a69f9e418158d4a09ec955e0c3f4d8f062 Mon Sep 17 00:00:00 2001
From: Lyze <11274700+lyze237@users.noreply.github.com>
Date: Fri, 20 Sep 2024 19:48:58 +0200
Subject: [PATCH] Fix nixos crashing
---
.../LogicReinc.BlendFarm.Client.csproj | 2 +-
LogicReinc.BlendFarm.Client/RenderTask.cs | 1 +
LogicReinc.BlendFarm.Client/Tasks/ChunkedTask.cs | 1 +
LogicReinc.BlendFarm.Client/Tasks/SplitChunkedTask.cs | 1 +
LogicReinc.BlendFarm.Client/Tasks/SplittedTask.cs | 1 +
.../runtimeconfig.template.json | 10 ++++++++++
LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj | 2 --
LogicReinc.BlendFarm/nuget.config | 11 -----------
LogicReinc.BlendFarm/runtimeconfig.template.json | 10 ++++++++++
9 files changed, 25 insertions(+), 14 deletions(-)
create mode 100644 LogicReinc.BlendFarm.Client/runtimeconfig.template.json
delete mode 100644 LogicReinc.BlendFarm/nuget.config
create mode 100644 LogicReinc.BlendFarm/runtimeconfig.template.json
diff --git a/LogicReinc.BlendFarm.Client/LogicReinc.BlendFarm.Client.csproj b/LogicReinc.BlendFarm.Client/LogicReinc.BlendFarm.Client.csproj
index d534ea7..698e8d6 100644
--- a/LogicReinc.BlendFarm.Client/LogicReinc.BlendFarm.Client.csproj
+++ b/LogicReinc.BlendFarm.Client/LogicReinc.BlendFarm.Client.csproj
@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="System.Drawing.Common" Version="5.0.0" />
+ <PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Text.Json" Version="5.0.0" />
</ItemGroup>
diff --git a/LogicReinc.BlendFarm.Client/RenderTask.cs b/LogicReinc.BlendFarm.Client/RenderTask.cs
index 9cc67dd..5ba3086 100644
--- a/LogicReinc.BlendFarm.Client/RenderTask.cs
+++ b/LogicReinc.BlendFarm.Client/RenderTask.cs
@@ -13,6 +13,7 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
+using ImageConverter = LogicReinc.BlendFarm.Client.ImageTypes.ImageConverter;
namespace LogicReinc.BlendFarm.Shared
{
diff --git a/LogicReinc.BlendFarm.Client/Tasks/ChunkedTask.cs b/LogicReinc.BlendFarm.Client/Tasks/ChunkedTask.cs
index 310fa20..d84dbea 100644
--- a/LogicReinc.BlendFarm.Client/Tasks/ChunkedTask.cs
+++ b/LogicReinc.BlendFarm.Client/Tasks/ChunkedTask.cs
@@ -5,6 +5,7 @@
using System.Drawing;
using System.Linq;
using System.Text;
+using ImageConverter = LogicReinc.BlendFarm.Client.ImageTypes.ImageConverter;
namespace LogicReinc.BlendFarm.Client.Tasks
{
diff --git a/LogicReinc.BlendFarm.Client/Tasks/SplitChunkedTask.cs b/LogicReinc.BlendFarm.Client/Tasks/SplitChunkedTask.cs
index 6ed55dd..bf1eb14 100644
--- a/LogicReinc.BlendFarm.Client/Tasks/SplitChunkedTask.cs
+++ b/LogicReinc.BlendFarm.Client/Tasks/SplitChunkedTask.cs
@@ -8,6 +8,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using ImageConverter = LogicReinc.BlendFarm.Client.ImageTypes.ImageConverter;
namespace LogicReinc.BlendFarm.Client.Tasks
{
diff --git a/LogicReinc.BlendFarm.Client/Tasks/SplittedTask.cs b/LogicReinc.BlendFarm.Client/Tasks/SplittedTask.cs
index 7edcb92..5483d8f 100644
--- a/LogicReinc.BlendFarm.Client/Tasks/SplittedTask.cs
+++ b/LogicReinc.BlendFarm.Client/Tasks/SplittedTask.cs
@@ -9,6 +9,7 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
+using ImageConverter = LogicReinc.BlendFarm.Client.ImageTypes.ImageConverter;
namespace LogicReinc.BlendFarm.Client.Tasks
{
diff --git a/LogicReinc.BlendFarm.Client/runtimeconfig.template.json b/LogicReinc.BlendFarm.Client/runtimeconfig.template.json
new file mode 100644
index 0000000..738771b
--- /dev/null
+++ b/LogicReinc.BlendFarm.Client/runtimeconfig.template.json
@@ -0,0 +1,10 @@
+{
+ "properties": {
+ "runtimeOptions": {
+ "System.Drawing.EnableUnixSupport": true
+ }
+ },
+ "configProperties": {
+ "System.Drawing.EnableUnixSupport": true
+ }
+}
diff --git a/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj b/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
index 97aa471..7e7096c 100644
--- a/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
+++ b/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
@@ -60,8 +60,6 @@
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.15" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.15" />
- <PackageReference Include="runtime.linux-x64.CoreCompat.System.Drawing" Version="1.0.0-beta009" />
- <PackageReference Include="runtime.osx.10.10-x64.CoreCompat.System.Drawing" Version="5.8.64" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.0" />
</ItemGroup>
<ItemGroup>
diff --git a/LogicReinc.BlendFarm/nuget.config b/LogicReinc.BlendFarm/nuget.config
deleted file mode 100644
index 6c273ab..0000000
--- a/LogicReinc.BlendFarm/nuget.config
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- To use the Avalonia CI feed to get unstable packages, move this file to the root of your solution.
--->
-
-<configuration>
- <packageSources>
- <add key="AvaloniaCI" value="https://www.myget.org/F/avalonia-ci/api/v2" />
- </packageSources>
-</configuration>
diff --git a/LogicReinc.BlendFarm/runtimeconfig.template.json b/LogicReinc.BlendFarm/runtimeconfig.template.json
new file mode 100644
index 0000000..738771b
--- /dev/null
+++ b/LogicReinc.BlendFarm/runtimeconfig.template.json
@@ -0,0 +1,10 @@
+{
+ "properties": {
+ "runtimeOptions": {
+ "System.Drawing.EnableUnixSupport": true
+ }
+ },
+ "configProperties": {
+ "System.Drawing.EnableUnixSupport": true
+ }
+}

View File

@@ -0,0 +1,14 @@
diff --git a/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj b/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
index 97aa471..3eaa259 100644
--- a/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
+++ b/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
@@ -9,6 +9,9 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>
+ <PropertyGroup>
+ <ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
+</PropertyGroup>
<ItemGroup>
<AvaloniaXaml Remove="Content\**" />
<Compile Remove="Content\**" />

View File

@@ -0,0 +1,39 @@
diff --git a/LogicReinc.BlendFarm.Server/LogicReinc.BlendFarm.Server.csproj b/LogicReinc.BlendFarm.Server/LogicReinc.BlendFarm.Server.csproj
index 9bd2039..720bcb0 100644
--- a/LogicReinc.BlendFarm.Server/LogicReinc.BlendFarm.Server.csproj
+++ b/LogicReinc.BlendFarm.Server/LogicReinc.BlendFarm.Server.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup>
diff --git a/LogicReinc.BlendFarm.Tests/LogicReinc.BlendFarm.Tests.csproj b/LogicReinc.BlendFarm.Tests/LogicReinc.BlendFarm.Tests.csproj
index 5a00198..839f2d7 100644
--- a/LogicReinc.BlendFarm.Tests/LogicReinc.BlendFarm.Tests.csproj
+++ b/LogicReinc.BlendFarm.Tests/LogicReinc.BlendFarm.Tests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
diff --git a/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj b/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
index 97aa471..5a01eb8 100644
--- a/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
+++ b/LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<ApplicationIcon>render.ico</ApplicationIcon>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
</PropertyGroup>

View File

@@ -0,0 +1,142 @@
{
lib,
stdenv,
fetchFromGitHub,
buildDotnetModule,
dotnetCorePackages,
xz,
pcre,
autoPatchelfHook,
bintools,
fixDarwinDylibNames,
darwin,
fontconfig,
libgdiplus,
libXrandr,
glib,
writeShellScriptBin,
blender,
openssl,
libkrb5,
icu,
}:
let
# blendfarm (client) will run from the current workdir.
# It needs to create files there, so it cannot be in the nix store.
# We also need to create some files there so it can work with its
# server part.
USERHOMEDIR = "~/.local/share/blendfarm";
blendfarm-nix = writeShellScriptBin "blendfarm-nix" ''
if [[ -z $BLENDFARM_HOME && ! -d ${USERHOMEDIR} ]]; then
echo "Creating home for blendfarm at ${USERHOMEDIR}"
echo "You can change that by setting BLENDFARM_HOME to another directory"
fi
if [[ -z $BLENDFARM_HOME ]]; then
BLENDFARM_HOME=${USERHOMEDIR}
fi
mkdir -p $BLENDFARM_HOME/BlenderData/nix-blender-linux64 > /dev/null 2>&1
ln -s ${lib.getExe blender} $BLENDFARM_HOME/BlenderData/nix-blender-linux64/blender > /dev/null 2>&1
echo "nix-blender" > $BLENDFARM_HOME/VersionCustom
cd $BLENDFARM_HOME
exec -a "$0" @out@/bin/LogicReinc.BlendFarm "$@"
'';
in
buildDotnetModule rec {
pname = "blendfarm";
version = "1.1.6";
src = fetchFromGitHub {
owner = "LogicReinc";
repo = "LogicReinc.BlendFarm";
rev = "v${version}";
hash = "sha256-2w2tdl5n0IFTuthY97NYMeyRe2r72jaKFfoNSjWQMM4=";
};
patches = [
# https://github.com/LogicReinc/LogicReinc.BlendFarm/pull/121
./fix-nixos-crashing-on-runtime.patch
# https://github.com/LogicReinc/LogicReinc.BlendFarm/pull/122
./rename-evee-to-eevee_next.patch
# Fixes the error with net8 update:
# "The referenced project is a non self-contained executable.
# A non self-contained executable cannot be referenced by a self-contained executable"
./fix-references.patch
# Update project files to net8
./net8.patch
];
nativeBuildInputs =
[ ]
++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
bintools
fixDarwinDylibNames
darwin.autoSignDarwinBinariesHook
];
buildInputs = [
(lib.getLib stdenv.cc.cc)
fontconfig
openssl
libkrb5
icu
];
runtimeDeps = [
xz
pcre
libgdiplus
glib
libXrandr
]
++ lib.optionals stdenv.hostPlatform.isLinux [ blender ];
# there is no "*.so.3" or "*.so.5" in nixpkgs. So ignore the warning
# and add it later
autoPatchelfIgnoreMissingDeps = [
"libpcre.so.3"
"liblzma.so.5"
];
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0;
projectFile = [
"LogicReinc.BlendFarm.Client/LogicReinc.BlendFarm.Client.csproj"
"LogicReinc.BlendFarm.Server/LogicReinc.BlendFarm.Server.csproj"
"LogicReinc.BlendFarm/LogicReinc.BlendFarm.csproj"
];
nugetDeps = ./deps.json;
executables = [
"LogicReinc.BlendFarm"
"LogicReinc.BlendFarm.Server"
];
# add libraries not found by autopatchelf
libPath = lib.makeLibraryPath [
pcre
xz
];
makeWrapperArgs = [ "--prefix LD_LIBRARY_PATH : ${libPath}" ];
postInstall =
lib.optionalString stdenv.hostPlatform.isLinux ''
mkdir -p $out/bin
cp -v ${blendfarm-nix}/bin/blendfarm-nix $out/bin
substituteInPlace $out/bin/blendfarm-nix --subst-var out
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
ln -s ${libgdiplus}/lib/libgdiplus.dylib $out/lib/blendfarm/
'';
meta = with lib; {
description = "Open-source, cross-platform, stand-alone, Network Renderer for Blender";
homepage = "https://github.com/LogicReinc/LogicReinc.BlendFarm";
license = with licenses; [ gpl3Plus ];
maintainers = with maintainers; [ gador ];
mainProgram = "blendfarm-nix";
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,36 @@
From 6276136de0fc567d3a2cc2ecff6effc27688d1a4 Mon Sep 17 00:00:00 2001
From: Lyze <11274700+lyze237@users.noreply.github.com>
Date: Fri, 20 Sep 2024 20:04:13 +0200
Subject: [PATCH] Fix eevee getting renamed to eevee_next
---
LogicReinc.BlendFarm.Server/render.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/LogicReinc.BlendFarm.Server/render.py b/LogicReinc.BlendFarm.Server/render.py
index dcff178..f0cf304 100644
--- a/LogicReinc.BlendFarm.Server/render.py
+++ b/LogicReinc.BlendFarm.Server/render.py
@@ -19,6 +19,7 @@
from multiprocessing import cpu_count
isPre3 = bpy.app.version < (3,0,0);
+isPreEeveeRename = bpy.app.version < (4, 2, 0);
if(isPre3):
print('Detected Blender >= 3.0.0\n');
@@ -218,8 +219,12 @@ def renderWithSettings(renderSettings, id, path):
scn.render.fps = fps;
if(engine == 1): #Eevee
- print("Using EEVEE");
- scn.render.engine = "BLENDER_EEVEE";
+ if(isPreEeveeRename):
+ print("Using EEVEE");
+ scn.render.engine = "BLENDER_EEVEE";
+ else:
+ print("Using EEVEE_NEXT");
+ scn.render.engine = "BLENDER_EEVEE_NEXT";
else:
scn.render.engine = "CYCLES";

View File

@@ -0,0 +1,69 @@
{
lib,
stdenvNoCC,
fetchzip,
runtimeShell,
bashInteractive,
glibcLocales,
}:
stdenvNoCC.mkDerivation rec {
pname = "blesh";
version = "0.4.0-devel3";
src = fetchzip {
url = "https://github.com/akinomyoga/ble.sh/releases/download/v${version}/ble-${version}.tar.xz";
sha256 = "sha256-kGLp8RaInYSrJEi3h5kWEOMAbZV/gEPFUjOLgBuMhCI=";
};
dontBuild = true;
doCheck = true;
nativeCheckInputs = [
bashInteractive
glibcLocales
];
preCheck = "export LC_ALL=en_US.UTF-8";
installPhase = ''
runHook preInstall
mkdir -p "$out/share/blesh/lib"
cat <<EOF >"$out/share/blesh/lib/_package.sh"
_ble_base_package_type=nix
function ble/base/package:nix/update {
echo "Ble.sh is installed by Nix. You can update it there." >&2
return 1
}
EOF
cp -rv $src/* $out/share/blesh
runHook postInstall
'';
postInstall = ''
mkdir -p "$out/bin"
cat <<EOF >"$out/bin/blesh-share"
#!${runtimeShell}
# Run this script to find the ble.sh shared folder
# where all the shell scripts are living.
echo "$out/share/blesh"
EOF
chmod +x "$out/bin/blesh-share"
'';
meta = with lib; {
homepage = "https://github.com/akinomyoga/ble.sh";
description = "Bash Line Editor -- a full-featured line editor written in pure Bash";
mainProgram = "blesh-share";
license = licenses.bsd3;
maintainers = with maintainers; [
aiotter
matthiasbeyer
];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "blflash";
version = "0.3.5";
src = fetchFromGitHub {
owner = "spacemeowx2";
repo = "blflash";
rev = "v${version}";
hash = "sha256-lv5bUbq5AnZVeR8V0A4pamY9ZIQAhLmvZEr+CRMPcj0=";
};
cargoHash = "sha256-9CTq/NFhc/pJ3CyvhidQxbWx5iHFbOZDPm3g7cz6uRU=";
meta = with lib; {
description = "Bl602 serial flasher written in Rust";
homepage = "https://github.com/spacemeowx2/blflash";
license = with licenses; [
mit
asl20
];
maintainers = with maintainers; [ _0x4A6F ];
mainProgram = "blflash";
};
}

View File

@@ -0,0 +1,85 @@
{
lib,
fetchFromGitHub,
fetchpatch2,
python3Packages,
qt6Packages,
libvncserver,
}:
python3Packages.buildPythonApplication rec {
pname = "blink-qt";
version = "6.0.4";
pyproject = true;
src = fetchFromGitHub {
owner = "AGProjects";
repo = "blink-qt";
tag = version;
hash = "sha256-QESg9yo5oddYqSKuFLSMI2Oju3FCq97+j0uJDK85Yy8=";
};
patches = [
# Remove when version > 6.0.4
(fetchpatch2 {
url = "https://github.com/AGProjects/blink-qt/commit/45343c90ae0680a3d03589fa8a12ac1eb85a6925.patch";
hash = "sha256-XwV5L3r0IqWkhlaJypS2cHkDCcoumOgEEqDpdcaTviE=";
})
];
nativeBuildInputs = [ qt6Packages.wrapQtAppsHook ];
build-system = with python3Packages; [
cython
setuptools
];
buildInputs = [
libvncserver
qt6Packages.qtbase
qt6Packages.qtsvg
];
dependencies = with python3Packages; [
dateutils
dnspython
google-api-python-client
lxml
lxml-html-clean
msrplib
oauth2client
otr
pgpy
pyqt6
pyqt6-webengine
python3-application
python3-eventlib
python3-gnutls
sipsimple
sqlobject
standard-imghdr
xcaplib
];
dontWrapQtApps = true;
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
pythonImportsCheck = [ "blink" ];
# no upstream tests exist
doCheck = false;
meta = {
description = "Blink SIP Client";
homepage = "https://icanblink.com";
downloadPage = "https://github.com/agprojects/blink-qt";
changelog = "https://github.com/AGProjects/blink-qt/releases/tag/${version}";
license = lib.licenses.gpl3Plus;
teams = [ lib.teams.ngi ];
platforms = lib.platforms.unix;
mainProgram = "blink";
};
}

View File

@@ -0,0 +1,48 @@
{
stdenv,
fetchFromGitHub,
lib,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blink";
version = "1.1.0";
src = fetchFromGitHub {
owner = "jart";
repo = "blink";
rev = finalAttrs.version;
hash = "sha256-4wgDftXOYm2fMP+/aTRljDi38EzbbwAJlQkuxjAMl3I=";
};
buildInputs = [ zlib ];
# Do not include --enable-static and --disable-shared flags during static compilation
dontAddStaticConfigureFlags = true;
# Don't add --build and --host flags as they are not supported
configurePlatforms = lib.optionals stdenv.hostPlatform.isStatic [ ];
# ./configure script expects --static not standard --enable-static
configureFlags = lib.optional stdenv.hostPlatform.isStatic "--static";
# 'make check' requires internet connection
doCheck = true;
checkTarget = "test";
meta = {
description = "Tiniest x86-64-linux emulator";
longDescription = ''
blink is a virtual machine that runs x86-64-linux programs on different operating systems and hardware architectures. It's designed to do the same thing as the qemu-x86_64 command, except that
- blink is much smaller in size than qemu-x86_64
- blink will run your Linux binaries on any POSIX platform, whereas qemu-x86_64 only supports Linux
- blink goes 2x faster than qemu-x86_64 on some benchmarks, such as SSE integer / floating point math. Blink is also faster at running ephemeral programs such as compilers
'';
homepage = "https://github.com/jart/blink";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ t4ccer ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
libusb1,
}:
stdenv.mkDerivation rec {
pname = "blink1";
version = "2.2.0";
src = fetchFromGitHub {
owner = "todbot";
repo = "blink1-tool";
tag = "v${version}";
fetchSubmodules = true;
hash = "sha256-xuCjPSQUQ/KOcdsie/ndecUiEt+t46m4eI33PXJoAAY=";
};
postPatch = ''
substituteInPlace Makefile \
--replace "@git submodule update --init" "true"
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libusb1 ];
makeFlags = [
"GIT_TAG=v${version}"
"USBLIB_TYPE=HIDAPI"
"HIDAPI_TYPE=LIBUSB"
];
hardeningDisable = [ "format" ];
installFlags = [ "PREFIX=${placeholder "out"}" ];
meta = with lib; {
description = "Command line client for the blink(1) notification light";
homepage = "https://blink1.thingm.com/";
license = with licenses; [ cc-by-sa-40 ];
maintainers = with maintainers; [ cransom ];
platforms = platforms.linux;
mainProgram = "blink1-tool";
};
}

View File

@@ -0,0 +1,73 @@
{
lib,
python3Packages,
fetchFromGitHub,
versionCheckHook,
nixosTests,
}:
python3Packages.buildPythonApplication rec {
pname = "blint";
version = "2.4.1";
pyproject = true;
src = fetchFromGitHub {
owner = "owasp-dep-scan";
repo = "blint";
tag = "v${version}";
hash = "sha256-mGeC7+YzQWSlT3sW2la/f21fN8V+YoFd4fwj/PBPCMI=";
};
build-system = [
python3Packages.poetry-core
];
dependencies = with python3Packages; [
pyyaml
appdirs
apsw
ar
custom-json-diff
defusedxml
email-validator
lief
oras
orjson
packageurl-python
pydantic
rich
symbolic
];
pythonRelaxDeps = [
"apsw"
"symbolic"
];
pythonImportsCheck = [
"blint"
];
nativeCheckInputs = with python3Packages; [
pytestCheckHook
pytest-cov-stub
];
# only runs on windows and fails, obviously
disabledTests = [
"test_demangle"
];
passthru.tests = { inherit (nixosTests) blint; };
meta = {
description = "Binary Linter to check the security properties, and capabilities in executables";
homepage = "https://github.com/owasp-dep-scan/blint";
changelog = "https://github.com/owasp-dep-scan/blint/releases/tag/v${version}";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ ethancedwards8 ];
teams = with lib.teams; [ ngi ];
mainProgram = "blint";
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchFromGitHub,
perl,
python3,
# Enable BLAS interface with 64-bit integer width.
blas64 ? false,
# Target architecture. x86_64 builds Intel and AMD kernels.
withArchitecture ? "x86_64",
# Enable OpenMP-based threading.
withOpenMP ? true,
}:
let
blasIntSize = if blas64 then "64" else "32";
in
stdenv.mkDerivation rec {
pname = "blis";
version = "2.0";
src = fetchFromGitHub {
owner = "flame";
repo = "blis";
tag = version;
sha256 = "sha256-+n8SbiiEJDN4j1IPmZfI5g1i2J+jWrUXh7S48JEDTAE=";
};
inherit blas64;
nativeBuildInputs = [
perl
python3
];
doCheck = true;
enableParallelBuilding = true;
configureFlags = [
"--enable-cblas"
"--blas-int-size=${blasIntSize}"
]
++ lib.optionals withOpenMP [ "--enable-threading=openmp" ]
++ [ withArchitecture ];
postPatch = ''
patchShebangs configure build/flatten-headers.py
'';
postInstall = ''
ln -s $out/lib/libblis.so.4 $out/lib/libblas.so.3
ln -s $out/lib/libblis.so.4 $out/lib/libcblas.so.3
ln -s $out/lib/libblas.so.3 $out/lib/libblas.so
ln -s $out/lib/libcblas.so.3 $out/lib/libcblas.so
'';
meta = with lib; {
description = "BLAS-compatible linear algebra library";
homepage = "https://github.com/flame/blis";
license = licenses.bsd3;
maintainers = with maintainers; [ stephen-huan ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchFromGitHub,
argtable,
cmake,
libserialport,
pkg-config,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blisp";
version = "0.0.5";
src = fetchFromGitHub {
owner = "pine64";
repo = "blisp";
rev = "v${finalAttrs.version}";
hash = "sha256-qjZ5BNQR57J78Y6MT9I388OCLOiYTevPJ2btgmtkpJw=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
argtable
libserialport
];
cmakeFlags = [
"-DBLISP_BUILD_CLI=ON"
"-DBLISP_USE_SYSTEM_LIBRARIES=ON"
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-error=implicit-function-declaration";
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
version = "v${finalAttrs.version}";
};
meta = with lib; {
description = "In-System-Programming (ISP) tool & library for Bouffalo Labs RISC-V Microcontrollers and SoCs";
license = licenses.mit;
mainProgram = "blisp";
homepage = "https://github.com/pine64/blisp";
platforms = platforms.unix;
maintainers = [ maintainers.bdd ];
};
})

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
unzip,
doxygen,
}:
stdenv.mkDerivation rec {
pname = "bliss";
version = "0.73";
src = fetchurl {
url = "http://www.tcs.hut.fi/Software/bliss/${pname}-${version}.zip";
sha256 = "f57bf32804140cad58b1240b804e0dbd68f7e6bf67eba8e0c0fa3a62fd7f0f84";
};
patches = fetchurl {
url = "http://scip.zib.de/download/bugfixes/scip-5.0.1/bliss-0.73.patch";
sha256 = "815868d6586bcd49ff3c28e14ccb536d38b2661151088fe08187c13909c5dab0";
};
nativeBuildInputs = [
unzip
doxygen
];
preBuild = ''
doxygen Doxyfile
'';
installPhase = ''
mkdir -p $out/bin $out/share/doc/bliss $out/lib $out/include/bliss
mv bliss $out/bin
mv html/* COPYING* $out/share/doc/bliss
mv *.a $out/lib
mv *.h *.hh $out/include/bliss
'';
meta = with lib; {
description = "Open source tool for computing automorphism groups and canonical forms of graphs. It has both a command line user interface as well as C++ and C programming language APIs";
mainProgram = "bliss";
homepage = "http://www.tcs.hut.fi/Software/bliss/";
license = licenses.lgpl3;
platforms = [
"i686-linux"
"x86_64-linux"
"aarch64-linux"
];
};
}

View File

@@ -0,0 +1,91 @@
{
stdenv,
lib,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
gfortran,
texinfo,
python3,
boost,
# Select SIMD alignment width (in bytes) for vectorization.
simdWidth ? 1,
# Pad arrays to simdWidth by default?
# Note: Only useful if simdWidth > 1
enablePadding ? false,
# Activate serialization through Boost.Serialize?
enableSerialization ? true,
# Activate test-suite?
# WARNING: Some of the tests require up to 1700MB of memory to compile.
doCheck ? true,
}:
let
inherit (lib) optional optionals;
in
stdenv.mkDerivation rec {
pname = "blitz++";
version = "1.0.2";
src = fetchFromGitHub {
owner = "blitzpp";
repo = "blitz";
tag = version;
hash = "sha256-wZDg+4lCd9iHvxuQQE/qs58NorkxZ0+mf+8PKQ57CDE=";
};
patches = [
# https://github.com/blitzpp/blitz/pull/180
(fetchpatch {
name = "use-cmake-install-full-dir.patch";
url = "https://github.com/blitzpp/blitz/commit/020f1d768c7fa3265cec244dc28f3dc8572719c5.patch";
hash = "sha256-8hYFNyWrejjIWPN/HzIOphD4Aq6Soe0FFUBmwV4tpWQ=";
})
];
nativeBuildInputs = [
cmake
pkg-config
python3
texinfo
];
buildInputs = [
gfortran
texinfo
boost
];
cmakeFlags =
optional enablePadding "-DARRAY_LENGTH_PADDING=ON"
++ optional enableSerialization "-DENABLE_SERIALISATION=ON"
++ optional stdenv.hostPlatform.is64bit "-DBZ_FULLY64BIT=ON";
# FIXME ++ optional doCheck "-DBUILD_TESTING=ON";
# skip broken library name detection
ax_boost_user_serialization_lib = lib.optionalString stdenv.hostPlatform.isDarwin "boost_serialization";
enableParallelBuilding = true;
inherit doCheck;
meta = with lib; {
description = "Fast multi-dimensional array library for C++";
homepage = "https://sourceforge.net/projects/blitz/";
license = with licenses; [
artistic2 # or
bsd3 # or
lgpl3Plus
];
platforms = platforms.unix;
maintainers = with maintainers; [ ToxicFrog ];
longDescription = ''
Blitz++ is a C++ class library for scientific computing which provides
performance on par with Fortran 77/90. It uses template techniques to
achieve high performance. Blitz++ provides dense arrays and vectors,
random number generators, and small vectors (useful for representing
multicomponent or vector fields).
'';
};
}

View File

@@ -0,0 +1,79 @@
# Notes for using this package outside of NixOS:
# 1. --pure cannot be used (as pkexec will be used from the path,
# and we can't use nixpkgs polkit due to lack of setuid bit)
# 2. You must prefix the blivet-gui command with "SHELL=/bin/bash"
# (otherwise your system polkit will reject the SHEL Lfrom nixpkgs).
{
lib,
python3,
fetchFromGitHub,
gtk3,
util-linux,
gobject-introspection,
adwaita-icon-theme,
hicolor-icon-theme,
wrapGAppsHook3,
pkexecPath ? "pkexec",
testers,
blivet-gui,
}:
python3.pkgs.buildPythonApplication rec {
pname = "blivet-gui";
version = "2.6.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "storaged-project";
repo = "blivet-gui";
tag = version;
hash = "sha256-e9YdfFHmKXsbqkzs4++nNlvqm/p6lZmc01A+g+NtuDI=";
};
postPatch = ''
substituteInPlace blivetgui/gui_utils.py --replace-fail /usr/share $out/share
substituteInPlace blivet-gui --replace-fail "pkexec blivet-gui-daemon" "pkexec $out/bin/blivet-gui-daemon"
substituteInPlace blivet-gui --replace-fail "pkexec" "${pkexecPath}"
substituteInPlace blivet-gui.desktop --replace-fail /usr/bin/blivet-gui $out/bin/blivet-gui
substituteInPlace org.fedoraproject.pkexec.blivet-gui.policy --replace-fail /usr/bin/blivet-gui-daemon $out/bin/blivet-gui-daemon
'';
nativeBuildInputs = [
util-linux
gobject-introspection
wrapGAppsHook3
];
buildInputs = [ gtk3 ];
build-system = [
python3.pkgs.setuptools
];
dependencies = [
python3.pkgs.blivet
python3.pkgs.pyparted
python3.pkgs.pid
];
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
''${gappsWrapperArgs[@]}
--prefix XDG_DATA_DIRS : ${adwaita-icon-theme}/share
)
'';
passthru.tests.version = testers.testVersion { package = blivet-gui; };
meta = {
description = "GUI tool for storage configuration using blivet library";
homepage = "https://fedoraproject.org/wiki/Blivet";
license = lib.licenses.gpl2Plus;
mainProgram = "blivet-gui";
maintainers = with lib.maintainers; [ cybershadow ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
stdenv,
fetchurl,
libaio,
}:
stdenv.mkDerivation rec {
pname = "blktrace";
version = "1.3.0";
# Official source
# "https://git.kernel.org/pub/scm/linux/kernel/git/axboe/blktrace.git"
src = fetchurl {
url = "https://brick.kernel.dk/snaps/blktrace-${version}.tar.bz2";
sha256 = "sha256-1t7aA4Yt4r0bG5+6cpu7hi2bynleaqf3yoa2VoEacNY=";
};
buildInputs = [ libaio ];
makeFlags = [
"prefix=${placeholder "out"}"
"CC:=$(CC)"
];
meta = with lib; {
description = "Block layer IO tracing mechanism";
maintainers = with maintainers; [ nickcao ];
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
buildGoModule,
fetchgit,
unstableGitUpdater,
}:
buildGoModule {
pname = "bloat";
version = "0-unstable-2024-12-27";
src = fetchgit {
url = "git://git.freesoftwareextremist.com/bloat";
rev = "d171b6c2d50500cdfd2f3308bf82a5f79e22cd8b";
hash = "sha256-a9nL6NvZLQZLOuoqdDbZTH9dVtQ6guKopkAHughINcg=";
};
vendorHash = null;
postInstall = ''
mkdir -p $out/share/bloat
cp -r templates $out/share/bloat/templates
cp -r static $out/share/bloat/static
sed \
-e "s%=templates%=$out/share/bloat/templates%g" \
-e "s%=static%=$out/share/bloat/static%g" \
< bloat.conf > $out/share/bloat/bloat.conf.example
'';
passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
description = "Web client for Pleroma and Mastodon";
longDescription = ''
A lightweight web client for Pleroma and Mastodon.
Does not require JavaScript to display text, images, audio and videos.
'';
homepage = "https://bloat.freesoftwareextremist.com";
downloadPage = "https://git.freesoftwareextremist.com/bloat/";
license = licenses.cc0;
maintainers = with maintainers; [ fgaz ];
mainProgram = "bloat";
};
}

View File

@@ -0,0 +1,91 @@
{
lib,
stdenv,
cmake,
zlib,
fetchFromGitHub,
re2,
abseil-cpp,
protobuf,
capstone,
gtest,
pkg-config,
lit,
llvmPackages,
}:
let
# Old vendored package which has no other use than here, so not packaged in nixpkgs.
demumble = fetchFromGitHub {
owner = "nico";
repo = "demumble";
rev = "01098eab821b33bd31b9778aea38565cd796aa85";
hash = "sha256-605SsXd7TSdm3BH854ChHIZbOXcHI/n8RN+pFMz4Ex4=";
};
in
stdenv.mkDerivation {
pname = "bloaty";
version = "1.1-unstable-2024-09-23";
src = fetchFromGitHub {
owner = "google";
repo = "bloaty";
rev = "0c89acd7e8b9d91fd1e9c8c129be627b4e47f1ea";
hash = "sha256-txZDPytWnkjkiVkPL2SWLwCPEtVvqoI/MVRvbJ2kBGw=";
};
cmakeFlags = [
"-DLIT_EXECUTABLE=${lit}/bin/lit"
"-DFILECHECK_EXECUTABLE=${llvmPackages.libllvm}/bin/FileCheck"
"-DYAML2OBJ_EXECUTABLE=${llvmPackages.libllvm}/bin/yaml2obj"
];
postPatch = ''
# Build system relies on some of those source files
rm -rf third_party/googletest third_party/abseil-cpp third_party/demumble
ln -s ${gtest.src} third_party/googletest
ln -s ${abseil-cpp.src} third_party/abseil-cpp
ln -s ${demumble} third_party/demumble
substituteInPlace CMakeLists.txt \
--replace "find_package(Python COMPONENTS Interpreter)" "" \
--replace "if(Python_FOUND AND LIT_EXECUTABLE" "if(LIT_EXECUTABLE" \
--replace "COMMAND \''\${Python_EXECUTABLE} \''\${LIT_EXECUTABLE}" "COMMAND \''\${LIT_EXECUTABLE}"
# wasm test fail. Possibly due to LLVM version < 17. See https://github.com/google/bloaty/pull/354
rm -rf tests/wasm
'';
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
zlib
re2
abseil-cpp
protobuf
capstone
gtest
lit
llvmPackages.libllvm
];
doCheck = true;
postCheck = ''
# These lit tests need to be build seperatly.
# See https://github.com/google/bloaty/blob/main/tests/README.md
cmake --build . --target check-bloaty
'';
installPhase = ''
install -Dm755 {.,$out/bin}/bloaty
'';
meta = {
description = "Size profiler for binaries";
mainProgram = "bloaty";
homepage = "https://github.com/google/bloaty";
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ momeemt ];
};
}

View File

@@ -0,0 +1,10 @@
#! @shell@
test -d ~/.blobby || {
mkdir ~/.blobby
cp -r "@out@/share/blobby"/* ~/.blobby
chmod u+w -R ~/.blobby
( cd ~/.blobby; for i in *.zip; do @unzip@/bin/unzip "$i"; done )
}
exec @out@/bin/blobby.bin "$@"

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchurl,
SDL2,
SDL2_image,
libGLU,
libGL,
cmake,
physfs,
boost,
zip,
zlib,
unzip,
pkg-config,
}:
stdenv.mkDerivation {
pname = "blobby-volley";
version = "1.1.1";
src = fetchurl {
url = "mirror://sourceforge/blobby/Blobby%20Volley%202%20%28Linux%29/1.1.1/blobby2-linux-1.1.1.tar.gz";
sha256 = "sha256-NX7lE+adO1D2f8Bj1Ky3lZpf6Il3gX8KqxTMxw2yFLo=";
};
nativeBuildInputs = [
cmake
pkg-config
zip
];
buildInputs = [
SDL2
SDL2_image
libGLU
libGL
physfs
boost
zlib
];
preConfigure = ''
sed -e '1i#include <iostream>' -i src/NetworkMessage.cpp
'';
inherit unzip;
postInstall = ''
cp ../data/Icon.bmp "$out/share/blobby/"
mv "$out/bin"/blobby{,.bin}
substituteAll "${./blobby.sh}" "$out/bin/blobby"
chmod a+x "$out/bin/blobby"
'';
meta = with lib; {
description = "Volleyball game";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ raskin ];
homepage = "https://blobbyvolley.de/";
downloadPage = "https://sourceforge.net/projects/blobby/files/Blobby%20Volley%202%20%28Linux%29/";
mainProgram = "blobby";
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
qt6,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blobdrop";
version = "2.1";
src = fetchFromGitHub {
owner = "vimpostor";
repo = "blobdrop";
tag = "v${finalAttrs.version}";
hash = "sha256-o2+qtkyu2qcwXpum3KiogyO8D6aY7bRJ6y4FWQKQY/o=";
};
strictDeps = true;
nativeBuildInputs = [
cmake
qt6.wrapQtAppsHook
]
++ lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
];
buildInputs = [
qt6.qtdeclarative
qt6.qtsvg
]
++ lib.optionals stdenv.hostPlatform.isLinux [
qt6.qtwayland
];
cmakeFlags = [
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
];
doCheck = true;
preCheck = ''
export QT_QPA_PLATFORM=offscreen
'';
meta = {
broken = stdenv.hostPlatform.isDarwin;
changelog = "https://github.com/vimpostor/blobdrop/releases/tag/v${finalAttrs.version}";
description = "Drag and drop files directly out of the terminal";
homepage = "https://github.com/vimpostor/blobdrop";
license = lib.licenses.gpl3Only;
mainProgram = "blobdrop";
maintainers = with lib.maintainers; [ tomasajt ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fuse3,
testers,
blobfuse,
nix-update-script,
}:
let
version = "2.5.0";
src = fetchFromGitHub {
owner = "Azure";
repo = "azure-storage-fuse";
rev = "blobfuse2-${version}";
sha256 = "sha256-BRLORwEY8PeD9hFkpm3Gup+eXzdFkW1Rkr73ncyKrso=";
};
in
buildGoModule {
pname = "blobfuse";
inherit version src;
vendorHash = "sha256-L1ix9pRal5Ssfwf+kl9SFC9bbveuKeiuzrBwapvbFZY=";
buildInputs = [ fuse3 ];
# Many tests depend on network or needs to be configured to pass. See the link below for a starting point
# https://github.com/NixOS/nixpkgs/pull/201196/files#diff-e669dbe391f8856f4564f26023fe147a7b720aeefe6869ab7a218f02a8247302R20
doCheck = false;
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion { package = blobfuse; };
};
meta = with lib; {
description = "Mount an Azure Blob storage as filesystem through FUSE";
license = licenses.mit;
maintainers = with maintainers; [ jbgi ];
platforms = platforms.linux;
mainProgram = "azure-storage-fuse";
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
stdenvNoCC,
fetchurl,
unzip,
}:
let
rev = "e764ba00b9c34524e3ff3ffd19a44fa2a5c296a5";
in
stdenvNoCC.mkDerivation {
pname = "blobs.gg";
version = "unstable-2019-07-24";
src = fetchurl {
url = "https://git.pleroma.social/pleroma/emoji-index/-/raw/${rev}/packs/blobs_gg.zip";
hash = "sha256-OhLzoYFnjVs1hKYglUEbDWCjNRGBNZENh5kg+K3lpX8=";
};
sourceRoot = ".";
nativeBuildInputs = [ unzip ];
installPhase = ''
runHook preInstall
mkdir -p $out
cp *.png LICENSE $out
runHook postInstall
'';
meta = {
description = "Blob emoji from blobs.gg repacked as APNG";
homepage = "https://blobs.gg";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ mvs ];
};
}

View File

@@ -0,0 +1,11 @@
--- a/src/headers.h
+++ b/src/headers.h
@@ -56,7 +56,7 @@ extern DECLSPEC int SDLCALL SDL_GetGamma(float *red, float *green, float *blue);
#define textdomain(x) while(false)
#endif
-#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__)
+#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__) && !(defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 38)
static inline void strlcat(char *dest, const char *src, size_t n) { strncat(dest, src, n - 1); }
static inline void strlcpy(char *dest, const char *src, size_t n) { strncpy(dest, src, n); dest[n - 1] = 0; }
#endif

View File

@@ -0,0 +1,65 @@
{
stdenv,
lib,
fetchurl,
pkg-config,
gettext,
SDL2,
SDL2_image,
SDL2_mixer,
SDL2_net,
SDL2_ttf,
zlib,
}:
stdenv.mkDerivation rec {
pname = "blobwars";
version = "2.00";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
sha256 = "c406279f6cdf2aed3c6edb8d8be16efeda0217494acd525f39ee2bd3e77e4a99";
};
patches = [ ./blobwars-2.00-glibc-2.38.patch ];
nativeBuildInputs = [
pkg-config
gettext
];
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
SDL2_net
SDL2_ttf
zlib
];
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error" ];
makeFlags = [
"PREFIX=$(out)"
"RELEASE=1"
];
postInstall = ''
install -Dm755 $out/games/blobwars -t $out/bin
rm -r $out/games
cp -r {data,gfx,sound,music} $out/share/games/blobwars/
# fix world readable bit
find $out/share/games/blobwars/. -type d -exec chmod 755 {} +
find $out/share/games/blobwars/. -type f -exec chmod 644 {} +
'';
meta = with lib; {
description = "Platform action game featuring a blob with lots of weapons";
mainProgram = "blobwars";
homepage = "https://www.parallelrealities.co.uk/games/metalBlobSolid/";
license = with licenses; [
gpl2Plus
free
];
maintainers = with maintainers; [ iblech ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,76 @@
{
lib,
SDL2,
SDL2_image,
SDL2_mixer,
SDL2_ttf,
boost,
cmake,
fetchFromGitHub,
gettext,
gitUpdater,
ninja,
physfs,
pkg-config,
stdenv,
zip,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blockattack";
version = "2.9.0";
src = fetchFromGitHub {
owner = "blockattack";
repo = "blockattack-game";
rev = "v${finalAttrs.version}";
hash = "sha256-6mPj6A7mYm4CXkSSemNPn1CPkd7+01yr8KvCBM3a5po=";
};
nativeBuildInputs = [
SDL2
cmake
ninja
pkg-config
gettext
zip
];
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
SDL2_ttf
SDL2_ttf
boost
physfs
];
outputs = [
"out"
"man"
];
strictDeps = true;
preConfigure = ''
patchShebangs packdata.sh source/misc/translation/*.sh
chmod +x ./packdata.sh
./packdata.sh
'';
passthru = {
updateScript = gitUpdater { };
};
meta = {
homepage = "https://blockattack.net/";
description = "Open source clone of Panel de Pon (aka Tetris Attack)";
broken = stdenv.hostPlatform.isDarwin;
changelog = "https://github.com/blockattack/blockattack-game/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = with lib.licenses; [ gpl2Plus ];
mainProgram = "blockattack";
maintainers = [ ];
inherit (SDL2.meta) platforms;
};
})

View File

@@ -0,0 +1,104 @@
{
lib,
stdenv,
buildNpmPackage,
fetchFromGitHub,
makeWrapper,
imagemagick,
copyDesktopItems,
makeDesktopItem,
electron,
}:
buildNpmPackage rec {
pname = "blockbench";
version = "4.12.6";
src = fetchFromGitHub {
owner = "JannisX11";
repo = "blockbench";
tag = "v${version}";
hash = "sha256-iV8qpUsUnL1n6hKADegNTmrW/AUWNiiNLxrTU4WPR30=";
};
nativeBuildInputs = [
makeWrapper
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
imagemagick # for icon resizing
copyDesktopItems
];
npmDepsHash = "sha256-ZLFmcK91SrUM+ouBENzc+MdNvQCRDh0ej4tf2TneUtQ=";
env.ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
# disable code signing on Darwin
postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
export CSC_IDENTITY_AUTO_DISCOVERY=false
sed -i "/afterSign/d" package.json
'';
npmBuildScript = "bundle";
postBuild = ''
# electronDist needs to be modifiable on Darwin
cp -r ${electron.dist} electron-dist
chmod -R u+w electron-dist
npm exec electron-builder -- \
--dir \
-c.electronDist=electron-dist \
-c.electronVersion=${electron.version}
'';
installPhase = ''
runHook preInstall
${lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
cp -r dist/mac*/Blockbench.app $out/Applications
makeWrapper $out/Applications/Blockbench.app/Contents/MacOS/Blockbench $out/bin/blockbench
''}
${lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
mkdir -p $out/share/blockbench
cp -r dist/*-unpacked/{locales,resources{,.pak}} $out/share/blockbench
for size in 16 32 48 64 128 256 512; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
magick icon.png -resize "$size"x"$size" $out/share/icons/hicolor/"$size"x"$size"/apps/blockbench.png
done
makeWrapper ${lib.getExe electron} $out/bin/blockbench \
--add-flags $out/share/blockbench/resources/app.asar \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--inherit-argv0
''}
runHook postInstall
'';
# based on desktop file found in the published AppImage archive
desktopItems = [
(makeDesktopItem {
name = "blockbench";
exec = "blockbench %U";
icon = "blockbench";
desktopName = "Blockbench";
comment = meta.description;
categories = [ "3DGraphics" ];
startupWMClass = "Blockbench";
terminal = false;
})
];
meta = {
changelog = "https://github.com/JannisX11/blockbench/releases/tag/v${version}";
description = "Low-poly 3D modeling and animation software";
homepage = "https://blockbench.net/";
license = lib.licenses.gpl3Only;
mainProgram = "blockbench";
maintainers = with lib.maintainers; [ tomasajt ];
};
}

View File

@@ -0,0 +1,89 @@
{
lib,
buildGoModule,
bzip2,
fetchFromGitHub,
lz4,
nixosTests,
pkg-config,
rocksdb_9_10,
snappy,
stdenv,
zeromq,
zlib,
}:
let
rocksdb = rocksdb_9_10;
in
buildGoModule rec {
pname = "blockbook";
version = "0.5.0";
commit = "657cbcf";
src = fetchFromGitHub {
owner = "trezor";
repo = "blockbook";
rev = "v${version}";
hash = "sha256-8/tyqmZE9NJWGg7zYcdei0f1lpXfehy6LM6k5VHW33g=";
};
proxyVendor = true;
vendorHash = "sha256-W29AvzfleCYC2pgHj2OB00PWBTcD2UUDbDH/z5A3bQ4=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
bzip2
lz4
rocksdb
snappy
zeromq
zlib
];
ldflags = [
"-X github.com/trezor/blockbook/common.version=${version}"
"-X github.com/trezor/blockbook/common.gitcommit=${commit}"
"-X github.com/trezor/blockbook/common.buildDate=unknown"
];
CGO_LDFLAGS = [
"-L${lib.getLib stdenv.cc.cc}/lib"
"-lrocksdb"
"-lz"
"-lbz2"
"-lsnappy"
"-llz4"
"-lm"
"-lstdc++"
];
preBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
ulimit -n 8192
'';
subPackages = [ "." ];
postInstall = ''
mkdir -p $out/share/
cp -r $src/static/templates/ $out/share/
cp -r $src/static/css/ $out/share/
'';
passthru.tests = {
smoke-test = nixosTests.blockbook-frontend;
};
meta = with lib; {
description = "Trezor address/account balance backend";
homepage = "https://github.com/trezor/blockbook";
license = licenses.agpl3Only;
maintainers = with maintainers; [
mmahut
];
platforms = platforms.unix;
mainProgram = "blockbook";
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
python3,
pkg-config,
imagemagick,
wafHook,
}:
stdenv.mkDerivation rec {
pname = "blockhash";
version = "0.3.3";
src = fetchFromGitHub {
owner = "commonsmachinery";
repo = "blockhash";
rev = "v${version}";
sha256 = "sha256-QoqFTCfWtXIrFF3Yx4NfOa9cSjHtCSKz3k3i0u9Qx9M=";
};
nativeBuildInputs = [
python3
pkg-config
wafHook
];
buildInputs = [ imagemagick ];
strictDeps = true;
meta = with lib; {
homepage = "https://github.com/commonsmachinery/blockhash";
description = ''
This is a perceptual image hash calculation tool based on algorithm
descibed in Block Mean Value Based Image Perceptual Hashing by Bian Yang,
Fan Gu and Xiamu Niu.
'';
license = licenses.mit;
maintainers = [ ];
platforms = platforms.unix;
mainProgram = "blockhash";
};
}

View File

@@ -0,0 +1,85 @@
{
bitcoind,
electrum,
fetchFromGitHub,
lib,
rocksdb_8_3,
rustPlatform,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "blockstream-electrs";
version = "0.4.1-unstable-2024-11-25";
src = fetchFromGitHub {
owner = "Blockstream";
repo = "electrs";
rev = "680eacaa8360d5f46eaae9611a3097ba183795c6";
hash = "sha256-oDM4arH3aplgcS49t/hy5Rqt36glrVufd3F4tw3j1zo=";
};
cargoHash = "sha256-X2C69ui3XiYP1cg9FgfBbJlLLMq1SCw+oAL20B1Fs30=";
nativeBuildInputs = [
# Needed for librocksdb-sys
rustPlatform.bindgenHook
];
env = {
# Dynamically link rocksdb
ROCKSDB_INCLUDE_DIR = "${rocksdb_8_3}/include";
ROCKSDB_LIB_DIR = "${rocksdb_8_3}/lib";
# External binaries for integration tests are provided via nixpkgs. Skip
# trying to download them.
BITCOIND_SKIP_DOWNLOAD = true;
ELECTRUMD_SKIP_DOWNLOAD = true;
ELEMENTSD_SKIP_DOWNLOAD = true;
};
# Only build the service
cargoBuildFlags = [
"--package=electrs"
"--bin=electrs"
];
# Some upstream dev-dependencies (electrumd, elementsd) currently fail to
# build on non-x86_64-linux platforms, even if downloading is skipped.
# TODO(phlip9): submit a PR to fix this
doCheck = stdenv.hostPlatform.system == "x86_64-linux";
# Build tests in debug mode to reduce build time
checkType = "debug";
# Integration tests require us to pass in some external deps via env.
preCheck = lib.optionalString doCheck ''
export BITCOIND_EXE=${bitcoind}/bin/bitcoind
export ELECTRUMD_EXE=${electrum}/bin/electrum
'';
# Make sure the final binary actually runs
doInstallCheck = true;
installCheckPhase = ''
$out/bin/electrs --version
'';
meta = {
description = "Efficient re-implementation of Electrum Server in Rust";
longDescription = ''
A blockchain index engine and HTTP API written in Rust based on
[romanz/electrs](https://github.com/romanz/electrs).
Used as the backend for the [Esplora block explorer](https://github.com/Blockstream/esplora)
powering <https://blockstream.info>.
API documentation [is available here](https://github.com/blockstream/esplora/blob/master/API.md).
Documentation for the database schema and indexing process [is available here](https://github.com/Blockstream/electrs/blob/new-index/doc/schema.md).
'';
homepage = "https://github.com/Blockstream/electrs";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ phlip9 ];
mainProgram = "electrs";
};
}

View File

@@ -0,0 +1,41 @@
{
buildGoModule,
fetchFromGitHub,
lib,
nixosTests,
}:
buildGoModule rec {
pname = "blocky";
version = "0.26.2";
src = fetchFromGitHub {
owner = "0xERR0R";
repo = "blocky";
rev = "v${version}";
hash = "sha256-yo21f12BLINXb8HWdR3ZweV5+cTZN07kxCxO1FMJq/4=";
};
# needs network connection and fails at
# https://github.com/0xERR0R/blocky/blob/development/resolver/upstream_resolver_test.go
doCheck = false;
vendorHash = "sha256-cIDKUzOAs6XsyuUbnR2MRIeH3LI4QuohUZovh/DVJzA=";
ldflags = [
"-s"
"-w"
"-X github.com/0xERR0R/blocky/util.Version=${version}"
];
passthru.tests = { inherit (nixosTests) blocky; };
meta = with lib; {
description = "Fast and lightweight DNS proxy as ad-blocker for local network with many features";
homepage = "https://0xerr0r.github.io/blocky";
changelog = "https://github.com/0xERR0R/blocky/releases";
license = licenses.asl20;
maintainers = with maintainers; [ ratsclub ];
mainProgram = "blocky";
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
ronn,
git,
cmocka,
}:
stdenv.mkDerivation rec {
pname = "blogc";
version = "0.20.1";
src = fetchFromGitHub {
owner = "blogc";
repo = "blogc";
rev = "v${version}";
sha256 = "sha256-YAwGgV5Vllz8JlIASbGIkdRzpciQbgPiXl5DjiSEJyE=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
ronn
git
cmocka
];
configureFlags = [
"--enable-git-receiver"
"--enable-make"
"--enable-runserver"
];
doCheck = true;
meta = with lib; {
description = "Blog compiler";
license = licenses.bsd3;
homepage = "https://blogc.rgm.io";
platforms = platforms.unix;
maintainers = with maintainers; [ sikmir ];
};
}

View File

@@ -0,0 +1,131 @@
{
lib,
stdenv,
fetchzip,
makeWrapper,
alsa-lib,
at-spi2-atk,
at-spi2-core,
atk,
cairo,
cups,
dbus,
expat,
fontconfig,
freetype,
gdk-pixbuf,
glib,
gtk3,
libGL,
libappindicator-gtk3,
libdrm,
libnotify,
libpulseaudio,
libuuid,
libxcb,
libxkbcommon,
libxshmfence,
libgbm,
nspr,
nss,
pango,
systemd,
udev,
unzip,
xdg-utils,
xorg,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bloodhound";
version = "4.3.1";
src = fetchzip {
url = "https://github.com/SpecterOps/BloodHound-Legacy/releases/download/v${finalAttrs.version}/BloodHound-linux-x64.zip";
hash = "sha256-gGfZ5Mj8rmz3dwKyOitRExkgOmSVDOqKpPxvGlE4izw=";
};
rpath = lib.makeLibraryPath [
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
gtk3
libGL
libappindicator-gtk3
libdrm
libnotify
libpulseaudio
libuuid
libxcb
libxkbcommon
libgbm
nspr
nss
pango
systemd
(lib.getLib stdenv.cc.cc)
udev
xorg.libX11
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
xorg.libxkbfile
xorg.libxshmfence
];
buildInputs = [
gtk3 # needed for GSETTINGS_SCHEMAS_PATH
];
nativeBuildInputs = [
makeWrapper
unzip
];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,/lib/BloodHound}
mv * $out/lib/BloodHound
chmod +x $out/lib/BloodHound/BloodHound
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
$out/lib/BloodHound/BloodHound --set-rpath ${finalAttrs.rpath}:$out/lib/BloodHound \
--add-needed libudev.so # Needed to fix trace trap (core dump)
makeWrapper $out/lib/BloodHound/BloodHound $out/bin/BloodHound \
--prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
--append-flags "--in-process-gpu" # fix for sandbox issues
runHook postInstall
'';
meta = with lib; {
description = "Active Directory reconnaissance and attack path management tool";
homepage = "https://github.com/SpecterOps/BloodHound-Legacy";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
changelog = "https://github.com/SpecterOps/BloodHound-Legacy/releases/tag/v${finalAttrs.version}";
downloadPage = "https://github.com/SpecterOps/BloodHound-Legacy/releases";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ akechishiro ];
platforms = [ "x86_64-linux" ];
mainProgram = "BloodHound";
};
})

View File

@@ -0,0 +1,47 @@
{
lib,
fetchurl,
appimageTools,
}:
let
pname = "bloomrpc";
version = "1.5.3";
src = fetchurl {
url = "https://github.com/uw-labs/${pname}/releases/download/${version}/BloomRPC-${version}.AppImage";
name = "${pname}-${version}.AppImage";
hash = "sha512-PebdYDpcplPN5y3mRu1mG6CXenYfYvBXNLgIGEr7ZgKnR5pIaOfJNORSNYSdagdGDb/B1sxuKfX4+4f2cqgb6Q==";
};
appimageContents = appimageTools.extractType2 {
inherit pname src version;
};
in
appimageTools.wrapType2 {
inherit pname src version;
profile = ''
export LC_ALL=C.UTF-8
'';
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/${pname}.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
meta = with lib; {
description = "GUI Client for GRPC Services";
longDescription = ''
Inspired by Postman and GraphQL Playground BloomRPC aims to provide the simplest
and most efficient developer experience for exploring and querying your GRPC services.
'';
homepage = "https://github.com/uw-labs/bloomrpc";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ zoedsoupe ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,98 @@
{
stdenv,
fetchurl,
autoPatchelfHook,
installShellFiles,
makeWrapper,
jre,
lib,
zlib,
}:
stdenv.mkDerivation rec {
pname = "bloop";
version = "2.0.16";
platform =
if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 then
"x86_64-pc-linux"
else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then
"x86_64-apple-darwin"
else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then
"aarch64-apple-darwin"
else
throw "unsupported platform";
bloop-bash = fetchurl {
url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bash-completions";
sha256 = "sha256-2mt+zUEJvQ/5ixxFLZ3Z0m7uDSj/YE9sg/uNMjamvdE=";
};
bloop-fish = fetchurl {
url = "https://github.com/scalacenter/bloop/releases/download/v${version}/fish-completions";
sha256 = "sha256-eFESR6iPHRDViGv+Fk3sCvPgVAhk2L1gCG4LnfXO/v4=";
};
bloop-zsh = fetchurl {
url = "https://github.com/scalacenter/bloop/releases/download/v${version}/zsh-completions";
sha256 = "sha256-WNMsPwBfd5EjeRbRtc06lCEVI2FVoLfrqL82OR0G7/c=";
};
bloop-binary = fetchurl {
url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bloop-${platform}";
sha256 =
if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 then
"sha256-66TYu/2HMvd58z2hDdOfQ51feZ/yYvzVfMmjD9U7lHs="
else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then
"sha256-k8mUKcQcJZuqlEfphOIhXSTU4ny5WD0zHEhUsbtpVg0="
else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then
"sha256-eYKjT5k3UeSt/FUddzaYQ1xbYaC9Rf/HCEbYxkLaz50="
else
throw "unsupported platform";
};
dontUnpack = true;
nativeBuildInputs = [
installShellFiles
makeWrapper
]
++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
buildInputs = [
(lib.getLib stdenv.cc.cc)
zlib
];
propagatedBuildInputs = [ jre ];
installPhase = ''
runHook preInstall
install -D -m 0755 ${bloop-binary} $out/.bloop-wrapped
makeWrapper $out/.bloop-wrapped $out/bin/bloop
#Install completions
installShellCompletion --name bloop --bash ${bloop-bash}
installShellCompletion --name _bloop --zsh ${bloop-zsh}
installShellCompletion --name bloop.fish --fish ${bloop-fish}
runHook postInstall
'';
meta = with lib; {
homepage = "https://scalacenter.github.io/bloop/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.asl20;
description = "Scala build server and command-line tool to make the compile and test developer workflows fast and productive in a build-tool-agnostic way";
mainProgram = "bloop";
platforms = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
maintainers = with maintainers; [
agilesteel
kubukoz
tomahna
];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
hugo,
}:
buildNpmPackage (finalAttrs: {
pname = "blowfish-tools";
version = "1.10.0";
src = fetchFromGitHub {
owner = "nunocoracao";
repo = "blowfish-tools";
tag = "v${finalAttrs.version}";
hash = "sha256-90EKsRKOO2Hb64Wy3TlwzlPU2K8AAlSxc17ek5ZLoG0=";
};
dontNpmBuild = true;
npmDepsHash = "sha256-P6XHXR4QcVCRz5ju36OzCTNxXtW9RYxkfhbp7kJVfoY=";
postFixup = ''
wrapProgram $out/bin/blowfish-tools \
--prefix PATH : ${lib.makeBinPath [ hugo ]}
'';
meta = {
description = "CLI to initialize and configure a Blowfish project";
homepage = "https://blowfish.page";
changelog = "https://github.com/nunocoracao/blowfish-tools/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ eripa ];
mainProgram = "blowfish-tools";
};
})

View File

@@ -0,0 +1,85 @@
{
stdenv,
lib,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blst";
version = "0.3.16";
src = fetchFromGitHub {
owner = "supranational";
repo = "blst";
tag = "v${finalAttrs.version}";
hash = "sha256-wQ5dHFnYqrWC4vl+7OJ/utcuTXdBtN26q0OsNPW0kfs=";
};
buildPhase = ''
runHook preBuild
./build.sh ${lib.optionalString stdenv.hostPlatform.isWindows "flavour=mingw64"}
./build.sh -shared ${lib.optionalString stdenv.hostPlatform.isWindows "flavour=mingw64"}
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/{lib,include}
for lib in libblst.{a,so,dylib}; do
if [ -f $lib ]; then
cp $lib $out/lib/
fi
done
cp bindings/{blst.h,blst_aux.h} $out/include
for lib in blst.dll; do
if [ -f $lib ]; then
mkdir -p $out/bin
cp $lib $out/bin/
fi
done
mkdir -p $out/lib/pkgconfig
cat <<EOF > $out/lib/pkgconfig/libblst.pc
prefix=$out
exec_prefix=''\\''${prefix}
libdir=''\\''${exec_prefix}/lib
includedir=''\\''${prefix}/include
Name: libblst
Description: ${finalAttrs.meta.description}
URL: ${finalAttrs.meta.homepage}
Version: ${finalAttrs.version}
Cflags: -I''\\''${includedir}
Libs: -L''\\''${libdir} -lblst
Libs.private:
EOF
runHook postInstall
'';
# ensure we have the right install id set. Otherwise the library
# wouldn't be found during install. The alternative would be to work
# lib.optional stdenv.hostPlatform.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libblst.dylib";
# into the setup.sh
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
install_name_tool -id $out/lib/libblst.dylib $out/lib/libblst.dylib
'';
doCheck = true;
meta = with lib; {
changelog = "https://github.com/supranational/blst/releases/tag/${finalAttrs.src.tag}";
description = "Multilingual BLS12-381 signature library";
homepage = "https://github.com/supranational/blst";
license = licenses.isc;
maintainers = with maintainers; [
iquerejeta
yvan-sraka
];
platforms = platforms.all;
};
})

View File

@@ -0,0 +1,100 @@
{
stdenv,
lib,
fetchFromGitHub,
bluez-tools,
gnome-bluetooth_1_0,
gobject-introspection,
libnotify,
pavucontrol,
python3Packages,
util-linux,
wrapGAppsHook3,
xapp,
}:
python3Packages.buildPythonApplication rec {
pname = "blueberry";
version = "1.4.8";
format = "other";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "blueberry";
tag = version;
sha256 = "sha256-MyIjcTyKn1aC2th6fCOw4cIqrRKatk2s4QD5R9cm83A=";
};
nativeBuildInputs = [
gobject-introspection
wrapGAppsHook3
];
buildInputs = [
bluez-tools
gnome-bluetooth_1_0
libnotify
util-linux
xapp
];
pythonPath = with python3Packages; [
dbus-python
pygobject3
setproctitle
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -a etc usr/* $out
# Fix paths
substituteInPlace $out/bin/blueberry \
--replace-fail /usr/lib/blueberry $out/lib/blueberry
substituteInPlace $out/bin/blueberry-tray \
--replace-fail /usr/lib/blueberry $out/lib/blueberry
substituteInPlace $out/etc/xdg/autostart/blueberry-obex-agent.desktop \
--replace-fail /usr/lib/blueberry $out/lib/blueberry
substituteInPlace $out/etc/xdg/autostart/blueberry-tray.desktop \
--replace-fail Exec=blueberry-tray Exec=$out/bin/blueberry-tray
substituteInPlace $out/lib/blueberry/blueberry-obex-agent.py \
--replace-fail /usr/share $out/share
substituteInPlace $out/lib/blueberry/blueberry-tray.py \
--replace-fail /usr/share $out/share
substituteInPlace $out/lib/blueberry/blueberry.py \
--replace-fail '"bt-adapter"' '"${bluez-tools}/bin/bt-adapter"' \
--replace-fail /usr/bin/pavucontrol ${pavucontrol}/bin/pavucontrol \
--replace-fail /usr/lib/blueberry $out/lib/blueberry \
--replace-fail /usr/share $out/share
substituteInPlace $out/lib/blueberry/rfkillMagic.py \
--replace-fail /usr/bin/rfkill ${util-linux}/bin/rfkill \
--replace-fail /usr/sbin/rfkill ${util-linux}/bin/rfkill \
--replace-fail /usr/lib/blueberry $out/lib/blueberry
substituteInPlace $out/share/applications/blueberry.desktop \
--replace-fail Exec=blueberry Exec=$out/bin/blueberry
glib-compile-schemas --strict $out/share/glib-2.0/schemas
runHook postInstall
'';
dontWrapGApps = true;
postFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
wrapPythonProgramsIn $out/lib "$out $pythonPath"
'';
meta = with lib; {
description = "Bluetooth configuration tool";
homepage = "https://github.com/linuxmint/blueberry";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [
bobby285271
romildo
];
};
}

View File

@@ -0,0 +1,71 @@
{
lib,
flutter327,
fetchFromGitHub,
autoPatchelfHook,
webkitgtk_4_1,
libnotify,
libayatana-appindicator,
jdk,
mpv,
}:
flutter327.buildFlutterApplication rec {
pname = "bluebubbles";
version = "1.15.4";
src = fetchFromGitHub {
owner = "BlueBubblesApp";
repo = "bluebubbles-app";
tag = "v${version}+73-desktop";
hash = "sha256-+JCj4EuwFbzE4u+7iJ+v9FQuLVt1tozwBufw+eL5usk=";
};
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
desktop_webview_auth = "sha256-n3lvYFUzm/1sCwQBJ3Ovup4Mq7lqGJ17ktk3TJrHhKE=";
disable_battery_optimization = "sha256-IsfclmbdLvju+0VWElFz9brdVntRESFB+PF8UPJBL2E=";
firebase_dart = "sha256-jq4Y5ApGPrXcLN3gwC9NuGN/EQkl5u64iMzL8KG02Sc=";
gesture_x_detector = "sha256-H3OJxDhESWwnpRky9jS9RIBiZ7gSqWQ/j0x/1VvRb5M=";
local_notifier = "sha256-0vajd2XNGpV9aqywbCUvDC2SLjwxh1LmshTa5yttQUI=";
permission_handler_windows = "sha256-9h0wEOgY6gtqaSyH9x2fbvH8Y0EfoVs/qNqwwI5d18k=";
video_thumbnail = "sha256-7IbKg6bBA5D8ODwMNwJqIohTCbAox56TMgoI07CbrPw=";
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
webkitgtk_4_1
libnotify
libayatana-appindicator
jdk
mpv
];
# distributed in release tarballs under `data/flutter_assets/.env`, necessary for build and runtime
preBuild = ''
echo 'TENOR_API_KEY=AIzaSyAQwUlgo8sF5FBuIiampkfzaGgVPMglcGk' > .env
'';
postInstall = ''
sed -i 's#Icon=.*/bluebubbles.png#Icon=bluebubbles#g' snap/gui/bluebubbles.desktop
install -Dm0644 snap/gui/bluebubbles.desktop $out/share/applications/bluebubbles.desktop
install -Dm0644 snap/gui/bluebubbles.png $out/share/pixmaps/bluebubbles.png
'';
extraWrapProgramArgs = ''
--prefix LD_LIBRARY_PATH : $out/app/bluebubbles/lib
'';
meta = {
description = "Cross-platform iMessage client";
homepage = "https://github.com/BlueBubblesApp/bluebubbles-app";
mainProgram = "bluebubbles";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
zacharyweiss
];
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchurl,
wrapGAppsHook3,
pkg-config,
gtk3,
libxml2,
enchant,
gucharmap,
python3,
adwaita-icon-theme,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bluefish";
version = "2.2.17";
src = fetchurl {
url = "mirror://sourceforge/bluefish/bluefish-${finalAttrs.version}.tar.bz2";
hash = "sha256-Onn2Ql4Uk56hNPlsFCTjqsBb7pWQS+Q0WBiDB4p7clM=";
};
nativeBuildInputs = [
pkg-config
wrapGAppsHook3
];
buildInputs = [
adwaita-icon-theme
gtk3
libxml2
enchant
gucharmap
python3
];
# infb_gui.c:143:61: error: implicit declaration of function 'xmlNanoHTTPFetch' [-Wimplicit-function-declaration]
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
meta = {
description = "Powerful editor targeted towards programmers and webdevelopers";
homepage = "https://bluefish.openoffice.nl/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ vbgl ];
platforms = lib.platforms.all;
mainProgram = "bluefish";
};
})

View File

@@ -0,0 +1,110 @@
{
lib,
stdenv,
fetchurl,
makeDesktopItem,
copyDesktopItems,
unzip,
openjdk21,
openjfx21,
glib,
gsettings-desktop-schemas,
gtk3,
wrapGAppsHook3,
imagemagick,
nix-update-script,
}:
let
openjdk = openjdk21.override {
enableJavaFX = true;
openjfx_jdk = openjfx21.override { withWebKit = true; };
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "bluej";
version = "5.5.0";
src = fetchurl {
url = "https://github.com/k-pet-group/BlueJ-Greenfoot/releases/download/BLUEJ-RELEASE-${finalAttrs.version}/BlueJ-generic-${finalAttrs.version}.jar";
sha256 = "sha256-UClhTH/9oFfhjYsScBvmD4cKZUJwuAsiyRTiVkPAV0o=";
};
unpackPhase = ''
runHook preUnpack
unzip -d jar ${finalAttrs.src}
unzip -d dist jar/bluej-dist.jar
runHook postUnpack
'';
sourceRoot = "dist";
nativeBuildInputs = [
wrapGAppsHook3
copyDesktopItems
imagemagick
unzip
];
buildInputs = [
glib
gtk3
];
dontWrapGApps = true;
desktopItems = [
(makeDesktopItem {
name = "BlueJ";
desktopName = "BlueJ";
exec = "BlueJ";
icon = "bluej";
comment = "A simple powerful Java IDE";
categories = [
"Application"
"Development"
];
})
];
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cp -r ./lib $out/lib/bluej
mkdir -p $out/share/icons/hicolor/{16x16,32x32,48x48,64x64,128x128,256x256}/apps
for dimension in 16x16 32x32 48x48 64x64 128x128 256x256; do
magick convert ./icons/bluej-icon-512-embossed.png -geometry $dimension\
$out/share/icons/hicolor/$dimension/apps/bluej.png
done
makeWrapper ${openjdk}/bin/java $out/bin/bluej \
"''${gappsWrapperArgs[@]}" \
--suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/ \
--add-flags "-Dawt.useSystemAAFontSettings=on \
--add-opens javafx.graphics/com.sun.glass.ui=ALL-UNNAMED \
--add-opens javafx.graphics/com.sun.javafx.scene.input=ALL-UNNAMED \
-cp $out/lib/bluej/boot.jar bluej.Boot"
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Simple integrated development environment for Java";
homepage = "https://www.bluej.org/";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = with lib.licenses; [
gpl2Plus
classpathException20
];
mainProgram = "bluej";
maintainers = with lib.maintainers; [ weirdrock ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
kdePackages,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bluejay";
version = "1.0.3";
src = fetchFromGitHub {
owner = "EbonJaeger";
repo = "bluejay";
tag = "v${finalAttrs.version}";
hash = "sha256-18jpUaFeUIldtvnSuV8nCozO/KYog15AR+/3kby86hs=";
};
nativeBuildInputs = [
cmake
ninja
kdePackages.extra-cmake-modules
kdePackages.wrapQtAppsHook
];
buildInputs = [
kdePackages.bluez-qt
kdePackages.kcolorscheme
kdePackages.kconfig
kdePackages.kcoreaddons
kdePackages.kdbusaddons
kdePackages.ki18n
kdePackages.kirigami
kdePackages.kirigami-addons
kdePackages.qtbase
kdePackages.qtdeclarative
];
passthru.updateScript = nix-update-script { };
meta = {
mainProgram = "bluejay";
description = "Bluetooth manager written in Qt";
homepage = "https://github.com/EbonJaeger/bluejay";
changelog = "https://github.com/EbonJaeger/bluejay/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mpl20;
platforms = lib.platforms.linux;
maintainers = [ ];
};
})

View File

@@ -0,0 +1,128 @@
{
stdenv,
lib,
fetchurl,
squashfsTools,
autoPatchelfHook,
copyDesktopItems,
pango,
gtk3,
alsa-lib,
nss,
libXdamage,
libdrm,
libgbm,
libxshmfence,
makeDesktopItem,
makeWrapper,
wrapGAppsHook3,
gcc-unwrapped,
udev,
}:
stdenv.mkDerivation rec {
pname = "bluemail";
version = "1.140.93";
# To update, check https://search.apps.ubuntu.com/api/v1/package/bluemail and copy the anon_download_url and version.
src = fetchurl {
url = "https://api.snapcraft.io/api/v1/snaps/download/ZVlj0qw0GOFd5JgTfL8kk2Y5eIG1IpiH_178.snap";
hash = "sha512-xv7fn+VrtrxauejhgEMdTnmnDXb17TwanXZR6Lqfg5N40MbyDu76XQAWRB8xFU/+GdCTmjv47EaOC7SnnOw4EA==";
};
desktopItems = [
(makeDesktopItem {
name = "bluemail";
icon = "bluemail";
exec = "bluemail";
desktopName = "BlueMail";
comment = meta.description;
genericName = "Email Reader";
mimeTypes = [
"x-scheme-handler/me.blueone.linux"
"x-scheme-handler/mailto"
"x-scheme-handler/bluemail-notif"
];
categories = [ "Office" ];
})
];
nativeBuildInputs = [
autoPatchelfHook
copyDesktopItems
makeWrapper
squashfsTools
wrapGAppsHook3
];
unpackPhase = ''
runHook preUnpack
unsquashfs $src
runHook postUnpack
'';
sourceRoot = "squashfs-root";
postPatch = ''
rm -rf usr libEGL.so libGLESv2.so libvk_swiftshader.so libvulkan.so.1
'';
buildInputs = [
pango
gtk3
alsa-lib
nss
libXdamage
libdrm
libgbm
libxshmfence
udev
];
dontBuild = true;
dontStrip = true;
dontWrapGApps = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,opt/bluemail}
mv * $out/opt/bluemail
ln -s $out/opt/bluemail/bluemail $out/bin/bluemail
mkdir -p $out/share/icons/hicolor/1024x1024/apps
ln -s $out/opt/bluemail/resources/assets/icons/bluemailx-icon.png $out/share/icons/hicolor/1024x1024/apps/bluemail.png
runHook postInstall
'';
makeWrapperArgs = [
"--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
gcc-unwrapped.lib
gtk3
udev
]
}"
"--prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}"
];
preFixup = ''
wrapProgram $out/opt/bluemail/bluemail \
''${makeWrapperArgs[@]} \
''${gappsWrapperArgs[@]}
'';
meta = with lib; {
description = "Cross platform email and calendar app, with AI features and a modern design";
homepage = "https://bluemail.me";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
# Vendored copy of Electron.
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = [ ];
mainProgram = "bluemail";
};
}

View File

@@ -0,0 +1,104 @@
{
config,
stdenv,
lib,
fetchurl,
intltool,
pkg-config,
python3Packages,
bluez,
gtk3,
obex_data_server,
xdg-utils,
dnsmasq,
dhcpcd,
iproute2,
adwaita-icon-theme,
librsvg,
wrapGAppsHook3,
gobject-introspection,
networkmanager,
withPulseAudio ? config.pulseaudio or stdenv.hostPlatform.isLinux,
libpulseaudio,
procps,
}:
let
pythonPackages = python3Packages;
in
stdenv.mkDerivation rec {
pname = "blueman";
version = "2.4.6";
src = fetchurl {
url = "https://github.com/blueman-project/blueman/releases/download/${version}/${pname}-${version}.tar.xz";
sha256 = "sha256-xxKnN/mFWQZoTAdNFm1PEMfxZTeK+WYSgYu//Pv45WY=";
};
nativeBuildInputs = [
gobject-introspection
intltool
pkg-config
pythonPackages.cython
pythonPackages.wrapPython
wrapGAppsHook3
];
buildInputs = [
bluez
gtk3
pythonPackages.python
librsvg
adwaita-icon-theme
networkmanager
procps
]
++ pythonPath
++ lib.optional withPulseAudio libpulseaudio;
postPatch = lib.optionalString withPulseAudio ''
sed -i 's,CDLL(",CDLL("${libpulseaudio.out}/lib/,g' blueman/main/PulseAudioUtils.py
'';
pythonPath = with pythonPackages; [
pygobject3
pycairo
];
propagatedUserEnvPkgs = [ obex_data_server ];
configureFlags = [
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
"--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user"
# Don't check for runtime dependency `ip` during the configure
"--disable-runtime-deps-check"
(lib.enableFeature withPulseAudio "pulseaudio")
];
makeWrapperArgs = [
"--prefix PATH ':' ${
lib.makeBinPath [
dnsmasq
dhcpcd
iproute2
]
}"
"--suffix PATH ':' ${lib.makeBinPath [ xdg-utils ]}"
];
postFixup = ''
# This mimics ../../../development/interpreters/python/wrap.sh
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
wrapPythonProgramsIn "$out/libexec" "$out $pythonPath"
'';
meta = {
homepage = "https://github.com/blueman-project/blueman";
description = "GTK-based Bluetooth Manager";
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
changelog = "https://github.com/blueman-project/blueman/releases/tag/${version}";
maintainers = [ ];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
stdenvNoCC,
fetchurl,
makeWrapper,
jre,
}:
stdenvNoCC.mkDerivation rec {
pname = "bluemap";
version = "5.12";
src = fetchurl {
url = "https://github.com/BlueMap-Minecraft/BlueMap/releases/download/v${version}/BlueMap-${version}-cli.jar";
hash = "sha256-k+tSIlgOj7o7aHPdJzXSW1zxx2pZ67TB3aJ4Fv7U0pM=";
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
makeWrapper ${jre}/bin/java $out/bin/bluemap --add-flags "-jar $src"
runHook postInstall
'';
meta = {
description = "3D minecraft map renderer";
homepage = "https://bluemap.bluecolored.de/";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
dandellion
h7x4
];
mainProgram = "bluemap";
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "bluemix-cli";
version = "0.8.0";
src =
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
name = "linux32-${version}.tar.gz";
url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux32";
sha256 = "1ryngbjlw59x33rfd32bcz49r93a1q1g92jh7xmi9vydgqnzsifh";
}
else
fetchurl {
name = "linux64-${version}.tar.gz";
url = "https://clis.ng.bluemix.net/download/bluemix-cli/${version}/linux64";
sha256 = "056zbaca430ldcn0s86vy40m5abvwpfrmvqybbr6fjwfv9zngywx";
};
installPhase = ''
install -m755 -D -t $out/bin bin/ibmcloud bin/ibmcloud-analytics
install -m755 -D -t $out/bin/cfcli bin/cfcli/cf
ln -sv $out/bin/ibmcloud $out/bin/bx
ln -sv $out/bin/ibmcloud $out/bin/bluemix
install -D -t "$out/share/bash-completion/completions" bx/bash_autocomplete
install -D -t "$out/share/zsh/site-functions" bx/zsh_autocomplete
'';
meta = with lib; {
description = "Administration CLI for IBM BlueMix";
homepage = "https://console.bluemix.net/docs/cli/index.html";
downloadPage = "https://console.bluemix.net/docs/cli/reference/bluemix_cli/download_cli.html#download_install";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = [
maintainers.tazjin
maintainers.jensbin
];
platforms = [
"x86_64-linux"
"i686-linux"
];
};
}

View File

@@ -0,0 +1,94 @@
{
dbus,
fetchFromGitLab,
gobject-introspection,
lib,
libadwaita,
meson,
ninja,
python3,
runCommand,
stdenv,
testers,
wrapGAppsNoGuiHook,
xvfb-run,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blueprint-compiler";
version = "0.18.0";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "jwestman";
repo = "blueprint-compiler";
rev = "v${finalAttrs.version}";
hash = "sha256-3vAFkP/psM/IsFtzVOIVSU77Z+RV4d3N70U7ggrDqfo=";
};
postPatch = ''
patchShebangs docs/collect-sections.py
'';
nativeBuildInputs = [
meson
ninja
wrapGAppsNoGuiHook
];
buildInputs = [
libadwaita
(python3.withPackages (
ps: with ps; [
pygobject3
]
))
];
propagatedBuildInputs = [
# For setup hook, so that the compiler can find typelib files
gobject-introspection
];
nativeCheckInputs = [
dbus
xvfb-run
];
# requires xvfb-run
doCheck = !stdenv.hostPlatform.isDarwin && false; # tests time out
checkPhase = ''
runHook preCheck
xvfb-run dbus-run-session \
--config-file=${dbus}/share/dbus-1/session.conf \
meson test --no-rebuild --print-errorlogs
runHook postCheck
'';
passthru.tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
};
# regression test that `blueprint-compiler` can be used in a standalone
# context outside of nix builds, and doesn't rely on the setup hooks of
# its propagated inputs for basic functionality.
# see https://github.com/NixOS/nixpkgs/pull/400415
standalone = runCommand "blueprint-compiler-test-standalone" { } ''
${lib.getExe finalAttrs.finalPackage} --help && touch $out
'';
};
meta = with lib; {
description = "Markup language for GTK user interface files";
mainProgram = "blueprint-compiler";
homepage = "https://gitlab.gnome.org/jwestman/blueprint-compiler";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [
benediktbroich
ranfdev
];
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,103 @@
{
stdenv,
makeBinaryWrapper,
removeReferencesTo,
srcOnly,
python3,
pnpm_9,
fetchFromGitHub,
nodejs,
vips,
pkg-config,
nixosTests,
lib,
nix-update-script,
}:
let
nodeSources = srcOnly nodejs;
pythonEnv = python3.withPackages (p: [ p.setuptools ]);
in
stdenv.mkDerivation (finalAttrs: {
pname = "pds";
version = "0.4.182";
src = fetchFromGitHub {
owner = "bluesky-social";
repo = "pds";
tag = "v${finalAttrs.version}";
hash = "sha256-FNfM3kr0PTJp9mKYtzd6uH5mUfupqv0aA3sAPRq+pF4=";
};
sourceRoot = "${finalAttrs.src.name}/service";
nativeBuildInputs = [
makeBinaryWrapper
nodejs
pythonEnv
pkg-config
pnpm_9.configHook
removeReferencesTo
];
# Required for `sharp` NPM dependency
buildInputs = [ vips ];
pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs)
pname
version
src
sourceRoot
;
fetcherVersion = 2;
hash = "sha256-pUCICsuuc3CeWGeJ6il0etLQkntPF9MKRiJsiNDfroo=";
};
buildPhase = ''
runHook preBuild
pushd ./node_modules/.pnpm/better-sqlite3@*/node_modules/better-sqlite3
npm run build-release --offline --nodedir="${nodeSources}"
find build -type f -exec remove-references-to -t "${nodeSources}" {} \;
popd
makeWrapper "${lib.getExe nodejs}" "$out/bin/pds" \
--add-flags --enable-source-maps \
--add-flags "$out/lib/pds/index.js" \
--set-default NODE_ENV production
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib/pds}
mv node_modules $out/lib/pds
mv index.js $out/lib/pds
runHook postInstall
'';
passthru = {
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit (nixosTests) bluesky-pds; };
updateScript = nix-update-script { };
};
meta = {
description = "Bluesky Personal Data Server (PDS)";
homepage = "https://github.com/bluesky-social/pds";
license = with lib.licenses; [
mit
asl20
];
maintainers = with lib.maintainers; [
t4ccer
isabelroses
];
platforms = lib.platforms.unix;
mainProgram = "pds";
};
})

View File

@@ -0,0 +1,57 @@
{
stdenvNoCC,
bash,
bluesky-pds,
makeBinaryWrapper,
jq,
curl,
openssl,
lib,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "pdsadmin";
inherit (bluesky-pds) version src;
patches = [ ./pdsadmin-offline.patch ];
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = [ bash ];
strictDeps = true;
buildPhase = ''
runHook preBuild
substituteInPlace pdsadmin.sh \
--replace-fail NIXPKGS_PDSADMIN_ROOT $out
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 pdsadmin.sh $out/lib/pds/pdsadmin.sh
install -Dm755 pdsadmin/*.sh $out/lib/pds
makeWrapper "$out/lib/pds/pdsadmin.sh" "$out/bin/pdsadmin" \
--prefix PATH : "${
lib.makeBinPath [
jq
curl
openssl
]
}"
runHook postInstall
'';
meta = {
description = "Admin scripts for Bluesky Personal Data Server (PDS)";
inherit (bluesky-pds.meta) homepage license;
maintainers = with lib.maintainers; [ t4ccer ];
platforms = lib.platforms.unix;
mainProgram = "pdsadmin";
};
})

View File

@@ -0,0 +1,24 @@
diff --git a/pdsadmin.sh b/pdsadmin.sh
index 913d2b4..b09c20c 100644
--- a/pdsadmin.sh
+++ b/pdsadmin.sh
@@ -15,16 +15,11 @@ if [[ "${EUID}" -ne 0 ]]; then
exit 1
fi
-# Download the script, if it exists.
-SCRIPT_URL="${PDSADMIN_BASE_URL}/${COMMAND}.sh"
-SCRIPT_FILE="$(mktemp /tmp/pdsadmin.${COMMAND}.XXXXXX)"
+SCRIPT_FILE="NIXPKGS_PDSADMIN_ROOT/lib/pds/${COMMAND}.sh"
-if ! curl --fail --silent --show-error --location --output "${SCRIPT_FILE}" "${SCRIPT_URL}"; then
+if ! [ -f "${SCRIPT_FILE}" ]; then
echo "ERROR: ${COMMAND} not found"
exit 2
fi
-chmod +x "${SCRIPT_FILE}"
-if "${SCRIPT_FILE}" "$@"; then
- rm --force "${SCRIPT_FILE}"
-fi
+"${SCRIPT_FILE}" "$@"

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchzip,
bluez,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bluesnarfer";
version = "0.1";
src = fetchzip {
url = "http://www.alighieri.org/tools/bluesnarfer.tar.gz";
stripRoot = false;
hash = "sha256-HGdrJZohKIsOkLETBdHz80w6vxmG25aMEWXrQlpMgRw=";
};
sourceRoot = finalAttrs.src.name + "/bluesnarfer";
buildInputs = [ bluez ];
strictDeps = true;
env.NIX_CFLAGS_COMPILE = toString [
"-Wno-incompatible-pointer-types"
"-Wno-implicit-function-declaration"
];
installPhase = ''
runHook preInstall
install -Dm755 bluesnarfer $out/bin/bluesnarfer
runHook postInstall
'';
meta = {
description = "Bluetooth bluesnarfing utility";
homepage = "https://www.alighieri.org/project.html";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,40 @@
{
fetchurl,
lib,
stdenv,
unzip,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bluesnooze";
version = "1.2";
src = fetchurl {
url = "https://github.com/odlp/bluesnooze/releases/download/v${finalAttrs.version}/Bluesnooze.zip";
hash = "sha256-B1qLfPj2bU9AAsYqGYWl0/sEPj3wnn/UBeiM4kqW/rA=";
};
# Needed to avoid the binary becoming corrupted and mac refusing to open it. I
# don't know why.
dontFixup = true;
# "unpack" phase does the unzipping automatically
nativeBuildInputs = [ unzip ];
sourceRoot = "."; # squash "unpacker produced multiple directories" error
installPhase = ''
runHook preInstall
mkdir -p "$out/Applications"
cp -r Bluesnooze.app $out/Applications/
runHook postInstall
'';
meta = {
description = "Prevents your sleeping Mac from connecting to Bluetooth accessories";
homepage = "https://github.com/odlp/bluesnooze";
changelog = "https://github.com/odlp/bluesnooze/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ craigf ];
platforms = lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,28 @@
diff -ru bsc-orig/src/vendor/stp/Makefile bsc-new/src/vendor/stp/Makefile
--- bsc-orig/src/vendor/stp/Makefile 1969-12-31 16:00:01.000000000 -0800
+++ bsc-new/src/vendor/stp/Makefile 2020-11-12 17:42:40.115143035 -0800
@@ -9,12 +9,13 @@
SRC = src
else
SRC = src_stub
+SNAME += lib/libstp_stub.so
endif
ifeq ($(OSTYPE), Darwin)
-SNAME=libstp.dylib
+SNAME = lib/libstp.dylib
else
-SNAME=libstp.so.1
+SNAME += lib/libstp.so.1
endif
all: install
@@ -23,7 +24,7 @@
$(MAKE) -C $(SRC) install
ln -fsn HaskellIfc include_hs
install -m 755 -d $(PREFIX)/lib/SAT
- install -m 644 lib/$(SNAME) $(PREFIX)/lib/SAT
+ install -m 644 $(SNAME) $(PREFIX)/lib/SAT
clean:
$(MAKE) -C $(SRC) clean

View File

@@ -0,0 +1,301 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchurl,
autoconf,
automake,
fontconfig,
libX11,
perl,
flex,
bison,
pkg-config,
tcl,
tk,
xorg,
yices, # bsc uses a patched version of yices
zlib,
ghc,
gmp-static,
iverilog,
asciidoctor,
texliveFull,
which,
makeBinaryWrapper,
cctools,
targetPackages,
# install -m 644 lib/libstp.dylib /private/tmp/nix-build-bluespec-2024.07.drv-5/source/inst/lib/SAT
# install: cannot stat 'lib/libstp.dylib': No such file or directory
# https://github.com/B-Lang-org/bsc/pull/600 might fix it
stubStp ? !stdenv.hostPlatform.isDarwin,
withDocs ? true,
# With 23 core parallel 10 mins on r9 5900x
# Broken on darwin currently
withSuiteCheck ? false,
gnugrep,
time,
dejagnu,
systemc,
glibcLocales,
buildPackages,
}:
let
ghcWithPackages = ghc.withPackages (
g:
(with g; [
old-time
regex-compat
syb
split
])
);
in
stdenv.mkDerivation rec {
pname = "bluespec";
version = "2024.07";
src = fetchFromGitHub {
owner = "B-Lang-org";
repo = "bsc";
tag = version;
sha256 = "sha256-gA/vfAkkM2cuArN99JZVYEWTIJqg82HlC+BHNVS5Ot0=";
};
yices-src = fetchurl {
url = "https://github.com/B-Lang-org/bsc/releases/download/${version}/yices-src-for-bsc-${version}.tar.gz";
sha256 = "sha256-pyEdCJvmgwOYPMZEtw7aro76tSn/Y/2GcKTyARmIh4E=";
};
enableParallelBuilding = true;
outputs = [
"out"
]
++ lib.optionals withDocs [
"doc"
];
# https://github.com/B-Lang-org/bsc/pull/278 is still applicable, but will probably not be applied as such
# there is work ongoing: https://github.com/B-Lang-org/bsc/issues/595 https://github.com/B-Lang-org/bsc/pull/600
patches = [ ./libstp_stub_makefile.patch ];
postUnpack = ''
tar -C $sourceRoot/ -xf ${yices-src}
chmod -R +rwX $sourceRoot/src/vendor/yices/v2.6/yices2
'';
postPatch = ''
patchShebangs \
src/vendor/stp/src/AST/genkinds.pl \
src/Verilog/copy_module.pl \
src/comp/update-build-version.sh \
src/comp/update-build-system.sh \
src/comp/wrapper.sh
substituteInPlace src/comp/Makefile \
--replace-fail 'install-bsc install-bluetcl' 'install-bsc install-bluetcl $(UTILEXES) $(SHOWRULESEXES) install-utils install-showrules'
# For darwin
# ld: library not found for -ltcl8.5
substituteInPlace ./platform.sh \
--replace-fail 'TCLSH=/usr/bin/tclsh' 'TCLSH=`which tclsh`'
''
+ lib.optionalString withSuiteCheck ''
substituteInPlace testsuite/bsc.options/verilog-e/verilog-e.exp \
--replace-fail "/bin/echo" "${lib.getExe' buildPackages.coreutils "echo"}"
substituteInPlace testsuite/test_list.sh testsuite/findfailures.csh \
--replace-fail "bin/csh" "${lib.getExe buildPackages.tcsh}"
patchShebangs \
testsuite/test_list.sh \
testsuite/findfailures.csh \
scripts/tool-find.sh \
testsuite/bsc.bluetcl/packages/expandPorts/compareOutput.pl \
testsuite/bsc.bsv_examples/AES/funcit.pl \
testsuite/bsc.bsv_examples/AES/makeVecs.pl \
testsuite/bsc.bsv_examples/AES/makeVecs192.pl \
testsuite/bsc.bsv_examples/AES/makeVecs256.pl \
testsuite/bsc.if/split/canonicalize.pl \
testsuite/bsc.interra/operators/Arith/generate/gen.pl \
testsuite/bsc.interra/operators/Arith/generate/sort.pl \
testsuite/bsc.interra/operators/BitSel/generate/gen.pl \
testsuite/bsc.interra/operators/BitSel/generate/sort.pl \
testsuite/bsc.interra/operators/Logic/generate/gen.pl \
testsuite/bsc.interra/operators/Logic/generate/sort.pl \
testsuite/bsc.preprocessor/ifdef/iftestcase-perl.pl \
testsuite/bsc.verilog/filter/basicinout.pl \
testsuite/scripts/collapse.pl \
testsuite/scripts/double-directory.pl \
testsuite/scripts/process-summary-file.pl \
testsuite/scripts/sort-by-time.pl \
testsuite/scripts/times-by-directory.pl
'';
preBuild = ''
# allow running bsc to bootstrap
export LD_LIBRARY_PATH=$PWD/inst/lib/SAT
# use more cores for GHC building, 44 causes heap overflows in ghc, and
# there is not much speedup after 8..
if [[ $NIX_BUILD_CORES -gt 8 ]] ; then export GHCJOBS=8; else export GHCJOBS=$NIX_BUILD_CORES; fi
'';
buildInputs = yices.buildInputs ++ [
fontconfig
libX11 # tcltk
tcl
tk
which
xorg.libXft
zlib
];
nativeBuildInputs = [
automake
autoconf
bison
flex
ghcWithPackages
perl
pkg-config
tcl
makeBinaryWrapper
]
++ lib.optionals withDocs [
texliveFull
asciidoctor
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# https://github.com/B-Lang-org/bsc/blob/main/src/comp/bsc.hs#L1838
# /nix/store/7y0vlsf6l8lr3vjsbrirqrsbx4mwqiwf-cctools-binutils-darwin-1010.6/bin/strip: error: unknown argument '-u'
# make[1]: *** [Makefile:97: smoke_test_bluesim] Error 1
cctools
];
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals (stdenv.cc.isClang) [
# wide_data.cxx:1750:15: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
"-Wno-error"
]
);
makeFlags = [
"NO_DEPS_CHECKS=1" # skip the subrepo check (this deriviation uses yices-src instead of the subrepo)
"NOGIT=1" # https://github.com/B-Lang-org/bsc/issues/12
"LDCONFIG=ldconfig" # https://github.com/SRI-CSL/yices2/blob/fda0a325ea7923f152ea9f9a5d20eddfd1d96224/Makefile.build#L66
(if withDocs then "release" else "install-src")
]
++ lib.optionals stubStp [
"STP_STUB=1" # uses yices as a SMT solver and stub out STP
];
installPhase = ''
mkdir -p $out
mv inst/bin $out
mv inst/lib $out
''
+ lib.optionalString withDocs ''
# fragile, I know..
mkdir -p $doc/share/doc/bsc
mv inst/README $doc/share/doc/bsc
mv inst/ReleaseNotes.* $doc/share/doc/bsc
mv inst/doc/*.pdf $doc/share/doc/bsc
'';
postFixup = ''
# https://github.com/B-Lang-org/bsc/blob/65e3a87a17f6b9cf38cbb7b6ad7a4473f025c098/src/comp/bsc.hs#L1839
# `/bin/bsc` is a bash script which the script name to call the binary in the `/bin/core` directory
# thus wrapping `/bin/bsc` messes up the scriptname detection in it.
wrapProgram $out/bin/core/bsc \
--prefix PATH : ${
lib.makeBinPath (if stdenv.hostPlatform.isDarwin then [ cctools ] else [ targetPackages.stdenv.cc ])
}
'';
doCheck = true;
doInstallCheck = true;
# TODO To fix check-suite:
# On darwin
# ```
# FAIL: `Cpreprocess_line.bsv.bsc-out' differs from `Cpreprocess_line.bsv.bsc-out.expected'
# FAIL: `sysGCD.bsc-vcomp-out.filtered' differs from `empty.expected'
# FAIL: module `' in `ImpArgConnect3.bsv' should compile to Verilog
# Caught error in sed: sed: can't read mkArgImpConnect3.v: No such file or directory
# FAIL: `mkArgImpConnect3.v.filtered' differs from `mkArgImpConnect3.v.expected.filtered'
# ```
checkTarget = if withSuiteCheck then "checkparallel" else "check-smoke"; # this is the shortest check but "check-suite" tests much more
# bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
LOCALE_ARCHIVE = lib.optionalString (
withSuiteCheck && stdenv.hostPlatform.isLinux
) "${glibcLocales}/lib/locale/locale-archive";
nativeCheckInputs = [
gmp-static
iverilog
]
++ lib.optionals withSuiteCheck [
time
dejagnu # for `/bin/runtest` in `check-suite`
gnugrep # `testsuite/bsc.interra/operators/Arith/arith.exp` and more
];
checkInputs = lib.optionals withSuiteCheck [
systemc
];
checkPhase = lib.optionalString withSuiteCheck ''
(
cd testsuite
set +e # disable exit on error
make -j $NIX_BUILD_CORES $checkTarget
test_exit_code=$?
set -e
failures=$(./findfailures.csh)
echo "$failures"
for failure in $failures; do
logpath="''${failure/%sum/log}"
echo "\nFAILURE LOG: $logpath"
cat "$logpath"
echo "END LOG: $logpath"
done
if [[ "$test_exit_code" != "0" || -n "$failures" ]]; then
echo "Some tests failed or the makefile failed to run"
exit 1
fi
)
'';
installCheckPhase = ''
output="$($out/bin/bsc 2>&1 || true)"
echo "bsc output:"
echo "$output"
echo "$output" | grep -q "to get help"
'';
meta = {
description = "Toolchain for the Bluespec Hardware Definition Language";
homepage = "https://github.com/B-Lang-org/bsc";
license = lib.licenses.bsd3;
platforms = [
"aarch64-linux"
"x86_64-linux"
]
++ lib.platforms.darwin;
mainProgram = "bsc";
maintainers = with lib.maintainers; [
jcumming
thoughtpolice
];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenvNoCC,
fetchurl,
unzip,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "bluetility";
version = "1.5.1";
src = fetchurl {
url = "https://github.com/jnross/Bluetility/releases/download/${finalAttrs.version}/Bluetility.app.zip";
hash = "sha256-Batnv06nXXxvUz+DlrH1MpeL4f5kNSPDH6Iqd/UiFbw=";
};
dontUnpack = true;
nativeBuildInputs = [ unzip ];
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
unzip -d $out/Applications $src
runHook postInstall
'';
meta = with lib; {
description = "Bluetooth Low Energy browse";
homepage = "https://github.com/jnross/Bluetility";
license = licenses.mit;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ emilytrau ];
platforms = platforms.darwin;
};
})

View File

@@ -0,0 +1,38 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
dbus,
}:
rustPlatform.buildRustPackage rec {
pname = "bluetui";
version = "0.6";
src = fetchFromGitHub {
owner = "pythops";
repo = "bluetui";
rev = "v${version}";
hash = "sha256-JgxzpFpz/fyFZwyxTtAkG9XB5qkxj46lUnZ3mM44dHk=";
};
cargoHash = "sha256-1+hMo5vzgqm9Dpx9ZqRpHfQTRZV2RmqslQNub1+LFnk=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
dbus
];
meta = {
description = "TUI for managing bluetooth on Linux";
homepage = "https://github.com/pythops/bluetui";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ donovanglover ];
mainProgram = "bluetui";
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
# Module requires Go 1.25, drop pin once buildGoModule uses Go >= 1.25.
buildGo125Module,
fetchFromGitHub,
nix-update-script,
}:
buildGo125Module (finalAttrs: {
pname = "bluetuith";
version = "0.2.5";
src = fetchFromGitHub {
owner = "darkhz";
repo = "bluetuith";
tag = "v${finalAttrs.version}";
hash = "sha256-h7SMGI8wIiu4i2kcKRsmLHM4tu7ZZK0usBXh5zFu94E=";
};
vendorHash = null;
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-X github.com/darkhz/bluetuith/cmd.Version=${finalAttrs.version}@nixpkgs"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "TUI-based bluetooth connection manager";
longDescription = ''
Bluetuith can transfer files via OBEX, perform authenticated pairing,
and (dis)connect different bluetooth devices. It interacts with bluetooth
adapters and can toogle their power and discovery state. Bluetuith can also
manage Bluetooth-based networking/tethering (PANU/DUN) and remote control
devices. The TUI has mouse support.
'';
homepage = "https://github.com/darkhz/bluetuith";
changelog = "https://github.com/darkhz/bluetuith/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
mainProgram = "bluetuith";
maintainers = with lib.maintainers; [
pyrox0
katexochen
];
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchFromGitHub,
testers,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blueutil";
version = "2.12.0";
src = fetchFromGitHub {
owner = "toy";
repo = "blueutil";
rev = "v${finalAttrs.version}";
hash = "sha256-JwX3NHXbGgEj+ZCyu9gWp2TCihokaAw5oHCrlmpy6HA=";
};
env.NIX_CFLAGS_COMPILE = "-Wall -Wextra -Werror -mmacosx-version-min=10.9 -framework Foundation -framework IOBluetooth";
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -m 755 blueutil $out/bin/blueutil
runHook postInstall
'';
passthru = {
tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
updateScript = nix-update-script { };
};
meta = {
changelog = "https://github.com/toy/blueutil/blob/main/CHANGELOG.md";
description = "CLI for bluetooth on OSX";
homepage = "https://github.com/toy/blueutil";
license = lib.licenses.mit;
mainProgram = "blueutil";
maintainers = with lib.maintainers; [ azuwis ];
platforms = lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,33 @@
{
lib,
buildGoModule,
fetchFromGitLab,
}:
buildGoModule rec {
pname = "bluewalker";
version = "0.3.1";
src = fetchFromGitLab {
owner = "jtaimisto";
repo = "bluewalker";
rev = "v${version}";
hash = "sha256-wAzBlCczsLfHboGYIsyN7dGwz52CMw+L3XQ0njfLVR0=";
};
vendorHash = "sha256-kHwj6FNWIonaHKy4QE0/UcuOfHAPE1al5nuYXrfROKE=";
ldflags = [
"-w"
"-s"
];
meta = {
description = "Simple command line Bluetooth LE scanner";
homepage = "https://gitlab.com/jtaimisto/bluewalker";
changelog = "https://gitlab.com/jtaimisto/bluewalker/-/tags/v${version}";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ cimm ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,94 @@
{
lib,
stdenv,
aacSupport ? true,
alsa-lib,
autoreconfHook,
bluez,
dbus,
fdk_aac,
fetchFromGitHub,
gitUpdater,
glib,
libbsd,
ncurses,
pkg-config,
readline,
sbc,
python3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bluez-alsa";
version = "4.3.1";
src = fetchFromGitHub {
owner = "Arkq";
repo = "bluez-alsa";
tag = "v${finalAttrs.version}";
hash = "sha256-Vebxyku7xl/ReU025iThEbvfHsi4kCbvFqlBGDWrHxc=";
};
postPatch = ''
patchShebangs src/dbus-codegen.py
'';
nativeBuildInputs = [
autoreconfHook
pkg-config
python3
];
buildInputs = [
alsa-lib
bluez
glib
sbc
dbus
readline
libbsd
ncurses
]
++ lib.optionals aacSupport [
fdk_aac
];
configureFlags = [
(lib.enableFeature aacSupport "aac")
(lib.enableFeature true "hcitop")
(lib.enableFeature true "rfcomm")
(lib.withFeatureAs true "alsaplugindir" "${placeholder "out"}/lib/alsa-lib")
(lib.withFeatureAs true "dbusconfdir" "${placeholder "out"}/share/dbus-1/system.d")
];
passthru.updateScript = gitUpdater { };
meta = {
homepage = "https://github.com/Arkq/bluez-alsa";
description = "Bluez 5 Bluetooth Audio ALSA Backend";
longDescription = ''
Bluez-ALSA (BlueALSA) is an ALSA backend for Bluez 5 audio interface.
Bluez-ALSA registers all Bluetooth devices with audio profiles in Bluez
under a virtual ALSA PCM device called `bluealsa` that supports both
playback and capture.
Some backstory: Bluez 5 removed built-in support for ALSA in favor of a
generic interface for 3rd party appliations. Thereafter, PulseAudio
implemented a backend for that interface and became the only way to get
Bluetooth audio with Bluez 5. Users prefering ALSA stayed on Bluez 4.
However, Bluez 4 eventually became deprecated.
This package is a rebirth of a direct interface between ALSA and Bluez 5,
that, unlike PulseAudio, provides KISS near-metal-like experience. It is
not possible to run BluezALSA and PulseAudio Bluetooth at the same time
due to limitations in Bluez, but it is possible to run PulseAudio over
BluezALSA if you disable `bluetooth-discover` and `bluez5-discover`
modules in PA and configure it to play/capture sound over `bluealsa` PCM.
'';
license = with lib.licenses; [ mit ];
mainProgram = "bluealsa";
maintainers = with lib.maintainers; [ oxij ];
platforms = lib.platforms.linux;
};
})
# TODO: aptxSupport

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchurl,
}:
# This package only provides the bluetooth headers from the bluez package
# for consumption in Python, which cannot consume bluez.dev due to multiple
# infinite recursion paths.
stdenv.mkDerivation (finalAttrs: {
pname = "bluez-headers";
version = "5.83";
# This package has the source, because of the emulatorAvailable check in the
# bluez function args, that causes an infinite recursion with Python on cross
# builds.
src = fetchurl {
url = "mirror://kernel/linux/bluetooth/bluez-${finalAttrs.version}.tar.xz";
hash = "sha256-EIUi2QnSIFgTmb/sk9qrYgNVOc7vPdo+eZcHhcY70kw=";
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/include/bluetooth
cp -v lib/*.h "$out/include/bluetooth/"
'';
meta = {
homepage = "https://www.bluez.org/";
description = "Official Linux Bluetooth protocol stack";
changelog = "https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/ChangeLog?h=${finalAttrs.version}";
license = with lib.licenses; [
bsd2
gpl2Plus
lgpl21Plus
mit
];
maintainers = [ ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
autoreconfHook,
fetchFromGitHub,
glib,
pkg-config,
readline,
unstableGitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bluez-tools";
version = "0-unstable-2020-10-24";
src = fetchFromGitHub {
owner = "khvzak";
repo = "bluez-tools";
rev = "f65321736475429316f07ee94ec0deac8e46ec4a";
hash = "sha256-GNtuMqMv/87bp3GX9Lh+CK/VKPluNVeWZRRVOD5NY3Y=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
glib
readline
];
strictDeps = true;
passthru.updateScript = unstableGitUpdater { };
meta = {
homepage = "https://github.com/khvzak/bluez-tools";
description = "Set of tools to manage bluetooth devices for linux";
license = with lib.licenses; [ gpl2Plus ];
mainProgram = "bt-agent";
maintainers = [ ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,196 @@
{
lib,
stdenv,
alsa-lib,
autoreconfHook,
bluez-headers,
dbus,
docutils,
ell,
enableExperimental ? false,
fetchurl,
glib,
json_c,
libical,
pkg-config,
python3Packages,
readline,
udev,
# Test gobject-introspection instead of pygobject because the latter
# causes an infinite recursion.
gobject-introspection,
buildPackages,
installTests ?
lib.meta.availableOn stdenv.hostPlatform gobject-introspection
&& stdenv.hostPlatform.emulatorAvailable buildPackages,
gitUpdater,
udevCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bluez";
inherit (bluez-headers) version src;
patches = [
(fetchurl {
name = "static.patch";
url = "https://lore.kernel.org/linux-bluetooth/20250703182908.2370130-1-hi@alyssa.is/raw";
hash = "sha256-4Yz3ljsn2emJf+uTcJO4hG/YXvjERtitce71TZx5Hak=";
})
];
buildInputs = [
alsa-lib
dbus
ell
glib
json_c
libical
python3Packages.python
readline
udev
];
nativeBuildInputs = [
autoreconfHook
docutils
pkg-config
python3Packages.pygments
python3Packages.wrapPython
udevCheckHook
];
outputs = [
"out"
"dev"
]
++ lib.optional installTests "test";
postPatch = ''
substituteInPlace tools/hid2hci.rules \
--replace-fail /sbin/udevadm ${udev}/bin/udevadm \
--replace-fail "hid2hci " "$out/lib/udev/hid2hci "
''
+
# Disable some tests:
# - test-mesh-crypto depends on the following kernel settings:
# CONFIG_CRYPTO_[USER|USER_API|USER_API_AEAD|USER_API_HASH|AES|CCM|AEAD|CMAC]
# - test-vcp is flaky (?), see:
# - https://github.com/bluez/bluez/issues/683
# - https://github.com/bluez/bluez/issues/726
''
skipTest() {
if [[ ! -f unit/$1.c ]]; then
echo "unit/$1.c no longer exists"
false
fi
echo 'int main() { return 77; }' > unit/$1.c
}
skipTest test-mesh-crypto
skipTest test-vcp
'';
configureFlags = [
"--localstatedir=/var"
(lib.enableFeature enableExperimental "experimental")
(lib.enableFeature true "btpclient")
(lib.enableFeature true "cups")
(lib.enableFeature true "external-ell")
(lib.enableFeature true "health")
(lib.enableFeature true "hid2hci")
(lib.enableFeature true "library")
(lib.enableFeature true "logger")
(lib.enableFeature true "mesh")
(lib.enableFeature true "midi")
(lib.enableFeature true "nfc")
(lib.enableFeature true "pie")
(lib.enableFeature true "sixaxis")
(lib.enableFeature (lib.elem "libsystemd" udev.meta.pkgConfigModules) "systemd")
# Set "deprecated" to provide ciptool, sdptool, and rfcomm (unmaintained);
# superseded by new D-Bus APIs
(lib.enableFeature true "deprecated")
(lib.withFeatureAs true "dbusconfdir" "${placeholder "out"}/share")
(lib.withFeatureAs true "dbussessionbusdir" "${placeholder "out"}/share/dbus-1/services")
(lib.withFeatureAs true "dbussystembusdir" "${placeholder "out"}/share/dbus-1/system-services")
(lib.withFeatureAs true "systemdsystemunitdir" "${placeholder "out"}/etc/systemd/system")
(lib.withFeatureAs true "systemduserunitdir" "${placeholder "out"}/etc/systemd/user")
(lib.withFeatureAs true "udevdir" "${placeholder "out"}/lib/udev")
];
makeFlags = [
"rulesdir=${placeholder "out"}/lib/udev/rules.d"
];
# Work around `make install' trying to create /var/lib/bluetooth.
installFlags = [
"statedir=$(TMPDIR)/var/lib/bluetooth"
];
doCheck = stdenv.hostPlatform.isx86_64;
doInstallCheck = true;
postInstall =
let
pythonPath = with python3Packages; [
dbus-python
pygobject3
];
in
''
# for bluez4 compatibility for NixOS
mkdir $out/sbin
ln -s ../libexec/bluetooth/bluetoothd $out/sbin/bluetoothd
ln -s ../libexec/bluetooth/obexd $out/sbin/obexd
# Add extra configuration
rm $out/etc/bluetooth/{main,input,network}.conf
ln -s /etc/bluetooth/main.conf $out/etc/bluetooth/main.conf
# https://github.com/NixOS/nixpkgs/issues/204418
ln -s /etc/bluetooth/input.conf $out/etc/bluetooth/input.conf
ln -s /etc/bluetooth/network.conf $out/etc/bluetooth/network.conf
# Add missing tools, ref https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/bluez
for files in $(find tools/ -type f -perm -755); do
filename=$(basename $files)
install -Dm755 tools/$filename $out/bin/$filename
done
install -Dm755 attrib/gatttool $out/bin/gatttool
''
+ lib.optionalString installTests ''
mkdir -p $test/{bin,test}
cp -a test $test
pushd $test/test
for t in \
list-devices \
monitor-bluetooth \
simple-agent \
test-adapter \
test-device \
; do
ln -s ../test/$t $test/bin/bluez-$t
done
popd
wrapPythonProgramsIn $test/test "$test/test ${toString pythonPath}"
'';
enableParallelBuilding = true;
passthru.updateScript = gitUpdater {
url = "https://git.kernel.org/pub/scm/bluetooth/bluez.git";
};
meta = {
mainProgram = "btinfo";
inherit (bluez-headers.meta)
changelog
description
homepage
license
maintainers
platforms
;
};
})

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
python3,
libX11,
libXrandr,
}:
stdenv.mkDerivation rec {
pname = "blugon";
version = "1.12.1";
src = fetchFromGitHub {
owner = "jumper149";
repo = "blugon";
tag = version;
sha256 = "1i67v8jxvavgax3dwvns200iwwdcvgki04liq0x64q52lg0vrh7m";
};
buildInputs = [
python3
libX11
libXrandr
];
# Remove at next release
# https://github.com/jumper149/blugon/commit/d262cd05
postPatch = ''
sed -i 's,CC = gcc,CC ?= gcc,g' backends/scg/Makefile
'';
makeFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
description = "Simple and configurable Blue Light Filter for X";
longDescription = ''
blugon is a simple and fast Blue Light Filter, that is highly configurable and provides a command line interface.
The program can be run just once or as a daemon (manually or via systemd).
There are several different backends available.
blugon calculates the screen color from your local time and configuration.
'';
license = licenses.asl20;
homepage = "https://github.com/jumper149/blugon";
platforms = platforms.unix;
maintainers = with maintainers; [ jumper149 ];
mainProgram = "blugon";
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
cmake,
gdk-pixbuf,
libGL,
libgbm,
}:
stdenv.mkDerivation rec {
pname = "blur-effect";
version = "1.1.3";
src = fetchFromGitHub {
owner = "sonald";
repo = "blur-effect";
tag = version;
sha256 = "0cjw7iz0p7x1bi4vmwrivfidry5wlkgfgdl9wly88cm3z9ib98jj";
};
nativeBuildInputs = [
pkg-config
cmake
];
buildInputs = [
gdk-pixbuf
libGL
libgbm
];
meta = with lib; {
homepage = "https://github.com/sonald/blur-effect";
description = "Off-screen image blurring utility using OpenGL ES 3.0";
license = licenses.gpl3;
platforms = platforms.unix;
broken = stdenv.hostPlatform.isDarwin; # packages 'libdrm' and 'gbm' not found
maintainers = with maintainers; [ romildo ];
mainProgram = "blur_image";
};
}