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,34 @@
{
lib,
fetchFromGitHub,
ocamlPackages,
}:
let
inherit (ocamlPackages) buildDunePackage lablgtk3-sourceview3 ocp-index;
in
buildDunePackage rec {
pname = "ocaml-top";
version = "1.2.0";
src = fetchFromGitHub {
owner = "OCamlPro";
repo = "ocaml-top";
rev = version;
hash = "sha256-xmPGGB/zUpfeAxUIhR1PhfoESAJq7sTpqHuf++EH3Lw=";
};
buildInputs = [
lablgtk3-sourceview3
ocp-index
];
meta = {
homepage = "https://www.typerex.org/ocaml-top.html";
license = lib.licenses.gpl3;
description = "Simple cross-platform OCaml code editor built for top-level evaluation";
mainProgram = "ocaml-top";
maintainers = with lib.maintainers; [ vbgl ];
};
}

View File

@@ -0,0 +1,39 @@
{
stdenv,
lib,
fetchurl,
}:
let
version = "6.37.0";
sha256 = "99ff58080ed154cc4bd70f915fe4760dffb026a1c0447caa0b3bdb982b24b0a8";
in
stdenv.mkDerivation {
pname = "ocaml-make";
inherit version;
src = fetchurl {
url = "https://bitbucket.org/mmottl/ocaml-makefile/downloads/ocaml-makefile-${version}.tar.gz";
inherit sha256;
};
installPhase = ''
mkdir -p "$out/include/"
cp OCamlMakefile "$out/include/"
'';
setupHook = ./setup-hook.sh;
meta = {
homepage = "http://www.ocaml.info/home/ocaml_sources.html";
description = "Generic OCaml Makefile for GNU Make";
license = with lib.licenses; [
lgpl21Only
ocamlLgplLinkingException
gpl3Only
];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,5 @@
addOcamlMakefile () {
export OCAMLMAKEFILE="@out@/include/OCamlMakefile"
}
addEnvHooks "$targetOffset" addOcamlMakefile

View File

@@ -0,0 +1,149 @@
{
lib,
stdenv,
fetchurl,
makeBinaryWrapper,
makeDesktopItem,
copyDesktopItems,
jre,
# deps
alsa-lib,
libjack2,
libpulseaudio,
pipewire,
libGL,
libX11,
libXcursor,
libXext,
libXrandr,
libXxf86vm,
# runtime (path)
xrandr,
# native
unzip,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ocelot-desktop";
version = "1.14.1";
__darwinAllowLocalNetworking = true;
# Cannot build from source because sbt/scala support is completely non-existent in nixpkgs
src = fetchurl {
url = "https://gitlab.com/api/v4/projects/9941848/packages/generic/ocelot-desktop/v${finalAttrs.version}/ocelot-desktop-v${finalAttrs.version}.jar";
hash = "sha256-OO+fgb9PO72znb2sU0olxFf+YuWZvgZkWdszFPpMZg8=";
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
preferLocal = true;
nativeBuildInputs = [
makeBinaryWrapper
copyDesktopItems
unzip
];
installPhase =
let
# does darwin need any deps?
runtimeLibs = lib.optionals stdenv.hostPlatform.isLinux [
# openal
alsa-lib
libjack2
libpulseaudio
pipewire
# lwjgl
libGL
libX11
libXcursor
libXext
libXrandr
libXxf86vm
];
runtimePrograms = lib.optionals stdenv.hostPlatform.isLinux [
# https://github.com/LWJGL/lwjgl/issues/128
xrandr
];
in
''
runHook preInstall
mkdir -p $out/{bin,share/ocelot-desktop}
install -Dm644 ${finalAttrs.src} $out/share/ocelot-desktop/ocelot-desktop.jar
makeBinaryWrapper ${jre}/bin/java $out/bin/ocelot-desktop \
--set JAVA_HOME ${jre.home} \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeLibs}" \
--prefix PATH : "${lib.makeBinPath runtimePrograms}" \
--add-flags "-jar $out/share/ocelot-desktop/ocelot-desktop.jar"
# copy icons from zip file
# ocelot/desktop/images/icon*.png
# 16,32,64,128,256
for size in 16 32 64 128 256; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
unzip -p $out/share/ocelot-desktop/ocelot-desktop.jar \
ocelot/desktop/images/icon"$size".png > $out/share/icons/hicolor/"$size"x"$size"/apps/ocelot-desktop.png
done
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "ocelot-desktop";
desktopName = "Ocelot Desktop";
genericName = "OpenComputers Emulator";
comment = "An advanced OpenComputers emulator";
tryExec = "ocelot-desktop";
exec = "ocelot-desktop -w %f";
icon = "ocelot-desktop";
startupNotify = true;
startupWMClass = "Ocelot Desktop"; # (maybe broken)
terminal = false;
keywords = [
"Ocelot"
"OpenComputers"
"Emulator"
"oc"
"lua"
"OpenOS"
"ocemu"
"mc"
"Minecraft"
];
categories = [
"Development"
"Emulator"
];
mimeTypes = [
"inode/directory"
];
})
];
meta = {
description = "Advanced OpenComputers emulator";
homepage = "https://ocelot.fomalhaut.me/desktop";
changelog = "https://gitlab.com/cc-ru/ocelot/ocelot-desktop/-/releases/v${finalAttrs.version}";
license = lib.licenses.mit;
mainProgram = "ocelot-desktop";
platforms = with lib.platforms; linux ++ darwin;
badPlatforms = [
# missing compatible lwjgl.dylib
"aarch64-darwin"
];
maintainers = with lib.maintainers; [ griffi-gh ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
};
})

View File

@@ -0,0 +1,66 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
dpkg,
qt6,
libjack2,
alsa-lib,
bzip2,
libpulseaudio,
xz,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ocenaudio";
version = "3.15.3";
src = fetchurl {
name = "ocenaudio.deb";
url = "https://www.ocenaudio.com/downloads/index.php/ocenaudio_debian12.deb?version=v${finalAttrs.version}";
hash = "sha256-Nc4G+p6KLlID59kVYmlU+UE7vIPYeTqQeCEv9hrJnh0=";
};
nativeBuildInputs = [
autoPatchelfHook
qt6.wrapQtAppsHook
dpkg
];
buildInputs = [
xz
qt6.qtbase
bzip2
libjack2
alsa-lib
libpulseaudio
];
dontBuild = true;
dontStrip = true;
installPhase = ''
runHook preInstall
cp -r opt/ocenaudio $out
cp -r usr/share $out/share
substituteInPlace $out/share/applications/ocenaudio.desktop \
--replace-fail "/opt/ocenaudio/bin/ocenaudio" "ocenaudio"
mkdir -p $out/share/licenses/ocenaudio
mv $out/bin/ocenaudio_license.txt $out/share/licenses/ocenaudio/LICENSE
# Create symlink bzip2 library
ln -s ${bzip2.out}/lib/libbz2.so.1 $out/lib/libbz2.so.1.0
runHook postInstall
'';
meta = {
description = "Cross-platform, easy to use, fast and functional audio editor";
homepage = "https://www.ocenaudio.com";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ onny ];
};
})

View File

@@ -0,0 +1,97 @@
# This combines together OCF definitions from other derivations.
# https://github.com/ClusterLabs/resource-agents/blob/master/doc/dev-guides/ra-dev-guide.asc
{
stdenv,
lib,
runCommand,
lndir,
fetchFromGitHub,
fetchpatch,
autoreconfHook,
pkg-config,
python3,
glib,
drbd,
pacemaker,
}:
let
drbdForOCF = drbd.override {
forOCF = true;
};
pacemakerForOCF = pacemaker.override {
forOCF = true;
};
resource-agentsForOCF = stdenv.mkDerivation rec {
pname = "resource-agents";
version = "4.10.0";
src = fetchFromGitHub {
owner = "ClusterLabs";
repo = "resource-agents";
rev = "v${version}";
sha256 = "0haryi3yrszdfpqnkfnppxj1yiy6ipah6m80snvayc7v0ss0wnir";
};
patches = [
# autoconf-2.72 upstream fix:
# https://github.com/ClusterLabs/resource-agents/pull/1908
(fetchpatch {
name = "autoconf-2.72.patch";
url = "https://github.com/ClusterLabs/resource-agents/commit/bac658711a61fd704e792e2a0a45a2137213c442.patch";
hash = "sha256-Xq7W8pMRmFZmkqb2430bY5zdmVTrUrob6GwGiN6/bKY=";
})
];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
glib
python3
];
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
# Needed with GCC 12 but breaks on darwin (with clang) or older gcc
"-Wno-error=maybe-uninitialized"
]
);
meta = with lib; {
homepage = "https://github.com/ClusterLabs/resource-agents";
description = "Combined repository of OCF agents from the RHCS and Linux-HA projects";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [
ryantm
astro
];
};
};
in
# This combines together OCF definitions from other derivations.
# https://github.com/ClusterLabs/resource-agents/blob/master/doc/dev-guides/ra-dev-guide.asc
runCommand "ocf-resource-agents"
{
# Fix derivation location so things like
# $ nix edit -f. ocf-resource-agents
# just work.
pos = builtins.unsafeGetAttrPos "version" resource-agentsForOCF;
# Useful to build and undate inputs individually:
passthru.inputs = {
inherit resource-agentsForOCF drbdForOCF pacemakerForOCF;
};
}
''
mkdir -p $out/usr/lib/ocf
${lndir}/bin/lndir -silent "${resource-agentsForOCF}/lib/ocf/" $out/usr/lib/ocf
${lndir}/bin/lndir -silent "${drbdForOCF}/usr/lib/ocf/" $out/usr/lib/ocf
${lndir}/bin/lndir -silent "${pacemakerForOCF}/usr/lib/ocf/" $out/usr/lib/ocf
''

View File

@@ -0,0 +1,115 @@
{
lib,
fetchFromGitHub,
python3,
installShellFiles,
nix-update-script,
}:
let
py = python3.override {
self = py;
packageOverrides = self: super: {
jmespath = super.jmespath.overridePythonAttrs (oldAttrs: rec {
version = "0.10.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9";
hash = "";
};
doCheck = false;
});
};
};
in
py.pkgs.buildPythonApplication rec {
pname = "oci-cli";
version = "3.67.0";
pyproject = true;
src = fetchFromGitHub {
owner = "oracle";
repo = "oci-cli";
tag = "v${version}";
hash = "sha256-sdd0/kUUqxMzmoeY0QZHSSQF+XVNWnzZRI5GIhR3W5s=";
};
nativeBuildInputs = [ installShellFiles ];
build-system = with py.pkgs; [
setuptools
];
dependencies = with py.pkgs; [
arrow
certifi
click
cryptography
jmespath
oci
prompt-toolkit
pyopenssl
python-dateutil
pytz
pyyaml
retrying
six
terminaltables
];
pythonRelaxDeps = [
"click"
"PyYAML"
"cryptography"
"oci"
"prompt-toolkit"
"pyOpenSSL"
"terminaltables"
];
# Propagating dependencies leaks them through $PYTHONPATH which causes issues
# when used in nix-shell.
postFixup = ''
rm $out/nix-support/propagated-build-inputs
'';
postInstall = ''
cat >oci.zsh <<EOF
#compdef oci
zmodload -i zsh/parameter
autoload -U +X bashcompinit && bashcompinit
if ! (( $+functions[compdef] )) ; then
autoload -U +X compinit && compinit
fi
EOF
cat src/oci_cli/bin/oci_autocomplete.sh >>oci.zsh
installShellCompletion \
--cmd oci \
--bash src/oci_cli/bin/oci_autocomplete.sh \
--zsh oci.zsh
'';
doCheck = true;
pythonImportsCheck = [
"oci_cli"
];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Command Line Interface for Oracle Cloud Infrastructure";
homepage = "https://docs.cloud.oracle.com/iaas/Content/API/Concepts/cliconcepts.htm";
license = with licenses; [
asl20 # or
upl
];
maintainers = with maintainers; [
ilian
FKouhai
];
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
buildGoModule,
fetchFromGitHub,
go-md2man,
installShellFiles,
pkg-config,
bcc,
libseccomp,
}:
buildGoModule rec {
pname = "oci-seccomp-bpf-hook";
version = "1.2.11";
src = fetchFromGitHub {
owner = "containers";
repo = "oci-seccomp-bpf-hook";
rev = "v${version}";
sha256 = "sha256-1LRwbKOLNBkY/TMTLlWq2lkFzCabXqwdaMRT9HNr6HE=";
};
vendorHash = null;
outputs = [
"out"
"man"
];
nativeBuildInputs = [
go-md2man
installShellFiles
pkg-config
];
buildInputs = [
bcc
libseccomp
];
checkPhase = ''
go test -v ./...
'';
buildPhase = ''
make
'';
postBuild = ''
substituteInPlace oci-seccomp-bpf-hook.json --replace HOOK_BIN_DIR "$out/bin"
'';
installPhase = ''
install -Dm755 bin/* -t $out/bin
install -Dm644 oci-seccomp-bpf-hook.json -t $out
installManPage docs/*.[1-9]
'';
meta = with lib; {
homepage = "https://github.com/containers/oci-seccomp-bpf-hook";
description = ''
OCI hook to trace syscalls and generate a seccomp profile
'';
mainProgram = "oci-seccomp-bpf-hook";
license = licenses.asl20;
maintainers = with maintainers; [ saschagrunert ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,46 @@
{
fetchFromGitHub,
lib,
nix-update-script,
openssl,
pkg-config,
rustPlatform,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "oci2git";
version = "0.2.1";
src = fetchFromGitHub {
owner = "Virviil";
repo = "oci2git";
tag = "v${finalAttrs.version}";
hash = "sha256-83Rcw4K3+bqcvqoXTQ2ay/7eAO6GT76RV3qFzfX6O60=";
};
cargoHash = "sha256-7OallIrRg278Bo9iV7FStXbZ1W29RuAK6AnB3PQNWrY=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Introspecting Docker images as easy as using Git";
homepage = "https://github.com/Virviil/oci2git";
changelog = "https://github.com/Virviil/oci2git/releases/tag/v${finalAttrs.version}";
license = [ lib.licenses.mit ];
maintainers = [ lib.maintainers.kpbaks ];
mainProgram = "oci2git";
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,89 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
buildGoModule,
callPackage,
gnumake,
pnpm_9,
nodejs,
ocis,
}:
let
idp-assets = stdenvNoCC.mkDerivation {
pname = "idp-assets";
version = "0-unstable-2020-10-14";
src = fetchFromGitHub {
owner = "owncloud";
repo = "assets";
rev = "e8b6aeadbcee1865b9df682e9bd78083842d2b5c";
hash = "sha256-PzGff2Zx8xmvPYQa4lS4yz2h+y/lerKvUZkYI7XvAUw=";
};
installPhase = ''
mkdir -p $out/share
cp logo.svg favicon.ico $out/share/
'';
dontConfigure = true;
dontBuild = true;
dontFixup = true;
};
in
buildGoModule rec {
pname = "ocis";
version = "5.0.9";
vendorHash = null;
src = fetchFromGitHub {
owner = "owncloud";
repo = "ocis";
tag = "v${version}";
hash = "sha256-TsMrQx+P1F2t66e0tGG0VvRi4W7+pCpDHd0aNsacOsI=";
};
nativeBuildInputs = [
gnumake
nodejs
pnpm_9.configHook
];
pnpmDeps = pnpm_9.fetchDeps {
inherit pname version src;
sourceRoot = "${src.name}/services/idp";
fetcherVersion = 1;
hash = "sha256-gNlN+u/bobnTsXrsOmkDcWs67D/trH3inT5AVQs3Brs=";
};
pnpmRoot = "services/idp";
buildPhase = ''
runHook preBuild
cp -r ${ocis.web}/share/* services/web/assets/
pnpm -C services/idp build
mkdir -p services/idp/assets/identifier/static
cp -r ${idp-assets}/share/* services/idp/assets/identifier/static/
make -C ocis VERSION=${version} DATE=${version} build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin/
cp ocis/bin/ocis $out/bin/
runHook postInstall
'';
passthru = {
web = callPackage ./web.nix { };
updateScript = ./update.sh;
};
meta = {
homepage = "https://github.com/owncloud/web";
description = "Next generation frontend for ownCloud Infinite Scale";
license = lib.licenses.asl20;
mainProgram = "ocis";
maintainers = with lib.maintainers; [ xinyangli ];
};
}

22
pkgs/by-name/oc/ocis/update.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq gnugrep nix-update coreutils
set -ex
TAGS=$(curl -s https://api.github.com/repos/owncloud/ocis/releases | jq -r ".[].tag_name")
for tag in $TAGS; do
main_version_old=$(echo "v$UPDATE_NIX_OLD_VERSION" | cut -d'.' -f1)
main_version_new=$(echo "$tag" | cut -d'.' -f1)
# Compare the main versions
if [[ "$main_version_old" == "$main_version_new" ]]; then
UPDATE_NIX_NEW_VERSION=$tag
break
else
continue
fi
done
OCIS_WEB_VERSION=$(curl -s https://raw.githubusercontent.com/owncloud/ocis/$UPDATE_NIX_NEW_VERSION/services/web/Makefile | grep -oP '(?<=WEB_ASSETS_VERSION = )v[0-9]+\.[0-9]+\.[0-9]+')
nix-update -vr 'v(.*)' --version=$OCIS_WEB_VERSION ocis.web
nix-update -vr 'v(.*)' --version=$UPDATE_NIX_NEW_VERSION ocis

View File

@@ -0,0 +1,49 @@
{
lib,
stdenvNoCC,
nodejs,
pnpm_9,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation rec {
pname = "ocis-web";
version = "8.0.5";
src = fetchFromGitHub {
owner = "owncloud";
repo = "web";
rev = "refs/tags/v${version}";
hash = "sha256-hupdtK/V74+X7/eXoDmUjFvSKuhnoOtNQz7o6TLJXG4=";
};
nativeBuildInputs = [
nodejs
pnpm_9.configHook
];
buildPhase = ''
runHook preBuild
pnpm build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r dist/* $out/share/
runHook postInstall
'';
pnpmDeps = pnpm_9.fetchDeps {
inherit pname version src;
fetcherVersion = 1;
hash = "sha256-3Erva6srdkX1YQ727trx34Ufx524nz19MUyaDQToz6M=";
};
meta = {
homepage = "https://github.com/owncloud/ocis";
description = "ownCloud Infinite Scale Stack";
maintainers = with lib.maintainers; [ xinyangli ];
license = lib.licenses.agpl3Only;
};
}

View File

@@ -0,0 +1,83 @@
{
fetchurl,
lib,
stdenv,
autoPatchelfHook,
}:
let
arch =
{
i686-linux = "386";
x86_64-linux = "amd64";
aarch64-linux = "arm64";
armv7l-linux = "arm";
x86_64-darwin = "amd64";
aarch64-darwin = "arm64";
}
."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
os =
if stdenv.hostPlatform.isLinux then
"linux"
else if stdenv.hostPlatform.isDarwin then
"darwin"
else
throw "Unsupported OS";
hash =
{
hash_386-linux = "sha256-2RtkxtVk7YN7CfsIBpMP85g84MNTzrnEgk10eFdfyyw=";
hash_amd64-linux = "sha256-tmUfDKLO35qCs1hauJQKhJhcnMhqOpcqDFtAggMFhLE=";
hash_arm64-linux = "sha256-ggRDW1cnTHMQKvOvCDH3eptH3O3PgYaondlzOGHTjio=";
hash_arm-linux = "sha256-uMLRow1NeHufSI5B4k5qSIfH3lTxg+WxzLxgdedAz40=";
hash_amd64-darwin = "sha256-LZ6n/f2MdbFaPnBCoJqZZ7HQiLG3Z6ZoatgFsxaFvMc=";
hash_arm64-darwin = "sha256-k5X2ZInFS/HlToOZPX23TRJqlx/XM1ZG++Xr4BHn8SY=";
}
."hash_${arch}-${os}";
in
stdenv.mkDerivation (finalAttrs: {
pname = "ocis_5-bin";
version = "5.0.9";
src = fetchurl {
url = "https://github.com/owncloud/ocis/releases/download/v${finalAttrs.version}/ocis-${finalAttrs.version}-${os}-${arch}";
inherit hash;
};
dontUnpack = true;
nativeBuildInputs = [ autoPatchelfHook ];
installPhase = ''
runHook preInstall
install -D $src $out/bin/ocis
runHook postInstall
'';
passthru.updateScript = ./update.py;
meta = with lib; {
description = "ownCloud Infinite Scale Stack";
homepage = "https://owncloud.dev/ocis/";
changelog = "https://github.com/owncloud/ocis/releases/tag/v${finalAttrs.version}";
# oCIS is licensed under non-free EULA which can be found here :
# https://github.com/owncloud/ocis/releases/download/v5.0.1/End-User-License-Agreement-for-ownCloud-Infinite-Scale.pdf
license = licenses.unfree;
maintainers = with maintainers; [
ramblurr
bhankas
danth
ramblurr
];
platforms =
(lib.intersectLists platforms.linux (
lib.platforms.arm ++ lib.platforms.aarch64 ++ lib.platforms.x86
))
++ (lib.intersectLists platforms.darwin (lib.platforms.aarch64 ++ lib.platforms.x86_64));
sourceProvenance = [ sourceTypes.binaryNativeCode ];
mainProgram = "ocis";
};
})

View File

@@ -0,0 +1,271 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i python3 -p common-updater-scripts gnused nix coreutils python312
"""
Updater script for the ocis_5-bin package.
This script fetches an HTML table from a specified URL and parses it to determine the release type
(either "Rolling" or "Production") of a given software version. It uses the built-in urllib.request
for fetching the HTML content and the built-in html.parser for parsing the HTML. By relying only on
standard library modules, we avoid dependencies on third-party libraries, which simplifies deployment
and improves portability.
"""
import urllib.request
import os
import subprocess
import json
import sys
from datetime import datetime
from html.parser import HTMLParser
TRACKING_CHANNEL = "Production" # Either Rolling or Production
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN", None)
MAJOR_VERSION = 5
PKG_NAME = f"ocis_{MAJOR_VERSION}-5"
class TableParser(HTMLParser):
def __init__(self, version):
super().__init__()
self.version = version
self.in_td = False
self.current_row = []
self.release_type = None
self.in_target_row = False
def handle_starttag(self, tag, attrs):
if tag == "td":
self.in_td = True
if tag == "a":
href = dict(attrs).get("href", "")
if self.version in href:
self.in_target_row = True
def handle_endtag(self, tag):
if tag == "td":
self.in_td = False
if tag == "tr" and self.in_target_row:
self.release_type = self.current_row[1]
self.in_target_row = False
if tag == "tr":
self.current_row = []
def handle_data(self, data):
if self.in_td:
self.current_row.append(data.strip())
def get_release_type(content, version):
parser = TableParser(version)
parser.feed(content)
return parser.release_type
def get_all_versions():
"""Get versions from GitHub releases with pagination (up to 10 pages)."""
versions = []
page = 1
max_pages = 10
per_page = 30
while page <= max_pages:
url = f"https://api.github.com/repos/owncloud/ocis/releases?page={page}&per_page={per_page}"
req = urllib.request.Request(url)
if GITHUB_TOKEN:
req.add_header("Authorization", f"Bearer {GITHUB_TOKEN}")
req.add_header("Accept", "application/vnd.github.v3+json")
req.add_header("User-Agent", "ocis-bin-updater-script")
with urllib.request.urlopen(req) as response:
if response.status != 200:
raise Exception(f"HTTP request failed with status {response.status}")
data = response.read()
releases = json.loads(data)
if not releases:
break
for release in releases:
version = release["tag_name"].lstrip("v")
published_date = datetime.strptime(
release["published_at"], "%Y-%m-%dT%H:%M:%SZ"
)
versions.append({"version": version, "published_date": published_date})
page += 1
if len(releases) < per_page:
break
if not versions:
raise Exception("No releases found in GitHub API response")
return versions
def get_current_version():
result = subprocess.run(
[
"nix-instantiate",
"--eval",
"-E",
f"with import ./. {{}}; {PKG_NAME}.version or (lib.getVersion {PKG_NAME})",
],
capture_output=True,
text=True,
)
result.check_returncode()
return result.stdout.strip().strip('"')
def get_hash(os_name, arch, version):
url = f"https://github.com/owncloud/ocis/releases/download/v{version}/ocis-{version}-{os_name}-{arch}"
result = subprocess.run(
["nix-prefetch-url", "--type", "sha256", url], capture_output=True, text=True
)
result.check_returncode()
pkg_hash = result.stdout.strip()
result = subprocess.run(
["nix", "hash", "to-sri", f"sha256:{pkg_hash}"], capture_output=True, text=True
)
result.check_returncode()
return result.stdout.strip()
def update_source_version(pkg_name, version, hash_value, system):
subprocess.run(
[
"update-source-version",
pkg_name,
version,
hash_value,
f"--system={system}",
"--ignore-same-version",
],
check=True,
)
def main():
print("Fetching all versions from GitHub API (with pagination)...")
all_versions = get_all_versions()
print(f"Found {len(all_versions)} versions across multiple pages")
if not all_versions:
print("Error: No versions fetched from GitHub API")
sys.exit(1)
# We depend on the fact that versions are sorted reverse chronologically
for version in all_versions:
if version["version"].startswith(str(MAJOR_VERSION)):
latest_version = version
break
print(f"Latest version from GitHub: {latest_version['version']}")
nix_current_version = get_current_version()
print(f"Current nix version: {nix_current_version}")
current_version = None
for version in all_versions:
if nix_current_version == version["version"]:
current_version = version
break
if not current_version:
available_versions = [v["version"] for v in all_versions]
print(
f"Error: Cannot find GitHub release for current nix version {nix_current_version}"
)
print(
f"Available versions (searched {len(available_versions)} across multiple pages): {', '.join(available_versions[:10])}..."
)
sys.exit(1)
print(f"Found current version {current_version['version']} in GitHub releases")
if current_version == latest_version:
print(f"{PKG_NAME} is already up-to-date: {current_version['version']}")
return
print("Fetching release roadmap information...")
roadmap_url = "https://owncloud.dev/ocis/release_roadmap/"
try:
response = urllib.request.urlopen(roadmap_url)
content = response.read().decode("utf-8")
latest_version_channel = get_release_type(content, latest_version["version"])
current_version_channel = get_release_type(content, current_version["version"])
print(
f"Latest version {latest_version['version']} is in channel: {latest_version_channel}"
)
print(
f"Current version {current_version['version']} is in channel: {current_version_channel}"
)
except Exception as e:
print(f"Warning: Failed to fetch release roadmap information: {e}")
print("Proceeding with update using latest version")
latest_version_channel = TRACKING_CHANNEL
current_version_channel = TRACKING_CHANNEL
target_version = None
if latest_version_channel == TRACKING_CHANNEL:
target_version = latest_version
print(
f"Using latest version {latest_version['version']} as it is in the {TRACKING_CHANNEL} channel"
)
elif latest_version_channel != TRACKING_CHANNEL:
print(f"Looking for a newer version in the {TRACKING_CHANNEL} channel...")
for version in all_versions:
try:
channel = get_release_type(content, version["version"])
if (
channel == TRACKING_CHANNEL
and version["published_date"] > current_version["published_date"]
):
target_version = version
print(
f"{PKG_NAME} found newer version {version['version']} in channel {TRACKING_CHANNEL}"
)
break
except Exception as e:
print(
f"Warning: Failed to determine channel for version {version['version']}: {e}"
)
if not target_version:
print(
f"{PKG_NAME} could not find newer version in {TRACKING_CHANNEL} than the current {current_version['version']}"
)
return
print(
f"Updating {PKG_NAME} from {current_version['version']} to {target_version['version']}"
)
systems = [
("darwin", "arm64", "aarch64-darwin"),
("darwin", "amd64", "x86_64-darwin"),
("linux", "arm64", "aarch64-linux"),
("linux", "arm", "armv7l-linux"),
("linux", "amd64", "x86_64-linux"),
("linux", "386", "i686-linux"),
]
for os_name, arch, system in systems:
print(f"Calculating hash for {os_name}-{arch}...")
hash_value = get_hash(os_name, arch, target_version["version"])
print(f"Updating package for {system}...")
update_source_version(PKG_NAME, target_version["version"], hash_value, system)
print(f"Successfully updated {PKG_NAME} to version {target_version['version']}")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,49 @@
{
lib,
fetchFromGitHub,
rustPlatform,
git,
nix-update-script,
pkg-config,
openssl,
dbus,
}:
let
pname = "ockam";
version = "0.157.0";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "build-trust";
repo = "ockam";
rev = "ockam_v${version}";
hash = "sha256-o895VPlUGmLUsIeOnShjCetKoS/4x0nbEKxipEbuBu4=";
};
cargoHash = "sha256-hHbMMi4nuTORUPEKEo3OiQg7y12+cXHzUAkh3ApYx5s=";
nativeBuildInputs = [
git
pkg-config
];
buildInputs = [
openssl
dbus
];
passthru.updateScript = nix-update-script { };
# too many tests fail for now
doCheck = false;
cargoBuildFlags = [ "-p ockam" ];
meta = with lib; {
description = "Orchestrate end-to-end encryption, cryptographic identities, mutual authentication, and authorization policies between distributed applications at massive scale";
homepage = "https://github.com/build-trust/ockam";
license = licenses.mpl20;
maintainers = with maintainers; [ happysalada ];
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
ruby,
opencl-headers,
autoreconfHook,
windows,
}:
stdenv.mkDerivation rec {
pname = "ocl-icd";
version = "2.3.4";
src = fetchFromGitHub {
owner = "OCL-dev";
repo = "ocl-icd";
rev = "v${version}";
sha256 = "sha256-7q5+33oWMA/PQOz6awC+LOBVTKeXNluHxDNAq8bJPYU=";
};
nativeBuildInputs = [
autoreconfHook
ruby
];
buildInputs = [ opencl-headers ] ++ lib.optionals stdenv.hostPlatform.isWindows [ windows.dlfcn ];
configureFlags = [
"--enable-custom-vendordir=/run/opengl-driver/etc/OpenCL/vendors"
]
++ lib.optionals (!lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform) [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
];
# fixes: can't build x86_64-w64-mingw32 shared library unless -no-undefined is specified
makeFlags = lib.optionals stdenv.hostPlatform.isWindows [ "LDFLAGS=-no-undefined" ];
meta = with lib; {
description = "OpenCL ICD Loader for ${opencl-headers.name}";
mainProgram = "cllayerinfo";
homepage = "https://github.com/OCL-dev/ocl-icd";
license = licenses.bsd2;
platforms = platforms.unix ++ platforms.windows;
maintainers = with maintainers; [ r-burns ];
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
testers,
ocm,
}:
buildGoModule rec {
pname = "ocm";
version = "1.0.8";
src = fetchFromGitHub {
owner = "openshift-online";
repo = "ocm-cli";
rev = "v${version}";
sha256 = "sha256-v+BWmdTDJm1oElP/XV59pHm7NlsFj2sDTymtT0xpXKY=";
};
vendorHash = "sha256-GOdRYVnFPS1ovFmU+9MEnwTNg1sa9/25AjzbcbBJrQ0=";
# Strip the final binary.
ldflags = [
"-s"
"-w"
];
nativeBuildInputs = [ installShellFiles ];
# Tests expect the binary to be located in the root directory.
preCheck = ''
ln -s $GOPATH/bin/ocm ocm
'';
checkFlags = [
# Disable integration tests which require networking and gnupg which has issues in the sandbox
"-skip=^TestCLI$"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd ocm \
--bash <($out/bin/ocm completion bash) \
--fish <($out/bin/ocm completion fish) \
--zsh <($out/bin/ocm completion zsh)
'';
passthru.tests.version = testers.testVersion {
package = ocm;
command = "ocm version";
};
meta = with lib; {
description = "CLI for the Red Hat OpenShift Cluster Manager";
mainProgram = "ocm";
license = licenses.asl20;
homepage = "https://github.com/openshift-online/ocm-cli";
maintainers = with maintainers; [
stehessel
jfchevrette
];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
libevent,
}:
stdenv.mkDerivation rec {
version = "1.60";
pname = "ocproxy";
src = fetchFromGitHub {
owner = "cernekee";
repo = "ocproxy";
rev = "v${version}";
sha256 = "03323nnhb4y9nzwva04mq7xg03dvdrgp689g89f69jqc261skcqx";
};
nativeBuildInputs = [
autoconf
automake
];
buildInputs = [ libevent ];
preConfigure = ''
patchShebangs autogen.sh
./autogen.sh
'';
meta = with lib; {
description = "OpenConnect proxy";
longDescription = ''
ocproxy is a user-level SOCKS and port forwarding proxy for OpenConnect
based on lwIP.
'';
homepage = "https://github.com/cernekee/ocproxy";
license = licenses.bsd3;
maintainers = [ maintainers.joko ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "OCR-A";
version = "1.0";
src = fetchurl {
url = "mirror://sourceforge/ocr-a-font/OCR-A/${version}/OCRA.ttf";
sha256 = "0kpmjjxwzm84z8maz6lq9sk1b0xv1zkvl28lwj7i0m2xf04qixd0";
};
dontUnpack = true;
installPhase = ''
install -D -m 0644 $src $out/share/fonts/truetype/OCRA.ttf
'';
meta = with lib; {
description = "ANSI OCR font from the '60s. CYBER";
homepage = "https://sourceforge.net/projects/ocr-a-font/";
license = licenses.publicDomain;
maintainers = with maintainers; [ V ];
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchurl,
lzip,
texinfo,
libpng,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ocrad";
version = "0.29";
src = fetchurl {
url = "mirror://gnu/ocrad/ocrad-${finalAttrs.version}.tar.lz";
hash = "sha256-ESAMxrC3uhaISnLcy1jvaU96omzSsgQeVVWA8GTS2ek=";
};
nativeBuildInputs = [
lzip # unpack
];
buildInputs = [
texinfo
libpng
];
doCheck = true;
meta = {
description = "Optical character recognition (OCR) program & library";
longDescription = ''
GNU Ocrad is an OCR (Optical Character Recognition) program based on
a feature extraction method. It reads images in pbm (bitmap), pgm
(greyscale) or ppm (color) formats and produces text in byte (8-bit)
or UTF-8 formats.
Also includes a layout analyser able to separate the columns or
blocks of text normally found on printed pages.
Ocrad can be used as a stand-alone console application, or as a
backend to other programs.
'';
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ pSub ];
platforms = lib.platforms.unix;
mainProgram = "ocrad";
};
})

View File

@@ -0,0 +1,13 @@
diff --git i/src/ocrfeeder/studio/studioBuilder.py w/src/ocrfeeder/studio/studioBuilder.py
index 7a2ccdc..7af19d9 100644
--- i/src/ocrfeeder/studio/studioBuilder.py
+++ w/src/ocrfeeder/studio/studioBuilder.py
@@ -144,7 +144,7 @@ class Studio:
if not self.ocr_engines:
engines = self.configuration_manager.getEnginesInSystem()
if engines:
- add_engines_dialog = widgetPresenter.SystemEnginesDialog(engines)
+ add_engines_dialog = widgetPresenter.SystemEnginesDialog(self.main_window, engines)
response = add_engines_dialog.run()
if response == Gtk.ResponseType.ACCEPT:
for engine in add_engines_dialog.getChosenEngines():

View File

@@ -0,0 +1,86 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
wrapGAppsHook3,
intltool,
itstool,
libxml2,
gobject-introspection,
gtk3,
goocanvas2,
gtkspell3,
isocodes,
python3,
tesseract4,
extraOcrEngines ? [ ], # other supported engines are: ocrad gocr cuneiform
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ocrfeeder";
version = "0.8.5";
src = fetchurl {
url = "mirror://gnome/sources/ocrfeeder/${lib.versions.majorMinor finalAttrs.version}/ocrfeeder-${finalAttrs.version}.tar.xz";
hash = "sha256-sD0qWUndguJzTw0uy0FIqupFf4OX6dTFvcd+Mz+8Su0=";
};
nativeBuildInputs = [
pkg-config
wrapGAppsHook3
intltool
itstool
libxml2
gobject-introspection
];
postPatch = ''
substituteInPlace configure \
--replace-fail "import imp" "import importlib.util" \
--replace-fail "imp.find_module" "importlib.util.find_spec" \
--replace-fail "distutils" "setuptools._distutils"
'';
buildInputs = [
gtk3
goocanvas2
gtkspell3
isocodes
(python3.withPackages (
ps: with ps; [
pyenchant
sane
pillow
reportlab
odfpy
pygobject3
]
))
];
patches = [
# Compiles, but doesn't launch without this, see:
# https://gitlab.gnome.org/GNOME/ocrfeeder/-/issues/83
./fix-launch.diff
];
enginesPath = lib.makeBinPath (
[
tesseract4
]
++ extraOcrEngines
);
preFixup = ''
gappsWrapperArgs+=(--prefix PATH : "${finalAttrs.enginesPath}")
gappsWrapperArgs+=(--set ISO_CODES_DIR "${isocodes}/share/xml/iso-codes")
'';
meta = {
homepage = "https://gitlab.gnome.org/GNOME/ocrfeeder";
description = "Complete Optical Character Recognition and Document Analysis and Recognition program";
maintainers = with lib.maintainers; [ doronbehar ];
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,74 @@
{
lib,
python3Packages,
fetchFromGitHub,
djvulibre,
docbook-xsl-ns,
glibcLocales,
libxml2,
libxml2Python,
libxslt,
pkg-config,
tesseract5,
withCuneiform ? false,
cuneiform,
withGocr ? false,
gocr,
withOcrad ? false,
ocrad,
}:
python3Packages.buildPythonApplication rec {
pname = "ocrodjvu";
version = "0.14";
pyproject = true;
src = fetchFromGitHub {
owner = "FriedrichFroebel";
repo = "ocrodjvu";
tag = version;
hash = "sha256-/TPo8YCE8JKKKBBeV12ilgTNDmuklwfy0TPI/7dBiOs=";
};
build-system = with python3Packages; [
setuptools
];
propagatedBuildInputs = [
]
++ lib.optional withCuneiform cuneiform
++ lib.optional withGocr gocr
++ lib.optional withOcrad ocrad;
dependencies = with python3Packages; [
lxml
python-djvulibre
pyicu
html5lib
];
nativeCheckInputs = [
python3Packages.unittestCheckHook
python3Packages.pillow
djvulibre
glibcLocales
libxml2
libxml2Python
tesseract5
];
unittestFlagsArray = [
"tests"
"-v"
];
meta = {
description = "Wrapper for OCR systems that allows you to perform OCR on DjVu files";
homepage = "https://github.com/FriedrichFroebel/ocrodjvu";
changelog = "https://github.com/FriedrichFroebel/ocrodjvu/blob/${version}/doc/changelog";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ dansbandit ];
mainProgram = "ocrodjvu";
};
}

View File

@@ -0,0 +1,63 @@
{
lib,
stdenv,
fetchFromGitLab,
autoreconfHook,
pkg-config,
ipcalc,
nettle,
gnutls,
libev,
protobufc,
guile,
geoip,
libseccomp,
gperf,
readline,
lz4,
ronn,
pam,
libxcrypt,
oath-toolkit,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ocserv";
version = "1.3.0";
src = fetchFromGitLab {
owner = "openconnect";
repo = "ocserv";
tag = finalAttrs.version;
hash = "sha256-oZ1t1BTCdsq1jpa7LfzRGwQNTROHH9/lLBT2WAvj5h4=";
};
nativeBuildInputs = [
autoreconfHook
gperf
pkg-config
ronn
];
buildInputs = [
ipcalc
nettle
gnutls
libev
protobufc
guile
geoip
libseccomp
readline
lz4
pam
libxcrypt
oath-toolkit
];
meta = {
homepage = "https://gitlab.com/openconnect/ocserv";
license = lib.licenses.gpl2Plus;
description = "OpenConnect VPN server (ocserv), a server for the OpenConnect VPN client";
maintainers = with lib.maintainers; [ neverbehave ];
};
})

View File

@@ -0,0 +1,27 @@
{
lib,
fetchFromGitHub,
ocamlPackages,
}:
ocamlPackages.buildDunePackage rec {
pname = "ocsigen-i18n";
version = "4.0.0";
buildInputs = with ocamlPackages; [ ppxlib ];
src = fetchFromGitHub {
owner = "besport";
repo = "ocsigen-i18n";
rev = version;
hash = "sha256-NIl1YUTws8Ff4nrqdhU7oS/TN0lxVQgrtyEZtpS1ojM=";
};
meta = {
homepage = "https://github.com/besport/ocsigen-i18n";
description = "I18n made easy for web sites written with eliom";
license = lib.licenses.lgpl21;
maintainers = [ lib.maintainers.gal_bolle ];
};
}

View File

@@ -0,0 +1,133 @@
{
lib,
stdenv,
perlPackages,
fetchFromGitHub,
fetchpatch,
makeWrapper,
shortenPerlShebang,
coreutils,
dmidecode,
findutils,
inetutils,
ipmitool,
iproute2,
lvm2,
nmap,
pciutils,
usbutils,
util-linux,
nixosTests,
testers,
ocsinventory-agent,
nix-update-script,
}:
perlPackages.buildPerlPackage rec {
pname = "ocsinventory-agent";
version = "2.10.4";
src = fetchFromGitHub {
owner = "OCSInventory-NG";
repo = "UnixAgent";
tag = "v${version}";
hash = "sha256-MKUYf3k47lHc9dTGo1wYd7r4GrX98dU+04mF0Jm5e9U=";
};
patches = [
# Fix Getopt-Long warnings
# See https://github.com/OCSInventory-NG/UnixAgent/pull/490
(fetchpatch {
url = "https://github.com/OCSInventory-NG/UnixAgent/commit/c4899cef6b797df471ddf41c427970de47302f80.patch";
hash = "sha256-HxcWb9jmHiL0r6VWlsvmKUuybnM9W5471FLBBe3Zrfs=";
})
];
nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang;
buildInputs =
with perlPackages;
[
perl
DataUUID
GetoptLong
IOCompress
IOSocketSSL
LWP
LWPProtocolHttps
NetIP
NetNetmask
NetSNMP
ParseEDID
ProcDaemon
ProcPIDFile
XMLSimple
]
++ lib.optionals stdenv.hostPlatform.isLinux (
with perlPackages;
[
NetCUPS # cups-filters is broken on darwin
]
)
++ lib.optionals stdenv.hostPlatform.isDarwin (
with perlPackages;
[
MacSysProfile
]
);
postInstall =
let
runtimeDependencies = [
coreutils # uname, cut, df, stat, uptime
findutils # find
inetutils # ifconfig
ipmitool # ipmitool
nmap # nmap
pciutils # lspci
]
++ lib.optionals stdenv.hostPlatform.isLinux [
dmidecode # dmidecode
iproute2 # ip
lvm2 # pvs
usbutils # lsusb
util-linux # last, lsblk, mount
];
in
lib.optionalString stdenv.hostPlatform.isDarwin ''
shortenPerlShebang $out/bin/ocsinventory-agent
''
+ ''
wrapProgram $out/bin/ocsinventory-agent --prefix PATH : ${lib.makeBinPath runtimeDependencies}
'';
passthru = {
tests = {
inherit (nixosTests) ocsinventory-agent;
version = testers.testVersion {
package = ocsinventory-agent;
command = "ocsinventory-agent --version";
};
};
updateScript = nix-update-script { };
};
meta = {
description = "OCS Inventory unified agent for Unix operating systems";
longDescription = ''
Open Computers and Software Inventory (OCS) is an application designed
to help a network or system administrator to keep track of the hardware and
software configurations of computers that are installed on the network.
'';
homepage = "https://ocsinventory-ng.org";
changelog = "https://github.com/OCSInventory-NG/UnixAgent/releases/tag/v${version}";
downloadPage = "https://github.com/OCSInventory-NG/UnixAgent/releases";
license = lib.licenses.gpl2Only;
mainProgram = "ocsinventory-agent";
maintainers = with lib.maintainers; [
totoroot
anthonyroussel
];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,67 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
perl,
libmysqlclient,
sqlite,
mariadb,
postgresql,
mbedtls,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "ocsp-server";
version = "0.6.1";
src = fetchFromGitHub {
owner = "DorianCoding";
repo = "OCSP-server";
tag = "v${finalAttrs.version}";
hash = "sha256-7JYefylOs+Chqejt+hpB1AD4FTdbIhfKS1He4xAFMLo=";
};
cargoHash = "sha256-2wtQO6Mp4rkeklpCDKFRre5WGao7dQd+Mmma80QRo00=";
checkFlags = [
# Requires database access
"--skip=test::checkconfig"
];
nativeBuildInputs = [
pkg-config
perl
libmysqlclient
sqlite
];
buildInputs = [
openssl
sqlite
mariadb
postgresql
mbedtls
];
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "OCSP responder fetching certificate status from MySQL/MariaDB database";
homepage = "https://github.com/DorianCoding/OCSP-server";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ liberodark ];
mainProgram = "ocsp-server";
};
})

View File

@@ -0,0 +1,79 @@
{
lib,
fetchFromGitHub,
python3,
runCommand,
# passthru
octodns,
}:
let
# Export `python` with `octodns` as a module for `octodns-providers`.
python = python3.override {
self = python;
packageOverrides = final: prev: {
octodns = final.toPythonModule octodns;
};
};
python3Packages = python.pkgs;
in
python3Packages.buildPythonApplication rec {
pname = "octodns";
version = "1.13.0";
pyproject = true;
disabled = python.pythonOlder "3.9";
src = fetchFromGitHub {
owner = "octodns";
repo = "octodns";
tag = "v${version}";
hash = "sha256-a7vi7if3IbZqyFs/ZwhlN+Byv+SBQaUWk2B7rOPnPCs=";
};
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
dnspython
fqdn
idna
natsort
python-dateutil
pyyaml
];
nativeCheckInputs = with python3Packages; [
pytestCheckHook
];
pythonImportsCheck = [ "octodns" ];
passthru = {
providers = lib.recurseIntoAttrs (
lib.packagesFromDirectoryRecursive {
inherit (python3Packages) callPackage;
directory = ./providers;
}
);
withProviders =
ps:
let
pyEnv = python.withPackages ps;
in
runCommand "octodns-with-providers" { } ''
mkdir -p $out/bin
ln -st $out/bin ${pyEnv}/bin/octodns-*
'';
};
meta = {
description = "Tools for managing DNS across multiple providers";
homepage = "https://github.com/octodns/octodns";
changelog = "https://github.com/octodns/octodns/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
teams = [ lib.teams.octodns ];
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
octodns,
pytestCheckHook,
pythonOlder,
dnspython,
setuptools,
}:
buildPythonPackage rec {
pname = "octodns-bind";
version = "1.0.1";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "octodns";
repo = "octodns-bind";
tag = "v${version}";
hash = "sha256-ezLaNeqJoi3fcfwQFkiEyYUSlw7cTCikmv0qmPTzrvI=";
};
build-system = [
setuptools
];
dependencies = [
octodns
dnspython
];
env.OCTODNS_RELEASE = 1;
pythonImportsCheck = [ "octodns_bind" ];
nativeCheckInputs = [
pytestCheckHook
];
meta = {
description = "RFC compliant (Bind9) provider for octoDNS";
homepage = "https://github.com/octodns/octodns-bind";
changelog = "https://github.com/octodns/octodns-bind/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
teams = [ lib.teams.octodns ];
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
octodns,
pytestCheckHook,
pythonOlder,
requests,
requests-mock,
setuptools,
}:
buildPythonPackage rec {
pname = "octodns-cloudflare";
version = "1.0.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "octodns";
repo = "octodns-cloudflare";
tag = "v${version}";
hash = "sha256-8ORqUGmbmKQ1QbGLi3TFF9DCgF/raSpSEFZ62NfNAOQ=";
};
build-system = [
setuptools
];
dependencies = [
octodns
requests
];
pythonImportsCheck = [ "octodns_cloudflare" ];
nativeCheckInputs = [
pytestCheckHook
requests-mock
];
meta = {
description = "Cloudflare API provider for octoDNS";
homepage = "https://github.com/octodns/octodns-cloudflare/";
changelog = "https://github.com/octodns/octodns-cloudflare/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.ret2pop ];
teams = [ lib.teams.octodns ];
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
octodns,
pytestCheckHook,
setuptools,
requests,
}:
buildPythonPackage rec {
pname = "octodns-ddns";
version = "0.2.1";
pyproject = true;
src = fetchFromGitHub {
owner = "octodns";
repo = "octodns-ddns";
tag = "v${version}";
hash = "sha256-n4dTkJT5UmmEqtN5x2zkJe7NQtjXz3gPwwFnOmMIfIs=";
};
build-system = [
setuptools
];
dependencies = [
octodns
requests
];
postPatch = ''
substituteInPlace tests/test_octodns_source_ddns.py \
--replace-fail "assertEquals" "assertEqual"
'';
env.OCTODNS_RELEASE = 1;
pythonImportsCheck = [
"octodns_ddns"
];
nativeCheckInputs = [
pytestCheckHook
];
meta = {
description = "Simple Dynamic DNS source for octoDNS";
homepage = "https://github.com/octodns/octodns-ddns";
changelog = "https://github.com/octodns/octodns-ddns/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.provokateurin ];
teams = [ lib.teams.octodns ];
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
octodns,
pytestCheckHook,
pythonOlder,
requests,
requests-mock,
setuptools,
}:
buildPythonPackage rec {
pname = "octodns-gandi";
version = "1.1.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "octodns";
repo = "octodns-gandi";
tag = "v${version}";
hash = "sha256-0wtG/W5pkatLQ0rXTnbHDoycWOUzOK3fcDQzt93opCc=";
};
build-system = [
setuptools
];
dependencies = [
octodns
requests
];
pythonImportsCheck = [ "octodns_gandi" ];
nativeCheckInputs = [
pytestCheckHook
requests-mock
];
meta = {
description = "Gandi v5 API provider for octoDNS";
homepage = "https://github.com/octodns/octodns-gandi";
changelog = "https://github.com/octodns/octodns-gandi/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.onny ];
teams = [ lib.teams.octodns ];
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
octodns,
pytestCheckHook,
pythonOlder,
requests,
requests-mock,
setuptools,
}:
buildPythonPackage rec {
pname = "octodns-hetzner";
version = "1.0.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "octodns";
repo = "octodns-hetzner";
tag = "v${version}";
hash = "sha256-JYVztSO38y4F+p0glgtT9/QRdt9uDnOziMFXxBikzLg=";
};
build-system = [
setuptools
];
dependencies = [
octodns
requests
];
pythonImportsCheck = [ "octodns_hetzner" ];
nativeCheckInputs = [
pytestCheckHook
requests-mock
];
meta = {
description = "Hetzner DNS provider for octoDNS";
homepage = "https://github.com/octodns/octodns-hetzner/";
changelog = "https://github.com/octodns/octodns-hetzner/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
teams = [ lib.teams.octodns ];
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
octodns,
ovh,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "octodns-ovh";
version = "1.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "octodns";
repo = "octodns-ovh";
tag = "v${version}";
hash = "sha256-UbxOdpG099G9oKyweIMH5JTP0W0MpLmsOWgQYEFD8sQ=";
};
build-system = [
setuptools
];
dependencies = [
octodns
ovh
];
env.OCTODNS_RELEASE = 1;
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "octodns_ovh" ];
meta = {
description = "OVHcloud DNS v6 API provider for octoDNS";
homepage = "https://github.com/octodns/octodns-ovh";
changelog = "https://github.com/octodns/octodns-ovh/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
teams = [ lib.teams.octodns ];
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
octodns,
pytestCheckHook,
pythonOlder,
requests,
requests-mock,
setuptools,
}:
buildPythonPackage rec {
pname = "octodns-powerdns";
version = "1.0.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "octodns";
repo = "octodns-powerdns";
tag = "v${version}";
hash = "sha256-bdCX1oHFZRYr9PvLVbag/La087DMSXZfZ2W0mXffcUY=";
};
build-system = [
setuptools
];
dependencies = [
octodns
requests
];
env.OCTODNS_RELEASE = 1;
pythonImportsCheck = [ "octodns_powerdns" ];
nativeCheckInputs = [
pytestCheckHook
requests-mock
];
meta = {
description = "PowerDNS API provider for octoDNS";
homepage = "https://github.com/octodns/octodns-powerdns/";
changelog = "https://github.com/octodns/octodns-powerdns/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
teams = [ lib.teams.octodns ];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
octodns,
pytestCheckHook,
setuptools,
python-transip,
}:
buildPythonPackage rec {
pname = "octodns-transip";
version = "1.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "octodns";
repo = "octodns-transip";
tag = "v${version}";
hash = "sha256-mqrMzPnUSavSTiyjbLKQuwuwuE2Ghk94EXccpOpWLlM=";
};
build-system = [
setuptools
];
dependencies = [
octodns
python-transip
];
env.OCTODNS_RELEASE = 1;
pythonImportsCheck = [
"octodns_transip"
];
nativeCheckInputs = [
pytestCheckHook
];
meta = {
description = "octoDNS provider that targets Transip DNS";
homepage = "https://github.com/octodns/octodns-transip";
changelog = "https://github.com/octodns/octodns-transip/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.provokateurin ];
teams = [ lib.teams.octodns ];
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchFromGitHub,
openssl,
pkg-config,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "octofetch";
version = "0.3.3";
src = fetchFromGitHub {
owner = "azur1s";
repo = "octofetch";
rev = version;
sha256 = "sha256-/AXE1e02NfxQzJZd0QX6gJDjmFFmuUTOndulZElgIMI=";
};
cargoHash = "sha256-1lnHCiRktBGYb7Bgq4p60+kikb/LApPhzNp1O0Go46Q=";
nativeBuildInputs = [ pkg-config ];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ];
meta = with lib; {
homepage = "https://github.com/azur1s/octofetch";
description = "Github user information on terminal";
license = licenses.mit;
maintainers = [ ];
mainProgram = "octofetch";
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "octomap";
version = "1.10.0";
src = fetchFromGitHub {
owner = "OctoMap";
repo = "octomap";
rev = "v${version}";
hash = "sha256-QxQHxxFciR6cvB/b8i0mr1hqGxOXhXmB4zgdsD977Mw=";
};
sourceRoot = "${src.name}/octomap";
nativeBuildInputs = [ cmake ];
env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=deprecated-declarations"
];
meta = with lib; {
description = "Probabilistic, flexible, and compact 3D mapping library for robotic systems";
homepage = "https://octomap.github.io/";
license = licenses.bsd3;
maintainers = with maintainers; [ lopsided98 ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,22 @@
diff --git a/src/octoprint/server/api/settings.py b/src/octoprint/server/api/settings.py
index c3e6cea10..ced2f8fa0 100644
--- a/src/octoprint/server/api/settings.py
+++ b/src/octoprint/server/api/settings.py
@@ -130,7 +130,7 @@ data["webcam"] = {
"webcamEnabled": s.getBoolean(["webcam", "webcamEnabled"]),
"snapshotTimeout": s.getInt(["webcam", "snapshotTimeout"]),
"timelapseEnabled": s.getBoolean(["webcam", "timelapseEnabled"]),
- "ffmpegPath": s.get(["webcam", "ffmpeg"]),
+ "ffmpegPath": "@ffmpeg@",
"ffmpegCommandline": s.get(["webcam", "ffmpegCommandline"]),
"bitrate": s.get(["webcam", "bitrate"]),
"ffmpegThreads": s.get(["webcam", "ffmpegThreads"]),
@@ -548,8 +548,6 @@ def _saveSettings(data):
["webcam", "snapshotSslValidation"],
data["webcam"]["snapshotSslValidation"],
)
- if "ffmpegPath" in data["webcam"]:
- s.set(["webcam", "ffmpeg"], data["webcam"]["ffmpegPath"])
if "ffmpegCommandline" in data["webcam"]:
commandline = data["webcam"]["ffmpegCommandline"]
if not all(

View File

@@ -0,0 +1,246 @@
{
pkgs,
stdenv,
callPackage,
lib,
fetchFromGitHub,
python3,
replaceVars,
nix-update-script,
nixosTests,
# To include additional plugins, pass them here as an overlay.
packageOverrides ? self: super: { },
}:
let
py = python3.override {
self = py;
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) [
(
self: super: {
# fix tornado.httputil.HTTPInputError: Multiple host headers not allowed
tornado = super.tornado.overridePythonAttrs (oldAttrs: {
version = "6.4.2";
format = "setuptools";
pyproject = null;
src = fetchFromGitHub {
owner = "tornadoweb";
repo = "tornado";
tag = "v6.4.2";
hash = "sha256-qgJh8pnC1ALF8KxhAYkZFAc0DE6jHVB8R/ERJFL4OFc=";
};
doCheck = false;
});
})
# Built-in dependency
(self: super: {
octoprint-filecheck = self.buildPythonPackage rec {
pname = "OctoPrint-FileCheck";
version = "2024.11.12";
format = "setuptools";
src = fetchFromGitHub {
owner = "OctoPrint";
repo = "OctoPrint-FileCheck";
rev = version;
sha256 = "sha256-Y7yvImnYahmrf5GC4c8Ki8IsOZ8r9I4uk8mYBhEQZ28=";
};
doCheck = false;
};
})
# Built-in dependency
(self: super: {
octoprint-firmwarecheck = self.buildPythonPackage rec {
pname = "OctoPrint-FirmwareCheck";
version = "2021.10.11";
format = "setuptools";
src = fetchFromGitHub {
owner = "OctoPrint";
repo = "OctoPrint-FirmwareCheck";
rev = version;
hash = "sha256-wqbD82bhJDrDawJ+X9kZkoA6eqGxqJc1Z5dA0EUwgEI=";
};
doCheck = false;
};
})
(self: super: {
octoprint-pisupport = self.buildPythonPackage rec {
pname = "OctoPrint-PiSupport";
version = "2023.10.10";
format = "setuptools";
src = fetchFromGitHub {
owner = "OctoPrint";
repo = "OctoPrint-PiSupport";
rev = version;
hash = "sha256-VSzDoFq4Yn6KOn+RNi1uVJHzH44973kd/VoMjqzyBRA=";
};
# requires octoprint itself during tests
doCheck = false;
postPatch = ''
substituteInPlace octoprint_pi_support/__init__.py \
--replace /usr/bin/vcgencmd ${self.pkgs.libraspberrypi}/bin/vcgencmd
'';
};
})
(self: super: {
octoprint = self.buildPythonPackage rec {
pname = "OctoPrint";
version = "1.11.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "OctoPrint";
repo = "OctoPrint";
rev = version;
hash = "sha256-AyRi9aQXLFggBzc6WH2kvRPkJu1ANX/++GdCJRNhY/A=";
};
propagatedBuildInputs =
with self;
[
argon2-cffi
blinker
cachelib
click
colorlog
emoji
feedparser
filetype
flask
flask-babel
flask-assets
flask-login
flask-limiter
frozendict
itsdangerous
immutabledict
jinja2
markdown
markupsafe
netaddr
netifaces
octoprint-filecheck
octoprint-firmwarecheck
passlib
pathvalidate
pkginfo
pip
psutil
pylru
pyserial
pyyaml
regex
requests
rsa
sarge
semantic-version
sentry-sdk
setuptools
tornado
unidecode
watchdog
websocket-client
werkzeug
wrapt
zeroconf
zipstream-ng
class-doc
pydantic
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ py.pkgs.appdirs ]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ octoprint-pisupport ];
nativeCheckInputs = with self; [
ddt
mock
pytestCheckHook
];
patches = [
# substitute pip and let it find out, that it can't write anywhere
(replaceVars ./pip-path.patch {
pip = "${self.pip}/bin/pip";
})
# hardcore path to ffmpeg and hide related settings
(replaceVars ./ffmpeg-path.patch {
ffmpeg = "${pkgs.ffmpeg}/bin/ffmpeg";
})
];
postPatch =
let
ignoreVersionConstraints = [
"cachelib"
"colorlog"
"emoji"
"immutabledict"
"PyYAML"
"sarge"
"sentry-sdk"
"watchdog"
"wrapt"
"zeroconf"
"Flask-Login"
"werkzeug"
"flask"
"Flask-Limiter"
"blinker"
];
in
''
sed -r -i \
${lib.concatStringsSep "\n" (
map (e: ''-e 's@${e}[<>=]+.*@${e}",@g' \'') ignoreVersionConstraints
)}
setup.py
'';
preCheck = ''
export HOME=$(mktemp -d)
rm pytest.ini
'';
disabledTests = [
"test_check_setup" # Why should it be able to call pip?
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_set_external_modification" ];
disabledTestPaths = [
"tests/test_octoprint_setuptools.py" # fails due to distutils and python3.12
];
passthru = {
inherit (self) python;
updateScript = nix-update-script { };
tests = {
plugins = (callPackage ./plugins.nix { }) super self;
inherit (nixosTests) octoprint;
};
};
meta = with lib; {
homepage = "https://octoprint.org/";
description = "Snappy web interface for your 3D printer";
mainProgram = "octoprint";
license = licenses.agpl3Only;
maintainers = with maintainers; [
WhittlesJr
gador
];
};
};
})
(callPackage ./plugins.nix { })
packageOverrides
];
};
in
with py.pkgs;
toPythonApplication octoprint

View File

@@ -0,0 +1,12 @@
diff --git a/src/octoprint/util/pip.py b/src/octoprint/util/pip.py
index 53500e5d5..39f76c1e5 100644
--- a/src/octoprint/util/pip.py
+++ b/src/octoprint/util/pip.py
@@ -284,6 +284,7 @@ class PipCaller(CommandlineCaller):
@classmethod
def autodetect_pip(cls):
commands = [
+ ["@pip@"],
[sys.executable, "-m", "pip"],
[
os.path.join(

View File

@@ -0,0 +1,673 @@
{
lib,
config,
fetchFromGitHub,
fetchFromGitLab,
fetchpatch,
marlin-calc,
}:
self: super:
let
buildPlugin =
args:
self.buildPythonPackage (
args
// {
pname = "octoprint-plugin-${args.pname}";
inherit (args) version format;
propagatedBuildInputs = (args.propagatedBuildInputs or [ ]) ++ [ super.octoprint ];
# none of the following have tests
doCheck = false;
}
);
in
{
inherit buildPlugin;
m86motorsoff = buildPlugin rec {
pname = "m84motorsoff";
version = "0.1.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "ntoff";
repo = "Octoprint-M84MotOff";
rev = "v${version}";
sha256 = "1w6h4hia286lbz2gy33rslq02iypx067yqn413xcipb07ivhvdq7";
};
meta = with lib; {
description = "Changes the \"Motors off\" button in octoprint's control tab to issue an M84 command to allow compatibility with Repetier firmware Resources";
homepage = "https://github.com/ntoff/OctoPrint-M84MotOff";
license = licenses.agpl3Only;
maintainers = with maintainers; [ stunkymonkey ];
};
};
abl-expert = buildPlugin rec {
pname = "abl-expert";
version = "0.6";
format = "setuptools";
src = fetchFromGitLab {
domain = "framagit.org";
owner = "razer";
repo = "Octoprint_ABL_Expert";
rev = version;
sha256 = "0ij3rvdwya1sbymwm5swlh2j4jagb6fal945g88zrzh5xf26hzjh";
};
meta = with lib; {
description = "Marlin auto bed leveling control, mesh correction, and z probe handling";
homepage = "https://framagit.org/razer/Octoprint_ABL_Expert/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ WhittlesJr ];
};
};
bedlevelvisualizer = buildPlugin rec {
pname = "bedlevelvisualizer";
version = "1.1.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "jneilliii";
repo = "OctoPrint-BedLevelVisualizer";
rev = version;
sha256 = "sha256-6JcYvYgEmphp5zz4xZi4G0yTo4FCIR6Yh+MXYK7H7+w=";
};
meta = with lib; {
description = "Displays 3D mesh of bed topography report";
homepage = "https://github.com/jneilliii/OctoPrint-BedLevelVisualizer";
license = licenses.mit;
maintainers = with maintainers; [ lovesegfault ];
};
};
costestimation = buildPlugin rec {
pname = "costestimation";
version = "3.4.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "OllisGit";
repo = "OctoPrint-CostEstimation";
rev = version;
sha256 = "sha256-04OPa/RpM8WehUmOp195ocsAjAvKdVY7iD5ybzQO7Dg=";
};
meta = with lib; {
description = "Plugin to display the estimated print cost for the loaded model";
homepage = "https://github.com/OllisGit/OctoPrint-CostEstimation";
license = licenses.agpl3Only;
maintainers = with maintainers; [ stunkymonkey ];
};
};
curaenginelegacy = buildPlugin rec {
pname = "curaenginelegacy";
version = "1.1.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "OctoPrint";
repo = "OctoPrint-CuraEngineLegacy";
rev = version;
sha256 = "sha256-54siSmzgPlnCRpkpZhXU9theNQ3hqL3j+Ip4Ie2w2vA=";
};
meta = with lib; {
description = "Plugin for slicing via Cura Legacy from within OctoPrint";
homepage = "https://github.com/OctoPrint/OctoPrint-CuraEngineLegacy";
license = licenses.agpl3Only;
maintainers = [ ];
};
};
displayprogress = buildPlugin rec {
pname = "displayprogress";
version = "0.1.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "OctoPrint";
repo = "OctoPrint-DisplayProgress";
rev = version;
sha256 = "080prvfwggl4vkzyi369vxh1n8231hrl8a44f399laqah3dn5qw4";
};
meta = with lib; {
description = "Displays the job progress on the printer's display";
homepage = "https://github.com/OctoPrint/OctoPrint-DisplayProgress";
license = licenses.agpl3Only;
maintainers = with maintainers; [ stunkymonkey ];
};
};
displaylayerprogress = buildPlugin rec {
pname = "displaylayerprogress";
version = "1.26.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "OllisGit";
repo = "OctoPrint-DisplayLayerProgress";
rev = version;
sha256 = "sha256-hhHc2SPixZCPJzCP8enMMWNYaYbNZAU0lNSx1B0d++4=";
};
meta = with lib; {
description = "OctoPrint-Plugin that sends the current progress of a print via M117 command";
homepage = "https://github.com/OllisGit/OctoPrint-DisplayLayerProgress";
license = licenses.agpl3Only;
maintainers = with maintainers; [ j0hax ];
};
};
ender3v2tempfix = buildPlugin {
pname = "ender3v2tempfix";
version = "unstable-2021-04-27";
format = "setuptools";
src = fetchFromGitHub {
owner = "SimplyPrint";
repo = "OctoPrint-Creality2xTemperatureReportingFix";
rev = "2c4183b6a0242a24ebf646d7ac717cd7a2db2bcf";
sha256 = "03bc2zbffw4ksk8if90kxhs3179nbhb4xikp4f0adm3lrnvxkd3s";
};
meta = with lib; {
description = "Fixes the double temperature reporting from the Creality Ender-3 v2 printer";
homepage = "https://github.com/SimplyPrint/OctoPrint-Creality2xTemperatureReportingFix";
license = licenses.mit;
maintainers = with maintainers; [ illustris ];
};
};
firmwareupdater = buildPlugin rec {
pname = "firmwareupdater";
version = "1.14.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "OctoPrint";
repo = "OctoPrint-FirmwareUpdater";
rev = version;
sha256 = "sha256-CUNjM/IJJS/lqccZ2B0mDOzv3k8AgmDreA/X9wNJ7iY=";
};
propagatedBuildInputs = with super; [ pyserial ];
meta = with lib; {
description = "Printer Firmware Updater";
homepage = "https://github.com/OctoPrint/OctoPrint-FirmwareUpdater";
license = licenses.agpl3Only;
maintainers = with maintainers; [ tri-ler ];
};
};
fullscreen = buildPlugin rec {
pname = "fullscreen";
version = "0.0.6";
format = "setuptools";
src = fetchFromGitHub {
owner = "BillyBlaze";
repo = "OctoPrint-FullScreen";
rev = version;
sha256 = "sha256-Z8twpj+gqgbiWWxNd9I9qflEAln5Obpb3cn34KwSc5A=";
};
meta = with lib; {
description = "Open webcam in fullscreen mode";
homepage = "https://github.com/BillyBlaze/OctoPrint-FullScreen";
license = licenses.agpl3Only;
maintainers = with maintainers; [ tri-ler ];
};
};
gcodeeditor = buildPlugin rec {
pname = "gcodeeditor";
version = "0.2.12";
format = "setuptools";
src = fetchFromGitHub {
owner = "ieatacid";
repo = "OctoPrint-GcodeEditor";
rev = version;
sha256 = "sha256-1Sk2ri3DKW8q8VJ/scFjpRsz65Pwt8OEURP1k70aydE=";
};
meta = with lib; {
description = "Edit gcode on OctoPrint";
homepage = "https://github.com/ieatacid/OctoPrint-GcodeEditor";
license = licenses.agpl3Only;
maintainers = with maintainers; [ WhittlesJr ];
};
};
marlingcodedocumentation = buildPlugin rec {
pname = "marlingcodedocumentation";
version = "0.13.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "costas-basdekis";
repo = "MarlinGcodeDocumentation";
rev = "v${version}";
sha256 = "sha256-3ay6iCxZk8QkFM/2Y14VTpPoxr6NXq14BFSHofn3q7I=";
};
meta = with lib; {
description = "Displays GCode documentation for Marlin in the Octoprint terminal command line";
homepage = "https://github.com/costas-basdekis/MarlinGcodeDocumentation";
license = licenses.agpl3Only;
maintainers = with maintainers; [ lovesegfault ];
};
};
mqtt = buildPlugin rec {
pname = "mqtt";
version = "0.8.16";
format = "setuptools";
src = fetchFromGitHub {
owner = "OctoPrint";
repo = "OctoPrint-MQTT";
rev = version;
sha256 = "sha256-K8DydzmsDzWn5GXpxPGvAHDFpgk/mbyVBflCgOoB94U=";
};
propagatedBuildInputs = with super; [ paho-mqtt ];
meta = with lib; {
description = "Publish printer status MQTT";
homepage = "https://github.com/OctoPrint/OctoPrint-MQTT";
license = licenses.agpl3Only;
maintainers = with maintainers; [ peterhoeg ];
};
};
mqttchambertemperature = buildPlugin rec {
pname = "mqttchambertemperature";
version = "0.0.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "synman";
repo = "OctoPrint-MqttChamberTemperature";
rev = version;
sha256 = "sha256-CvNpi8HcBBUfCs3X8yflbhe0YCU0kW3u2ADSro/qnuI=";
};
propagatedBuildInputs = with super; [ jsonpath-ng ];
meta = with lib; {
description = "Enables Chamber temperature reporting via subscribing to an MQTT topic";
homepage = "https://github.com/synman/OctoPrint-MqttChamberTemperature";
license = licenses.wtfpl;
maintainers = with maintainers; [ tri-ler ];
};
};
navbartemp = buildPlugin rec {
pname = "navbartemp";
version = "0.15";
format = "setuptools";
src = fetchFromGitHub {
owner = "imrahil";
repo = "OctoPrint-NavbarTemp";
rev = version;
sha256 = "sha256-ZPpTx+AadRffUb53sZbMUbCZa7xYGQW/5si7UB8mnVI=";
};
meta = with lib; {
description = "Displays temperatures on navbar";
homepage = "https://github.com/imrahil/OctoPrint-NavbarTemp";
license = licenses.agpl3Only;
maintainers = with maintainers; [ tri-ler ];
};
};
obico = buildPlugin rec {
pname = "obico";
version = "2.5.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "TheSpaghettiDetective";
repo = "OctoPrint-Obico";
rev = version;
sha256 = "sha256-cAUXe/lRTqYuWnrRiNDuDjcayL5yV9/PtTd9oeSC8KA=";
};
propagatedBuildInputs = with super; [
backoff
sentry-sdk
bson
distro
];
meta = with lib; {
description = "Monitor Octoprint-connected printers with Obico";
homepage = "https://www.obico.io/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ tri-ler ];
};
};
octopod = buildPlugin rec {
pname = "octopod";
version = "0.3.18";
format = "setuptools";
src = fetchFromGitHub {
owner = "gdombiak";
repo = "OctoPrint-OctoPod";
rev = version;
sha256 = "sha256-HLR5402hFlUX0MLg3HXE7bIHKNnOI0buGAViqDt8mLc=";
};
propagatedBuildInputs = with super; [ pillow ];
meta = with lib; {
description = "OctoPod extension for OctoPrint";
homepage = "https://github.com/gdombiak/OctoPrint-OctoPod";
license = licenses.asl20;
maintainers = with maintainers; [ tri-ler ];
};
};
printtimegenius = buildPlugin rec {
pname = "printtimegenius";
version = "2.4.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "eyal0";
repo = "OctoPrint-PrintTimeGenius";
rev = version;
sha256 = "sha256-+EmM61s8HHcTIf0xoHkxEP7eqaNYB6ls61YwSXiVzyA=";
};
propagatedBuildInputs = with super; [
psutil
sarge
];
preConfigure = ''
# PrintTimeGenius ships with marlin-calc binaries for multiple architectures
rm */analyzers/marlin-calc*
sed 's@"{}.{}".format(binary_base_name, machine)@"${marlin-calc}/bin/marlin-calc"@' -i */analyzers/analyze_progress.py
'';
meta = with lib; {
description = "Better print time estimation for OctoPrint";
homepage = "https://github.com/eyal0/OctoPrint-PrintTimeGenius";
license = licenses.agpl3Only;
maintainers = [ ];
};
};
prusaslicerthumbnails = buildPlugin rec {
pname = "prusaslicerthumbnails";
version = "1.0.8";
format = "setuptools";
src = fetchFromGitHub {
owner = "jneilliii";
repo = "OctoPrint-PrusaSlicerThumbnails";
rev = version;
sha256 = "sha256-5TUx64i3VIUXtpIf4mo3hP//kXE+LuuLaZEJYgv4hVs=";
};
propagatedBuildInputs = with super; [ psutil ];
meta = with lib; {
description = "Plugin that extracts thumbnails from uploaded gcode files sliced by PrusaSlicer";
homepage = "https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails";
license = licenses.agpl3Only;
maintainers = with maintainers; [ tri-ler ];
};
};
psucontrol = buildPlugin rec {
pname = "psucontrol";
version = "1.0.6";
format = "setuptools";
src = fetchFromGitHub {
owner = "kantlivelong";
repo = "OctoPrint-PSUControl";
rev = version;
sha256 = "sha256-S+lPm85+ZEO/3BXYsrxE4FU29EGWzWrSw3y1DLdByrM=";
};
propagatedBuildInputs = with super; [
python-periphery
];
preConfigure = ''
# optional; RPi.GPIO is broken on vanilla kernels
sed /RPi.GPIO/d -i requirements.txt
'';
meta = with lib; {
description = "OctoPrint plugin to control ATX/AUX power supply";
homepage = "https://github.com/kantlivelong/OctoPrint-PSUControl";
license = licenses.agpl3Only;
maintainers = [ ];
};
};
resource-monitor = buildPlugin rec {
pname = "resource-monitor";
version = "0.3.16";
format = "setuptools";
src = fetchFromGitHub {
owner = "Renaud11232";
repo = "OctoPrint-Resource-Monitor";
rev = version;
sha256 = "sha256-w1PBxO+Qf7cSSNocu7BiulZE7kesSa+LGV3uJlmd0ao=";
};
propagatedBuildInputs = with super; [ psutil ];
meta = with lib; {
description = "Plugin to view the current CPU and RAM usage on your system";
homepage = "https://github.com/Renaud11232/OctoPrint-Resource-Monitor";
license = licenses.mit;
maintainers = with maintainers; [ tri-ler ];
};
};
simpleemergencystop = buildPlugin rec {
pname = "simpleemergencystop";
version = "1.0.5";
format = "setuptools";
src = fetchFromGitHub {
owner = "Sebclem";
repo = "OctoPrint-SimpleEmergencyStop";
rev = version;
sha256 = "sha256-MbP3cKa9FPElQ/M8ykYh9kVXl8hNvmGiCHDvjgWvm9k=";
};
meta = with lib; {
description = "Simple plugin that add an emergency stop buton on NavBar of OctoPrint";
homepage = "https://github.com/Sebclem/OctoPrint-SimpleEmergencyStop";
license = licenses.agpl3Only;
maintainers = with maintainers; [ WhittlesJr ];
};
};
stlviewer = buildPlugin rec {
pname = "stlviewer";
version = "0.4.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "jneilliii";
repo = "OctoPrint-STLViewer";
rev = "refs/tags/${version}";
sha256 = "sha256-S7zjEbyo59OJpa7INCv1o4ybQ+Sy6a3EJ5AJ6wiBe1Y=";
};
meta = with lib; {
description = "Simple stl viewer tab for OctoPrint";
homepage = "https://github.com/jneilliii/Octoprint-STLViewer";
license = licenses.agpl3Only;
maintainers = [ ];
};
};
telegram = buildPlugin rec {
pname = "telegram";
version = "1.6.5";
format = "setuptools";
src = fetchFromGitHub {
owner = "fabianonline";
repo = "OctoPrint-Telegram";
rev = version;
sha256 = "sha256-SckJCbPNCflgGYLHFiXy0juCtpvo8YS1BQsFpc1f5rg=";
};
propagatedBuildInputs = with super; [ pillow ];
meta = with lib; {
description = "Plugin to send status messages and receive commands via Telegram messenger";
homepage = "https://github.com/fabianonline/OctoPrint-Telegram";
license = licenses.agpl3Only;
maintainers = with maintainers; [ stunkymonkey ];
};
};
themeify = buildPlugin rec {
pname = "themeify";
version = "1.2.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "Birkbjo";
repo = "Octoprint-Themeify";
rev = "v${version}";
sha256 = "sha256-om9IUSmxU8y0x8DrodW1EU/pilAN3+PbtYck6KfROEg=";
};
meta = with lib; {
description = "Beautiful themes for OctoPrint";
homepage = "https://github.com/birkbjo/OctoPrint-Themeify";
license = licenses.agpl3Only;
maintainers = with maintainers; [ lovesegfault ];
};
};
timelapsepurger = buildPlugin rec {
pname = "firmwareupdater";
version = "0.1.4";
format = "setuptools";
src = fetchFromGitHub {
owner = "jneilliii";
repo = "OctoPrint-TimelapsePurger";
rev = version;
sha256 = "sha256-XS4m4KByScGTPfVE4kuRLw829gNE2CdM0RyhRqGGxyw=";
};
meta = with lib; {
description = "Automatically deletes timelapses that are older than configured timeframe";
homepage = "https://github.com/jneilliii/OctoPrint-TimelapsePurger";
license = licenses.agpl3Only;
maintainers = with maintainers; [ tri-ler ];
};
};
titlestatus = buildPlugin rec {
pname = "titlestatus";
version = "0.0.5";
format = "setuptools";
src = fetchFromGitHub {
owner = "MoonshineSG";
repo = "OctoPrint-TitleStatus";
rev = version;
sha256 = "10nxjrixg0i6n6x8ghc1ndshm25c97bvkcis5j9kmlkkzs36i2c6";
};
meta = with lib; {
description = "Show printers status in window title";
homepage = "https://github.com/MoonshineSG/OctoPrint-TitleStatus";
license = licenses.agpl3Only;
maintainers = [ ];
};
};
touchui = buildPlugin rec {
pname = "touchui";
version = "0.3.18";
format = "setuptools";
src = fetchFromGitHub {
owner = "BillyBlaze";
repo = "OctoPrint-TouchUI";
rev = version;
sha256 = "sha256-PNDCjY7FhfnwK7Nd86el9ZQ00G4uMANH2Sk080iMYXw=";
};
meta = with lib; {
description = "Touch friendly interface for a small TFT module or phone for OctoPrint";
homepage = "https://github.com/BillyBlaze/OctoPrint-TouchUI";
license = licenses.agpl3Only;
maintainers = [ ];
};
};
octoklipper = buildPlugin rec {
pname = "octoklipper";
version = "0.3.8.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "AliceGrey";
repo = "OctoprintKlipperPlugin";
rev = version;
sha256 = "sha256-6r5jJDSR0DxlDQ/XWmQgYUgeL1otNNBnwurX7bbcThg=";
};
meta = with lib; {
description = "Plugin for a better integration of Klipper into OctoPrint";
homepage = "https://github.com/AliceGrey/OctoprintKlipperPlugin";
license = licenses.agpl3Only;
maintainers = with maintainers; [ lovesegfault ];
};
};
dashboard = buildPlugin rec {
pname = "dashboard";
version = "1.18.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "StefanCohen";
repo = "OctoPrint-Dashboard";
rev = version;
sha256 = "sha256-hLHT3Uze/6PlOCEICVZ2ieFTyXgcqCvgHOlIIEquujg=";
};
meta = with lib; {
description = "Dashboard for Octoprint";
homepage = "https://github.com/StefanCohen/OctoPrint-Dashboard";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ j0hax ];
};
};
}
// lib.optionalAttrs config.allowAliases {
octolapse = throw "octoprint.python.pkgs.octolapse has been removed because it has been marked as broken since at least November 2024."; # Added 2025-09-29
octoprint-dashboard = super.dashboard;
}

View File

@@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
cmake,
boost179,
gmp,
htslib,
zlib,
xz,
pkg-config,
}:
stdenv.mkDerivation rec {
pname = "octopus";
version = "0.7.4";
src = fetchFromGitHub {
owner = "luntergroup";
repo = "octopus";
rev = "v${version}";
sha256 = "sha256-FAogksVxUlzMlC0BqRu22Vchj6VX+8yNlHRLyb3g1sE=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
boost179
gmp
htslib
zlib
xz
];
patches = [
(fetchurl {
url = "https://github.com/luntergroup/octopus/commit/17a597d192bcd5192689bf38c5836a98b824867a.patch";
sha256 = "sha256-VaUr63v7mzhh4VBghH7a7qrqOYwl6vucmmKzTi9yAjY=";
})
];
postPatch = ''
# Disable -Werror to avoid build failure on fresh toolchains like
# gcc-13.
substituteInPlace lib/date/CMakeLists.txt --replace-fail ' -Werror ' ' '
substituteInPlace lib/ranger/CMakeLists.txt --replace-fail ' -Werror ' ' '
substituteInPlace lib/tandem/CMakeLists.txt --replace-fail ' -Werror ' ' '
substituteInPlace src/CMakeLists.txt --replace-fail ' -Werror ' ' '
# Fix gcc-13 build due to missing <cstdint> header.
sed -e '1i #include <cstdint>' -i src/core/tools/vargen/utils/assembler.hpp
'';
postInstall = ''
mkdir $out/bin
mv $out/octopus $out/bin
'';
meta = with lib; {
description = "Bayesian haplotype-based mutation calling";
mainProgram = "octopus";
license = licenses.mit;
homepage = "https://github.com/luntergroup/octopus";
maintainers = with maintainers; [ jbedo ];
platforms = platforms.x86_64;
};
}

View File

@@ -0,0 +1,117 @@
{
lib,
stdenv,
fetchFromGitLab,
cmake,
pkg-config,
ninja,
gfortran,
which,
perl,
procps,
libvdwxc,
libyaml,
libxc,
fftw,
blas,
lapack,
gsl,
netcdf,
arpack,
spglib,
metis,
scalapack,
mpi,
enableMpi ? true,
python3,
}:
assert (!blas.isILP64) && (!lapack.isILP64);
assert (blas.isILP64 == arpack.isILP64);
stdenv.mkDerivation (finalAttrs: {
pname = "octopus";
version = "16.2";
src = fetchFromGitLab {
owner = "octopus-code";
repo = "octopus";
tag = finalAttrs.version;
hash = "sha256-L97igB+bdZ19zpbffHi8DVSJXKtUyDqauUB+l5zzFwQ=";
};
outputs = [
"out"
"dev"
"testsuite"
];
nativeBuildInputs = [
which
perl
procps
cmake
gfortran
pkg-config
ninja
];
buildInputs = [
libyaml
libxc
blas
lapack
gsl
fftw
netcdf
arpack
libvdwxc
spglib
metis
(python3.withPackages (ps: [ ps.pyyaml ]))
]
++ lib.optional enableMpi scalapack;
propagatedBuildInputs = lib.optional enableMpi mpi;
propagatedUserEnvPkgs = lib.optional enableMpi mpi;
cmakeFlags = [
(lib.cmakeBool "OCTOPUS_MPI" enableMpi)
(lib.cmakeBool "OCTOPUS_ScaLAPACK" enableMpi)
(lib.cmakeBool "OCTOPUS_OpenMP" true)
(lib.cmakeBool "OCTOPUS_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
];
nativeCheckInputs = lib.optional enableMpi mpi;
doCheck = false; # requires installed data
postPatch = ''
patchShebangs ./
'';
postConfigure = ''
patchShebangs testsuite/oct-run_testsuite.sh
'';
postInstall = ''
mkdir -p $testsuite
moveToOutput share/octopus/testsuite $testsuite
'';
enableParallelBuilding = true;
passthru = lib.attrsets.optionalAttrs enableMpi { inherit mpi; };
meta = {
description = "Real-space time dependent density-functional theory code";
homepage = "https://octopus-code.org";
maintainers = with lib.maintainers; [ markuskowa ];
license = with lib.licenses; [
gpl2Only
asl20
lgpl3Plus
bsd3
];
platforms = [ "x86_64-linux" ];
};
})

View File

@@ -0,0 +1,33 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "octoscan";
version = "0.1.5";
src = fetchFromGitHub {
owner = "synacktiv";
repo = "octoscan";
tag = "v${version}";
hash = "sha256-SG6QHpDG9kPfb9jvHwz58U7+HZpFwYzwsDERNRW5R10=";
};
vendorHash = "sha256-Jx4OEVqCTiW/BSygeLtwwqijiACEuPk0BT26JQoL3Ds=";
ldflags = [
"-s"
"-w"
];
meta = {
description = "Static vulnerability scanner for GitHub action workflows";
homepage = "https://github.com/synacktiv/octoscan";
changelog = "https://github.com/synacktiv/octoscan/releases/tag/v${version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "octoscan";
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "octosql";
version = "0.13.0";
src = fetchFromGitHub {
owner = "cube2222";
repo = "octosql";
rev = "v${version}";
hash = "sha256-kzbIts5d2KmFfaAnOdpIXI1fiqBYXe5t981g4Uyk/cc=";
};
vendorHash = "sha256-p/2UsvxxywQKtk/9wDa5fjS0z6xLLzDONuQ5AtnUonk=";
ldflags = [
"-s"
"-w"
"-X github.com/cube2222/octosql/cmd.VERSION=${version}"
];
postInstall = ''
rm -v $out/bin/tester
'';
meta = with lib; {
description = "Commandline tool for joining, analyzing and transforming data from multiple databases and file formats using SQL";
homepage = "https://github.com/cube2222/octosql";
license = licenses.mpl20;
maintainers = with maintainers; [ arikgrahl ];
mainProgram = "octosql";
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "octosuite";
version = "3.1.1";
pyproject = true;
src = fetchFromGitHub {
owner = "bellingcat";
repo = "octosuite";
tag = version;
hash = "sha256-bgTAGIJbxOa8q8lMsWa8dHwNZ/jXiWGQOp921sd2Vdo=";
};
postPatch = ''
# pyreadline3 is Windows-only
substituteInPlace pyproject.toml \
--replace-fail '"pyreadline3",' ""
'';
build-system = with python3.pkgs; [
setuptools
setuptools-scm
];
dependencies = with python3.pkgs; [
psutil
requests
rich
];
pythonImportsCheck = [
"octosuite"
];
# Project has no tests
doCheck = false;
meta = {
description = "Advanced Github OSINT framework";
mainProgram = "octosuite";
homepage = "https://github.com/bellingcat/octosuite";
changelog = "https://github.com/bellingcat/octosuite/releases/tag/${version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,93 @@
{
lib,
rustPlatform,
fetchFromGitHub,
cmake,
pkg-config,
openssl,
fontconfig,
nasm,
libX11,
libXcursor,
libXrandr,
libXi,
libGL,
libxkbcommon,
wayland,
stdenv,
gtk3,
perl,
wrapGAppsHook3,
}:
rustPlatform.buildRustPackage rec {
pname = "oculante";
version = "0.9.2";
src = fetchFromGitHub {
owner = "woelper";
repo = "oculante";
rev = version;
hash = "sha256-3kDrsD24/TNcA7NkwwCHN4ez1bC5MP7g28H3jaO/M7E=";
};
cargoHash = "sha256-lksAPT1nuwN5bh3x7+EN4B8ksGtvemt4tbm6/3gqdgE=";
nativeBuildInputs = [
cmake
pkg-config
nasm
perl
wrapGAppsHook3
];
buildInputs = [
openssl
fontconfig
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libGL
libX11
libXcursor
libXi
libXrandr
gtk3
libxkbcommon
wayland
];
checkFlags = [
"--skip=bench"
"--skip=tests::net" # requires network access
"--skip=tests::flathub"
"--skip=thumbnails::test_thumbs" # broken as of v0.9.2
];
postInstall = ''
install -Dm444 $src/res/icons/icon.png $out/share/icons/hicolor/128x128/apps/oculante.png
install -Dm444 $src/res/oculante.desktop -t $out/share/applications
wrapProgram $out/bin/oculante \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath (
[
libGL
libxkbcommon
]
++ lib.optionals stdenv.hostPlatform.isLinux [ wayland ]
)
}
'';
meta = {
broken = stdenv.hostPlatform.isDarwin;
description = "Minimalistic crossplatform image viewer written in Rust";
homepage = "https://github.com/woelper/oculante";
changelog = "https://github.com/woelper/oculante/blob/${version}/CHANGELOG.md";
license = lib.licenses.mit;
mainProgram = "oculante";
maintainers = with lib.maintainers; [
dit7ya
figsoda
];
};
}