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,73 @@
{
lib,
stdenv,
dpkg,
fetchurl,
qt6,
libGL,
}:
let
rpath = "$ORIGIN:${
lib.makeLibraryPath [
stdenv.cc.cc
qt6.qtbase
libGL
]
}";
in
stdenv.mkDerivation rec {
pname = "oda-file-converter";
# To obtain the version you will need to run the following command:
#
# dpkg-deb -I ${odafileconverter.src} | grep Version
version = "26.7.0.0";
src = fetchurl {
# NB: this URL is not stable (i.e. the underlying file and the corresponding version will change over time)
url = "https://www.opendesign.com/guestfiles/get?filename=ODAFileConverter_QT6_lnxX64_8.3dll_26.7.deb";
hash = "sha256-MqST9Se66OJ+L0IKzuZkkFjCl3nb07gTO17j+lOWrHI=";
};
buildInputs = [
qt6.qtbase
];
nativeBuildInputs = [
dpkg
qt6.wrapQtAppsHook
];
installPhase = ''
mkdir -p $out/bin $out/lib
cp -vr usr/bin/ODAFileConverter_${version} $out/libexec
cp -vr usr/share $out/share
'';
dontWrapQtApps = true;
fixupPhase = ''
echo "setting interpreter"
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/libexec/ODAFileConverter
patchelf --set-rpath '${rpath}' $out/libexec/ODAFileConverter
wrapQtApp $out/libexec/ODAFileConverter
mv $out/libexec/ODAFileConverter $out/bin
find $out/libexec -not -path "*/doc/*" -not -path "*/translations/*" -type f -executable | while read file; do
echo "patching $file"
patchelf --set-rpath '${rpath}' $file
done
'';
meta = with lib; {
description = "For converting between different versions of .dwg and .dxf";
homepage = "https://www.opendesign.com/guestfiles/oda_file_converter";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [
nagisa
konradmalik
];
platforms = [ "x86_64-linux" ];
mainProgram = "ODAFileConverter";
};
}

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
fetchurl,
cmake,
pkg-config,
makeWrapper,
SDL,
SDL_mixer,
SDL_net,
wxGTK32,
}:
stdenv.mkDerivation rec {
pname = "odamex";
version = "0.9.5";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-src-${version}.tar.bz2";
sha256 = "sha256-WBqO5fWzemw1kYlY192v0nnZkbIEVuWmjWYMy+1ODPQ=";
};
nativeBuildInputs = [
cmake
pkg-config
makeWrapper
];
buildInputs = [
SDL
SDL_mixer
SDL_net
wxGTK32
];
installPhase = ''
runHook preInstall
''
+ (
if stdenv.hostPlatform.isDarwin then
''
mkdir -p $out/{Applications,bin}
mv odalaunch/odalaunch.app $out/Applications
makeWrapper $out/{Applications/odalaunch.app/Contents/MacOS,bin}/odalaunch
''
else
''
make install
''
)
+ ''
runHook postInstall
'';
meta = {
homepage = "http://odamex.net/";
description = "Client/server port for playing old-school Doom online";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.unix;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,72 @@
{
autoreconfHook,
dbus,
fetchpatch,
fetchurl,
lib,
libxml2,
nixosTests,
pam,
pkg-config,
stdenv,
systemd,
}:
stdenv.mkDerivation rec {
pname = "oddjob";
version = "0.34.7";
src = fetchurl {
url = "https://pagure.io/oddjob/archive/${pname}-${version}/oddjob-${pname}-${version}.tar.gz";
hash = "sha256-SUOsMH55HtEsk5rX0CXK0apDObTj738FGOaL5xZRnIM=";
};
patches = [
# Define SystemD service location using `with-systemdsystemunitdir` configure flag
(fetchpatch {
url = "https://pagure.io/oddjob/c/f63287a35107385dcb6e04a4c742077c9d1eab86.patch";
hash = "sha256-2mmw4pJhrIk4/47FM8zKH0dTQJWnntHPNmq8VAUWqJI=";
})
];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
dbus
libxml2
pam
systemd
];
configureFlags = [
"--prefix=${placeholder "out"}"
"--sysconfdir=${placeholder "out"}/etc"
"--with-selinux-acls=no"
"--with-selinux-labels=no"
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
];
postConfigure = ''
substituteInPlace src/oddjobd.c \
--replace "globals.selinux_enabled" "FALSE"
'';
# Requires a dbus-daemon environment
doCheck = false;
passthru.tests = {
inherit (nixosTests) oddjobd;
};
meta = {
changelog = "https://pagure.io/oddjob/blob/oddjob-${version}/f/ChangeLog";
description = "Odd Job Daemon";
homepage = "https://pagure.io/oddjob";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ SohamG ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,5 @@
{
python3Packages,
}:
python3Packages.toPythonApplication python3Packages.oddsprout

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ode";
version = "0.16.6";
src = fetchurl {
url = "https://bitbucket.org/odedevs/ode/downloads/ode-${finalAttrs.version}.tar.gz";
hash = "sha256-yRooxv8mUChHhKeccmo4DWr+yH7PejXDKmvgxbdFE+g=";
};
env.CXXFLAGS = lib.optionalString stdenv.cc.isClang (toString [
"-std=c++14"
"-Wno-error=c++11-narrowing"
]);
meta = with lib; {
description = "Open Dynamics Engine";
mainProgram = "ode-config";
homepage = "https://www.ode.org";
license = with licenses; [
bsd3
lgpl21Only
lgpl3Only
zlib
];
maintainers = with maintainers; [ wegank ];
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchgit,
cmake,
unstableGitUpdater,
}:
stdenv.mkDerivation {
pname = "odhcp6c";
version = "0-unstable-2025-02-06";
src = fetchgit {
url = "https://git.openwrt.org/project/odhcp6c.git";
rev = "8aa8b706727a6a6a841be42ef35a629ed635db3e";
hash = "sha256-cFDiT8EC8/2yuLM6dTWTzwxSbFpc7zuUKx2SHbR4PfQ=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DCMAKE_INSTALL_PREFIX=$out"
];
passthru.updateScript = unstableGitUpdater { };
meta = {
description = "Embedded DHCPv6-client for OpenWrt";
homepage = "https://openwrt.org/packages/pkgdata/odhcp6c";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ felbinger ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,23 @@
diff --git a/src/linker.cpp b/src/linker.cpp
index 2210c13..803b654 100644
--- a/src/linker.cpp
+++ b/src/linker.cpp
@@ -779,18 +779,6 @@ try_cross_linking:;
}
platform_lib_str = gb_string_append_fmt(platform_lib_str, "--sysroot %s ", darwin_sdk_path);
- platform_lib_str = gb_string_appendc(platform_lib_str, "-L/usr/local/lib ");
-
- // Homebrew's default library path, checking if it exists to avoid linking warnings.
- if (gb_file_exists("/opt/homebrew/lib")) {
- platform_lib_str = gb_string_appendc(platform_lib_str, "-L/opt/homebrew/lib ");
- }
-
- // MacPort's default library path, checking if it exists to avoid linking warnings.
- if (gb_file_exists("/opt/local/lib")) {
- platform_lib_str = gb_string_appendc(platform_lib_str, "-L/opt/local/lib ");
- }
-
// Only specify this flag if the user has given a minimum version to target.
// This will cause warnings to show up for mismatched libraries.
if (build_context.minimum_os_version_string_given) {

View File

@@ -0,0 +1,103 @@
{
lib,
llvmPackages,
fetchFromGitHub,
makeBinaryWrapper,
which,
nix-update-script,
}:
let
inherit (llvmPackages) stdenv;
in
stdenv.mkDerivation (finalAttrs: {
pname = "odin";
version = "dev-2025-09";
src = fetchFromGitHub {
owner = "odin-lang";
repo = "Odin";
tag = finalAttrs.version;
hash = "sha256-PxegNMEzxytZtmhmzDgb1Umzx/9aUIlc9SDojRlZfsE=";
};
patches = [
./darwin-remove-impure-links.patch
# The default behavior is to use the statically linked Raylib libraries,
# but GLFW still attempts to load Xlib at runtime, which won't normally be
# available on Nix based systems. Instead, use the "system" Raylib version,
# which can be provided by a pure Nix expression, for example in a shell.
./system-raylib.patch
];
postPatch = ''
# Odin is still using 'arm64-apple-macos' as the target name on
# aarch64-darwin architectures. This results in a warning whenever the
# Odin compiler runs a build. Replacing the target in the Odin compiler
# removes the nix warning when the Odin compiler is ran on aarch64-darwin.
substituteInPlace src/build_settings.cpp \
--replace-fail "arm64-apple-macosx" "arm64-apple-darwin"
rm -r vendor/raylib/{linux,macos,macos-arm64,wasm,windows}
patchShebangs --build build_odin.sh
'';
LLVM_CONFIG = lib.getExe' llvmPackages.llvm.dev "llvm-config";
dontConfigure = true;
buildFlags = [ "release" ];
nativeBuildInputs = [
makeBinaryWrapper
which
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp odin $out/bin/odin
mkdir -p $out/share
cp -r {base,core,vendor,shared} $out/share
wrapProgram $out/bin/odin \
--prefix PATH : ${
lib.makeBinPath (
with llvmPackages;
[
bintools
llvm
clang
lld
]
)
} \
--set-default ODIN_ROOT $out/share
make -C "$out/share/vendor/cgltf/src/"
make -C "$out/share/vendor/stb/src/"
make -C "$out/share/vendor/miniaudio/src/"
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Fast, concise, readable, pragmatic and open sourced programming language";
downloadPage = "https://github.com/odin-lang/Odin";
homepage = "https://odin-lang.org/";
changelog = "https://github.com/odin-lang/Odin/releases/tag/${finalAttrs.version}";
license = lib.licenses.bsd3;
mainProgram = "odin";
maintainers = with lib.maintainers; [
astavie
diniamo
];
platforms = lib.platforms.unix;
broken = stdenv.hostPlatform.isMusl;
};
})

View File

@@ -0,0 +1,141 @@
diff --git a/vendor/raylib/raygui.odin b/vendor/raylib/raygui.odin
index 559437a60..cd31fbe43 100644
--- a/vendor/raylib/raygui.odin
+++ b/vendor/raylib/raygui.odin
@@ -2,34 +2,7 @@ package raylib
import "core:c"
-RAYGUI_SHARED :: #config(RAYGUI_SHARED, false)
-RAYGUI_WASM_LIB :: #config(RAYGUI_WASM_LIB, "wasm/libraygui.a")
-
-when ODIN_OS == .Windows {
- foreign import lib {
- "windows/rayguidll.lib" when RAYGUI_SHARED else "windows/raygui.lib",
- }
-} else when ODIN_OS == .Linux {
- foreign import lib {
- "linux/libraygui.so" when RAYGUI_SHARED else "linux/libraygui.a",
- }
-} else when ODIN_OS == .Darwin {
- when ODIN_ARCH == .arm64 {
- foreign import lib {
- "macos-arm64/libraygui.dylib" when RAYGUI_SHARED else "macos-arm64/libraygui.a",
- }
- } else {
- foreign import lib {
- "macos/libraygui.dylib" when RAYGUI_SHARED else "macos/libraygui.a",
- }
- }
-} else when ODIN_ARCH == .wasm32 || ODIN_ARCH == .wasm64p32 {
- foreign import lib {
- RAYGUI_WASM_LIB,
- }
-} else {
- foreign import lib "system:raygui"
-}
+foreign import lib "system:raygui"
RAYGUI_VERSION :: "4.0"
diff --git a/vendor/raylib/raylib.odin b/vendor/raylib/raylib.odin
index 02bb6deea..0df93009b 100644
--- a/vendor/raylib/raylib.odin
+++ b/vendor/raylib/raylib.odin
@@ -99,42 +99,7 @@ MAX_TEXT_BUFFER_LENGTH :: #config(RAYLIB_MAX_TEXT_BUFFER_LENGTH, 1024)
#assert(size_of(rune) == size_of(c.int))
-RAYLIB_SHARED :: #config(RAYLIB_SHARED, false)
-RAYLIB_WASM_LIB :: #config(RAYLIB_WASM_LIB, "wasm/libraylib.a")
-
-when ODIN_OS == .Windows {
- @(extra_linker_flags="/NODEFAULTLIB:" + ("msvcrt" when RAYLIB_SHARED else "libcmt"))
- foreign import lib {
- "windows/raylibdll.lib" when RAYLIB_SHARED else "windows/raylib.lib" ,
- "system:Winmm.lib",
- "system:Gdi32.lib",
- "system:User32.lib",
- "system:Shell32.lib",
- }
-} else when ODIN_OS == .Linux {
- foreign import lib {
- // Note(bumbread): I'm not sure why in `linux/` folder there are
- // multiple copies of raylib.so, but since these bindings are for
- // particular version of the library, I better specify it. Ideally,
- // though, it's best specified in terms of major (.so.4)
- "linux/libraylib.so.550" when RAYLIB_SHARED else "linux/libraylib.a",
- "system:dl",
- "system:pthread",
- }
-} else when ODIN_OS == .Darwin {
- foreign import lib {
- "macos/libraylib.550.dylib" when RAYLIB_SHARED else "macos/libraylib.a",
- "system:Cocoa.framework",
- "system:OpenGL.framework",
- "system:IOKit.framework",
- }
-} else when ODIN_ARCH == .wasm32 || ODIN_ARCH == .wasm64p32 {
- foreign import lib {
- RAYLIB_WASM_LIB,
- }
-} else {
- foreign import lib "system:raylib"
-}
+foreign import lib "system:raylib"
VERSION_MAJOR :: 5
VERSION_MINOR :: 5
diff --git a/vendor/raylib/rlgl/rlgl.odin b/vendor/raylib/rlgl/rlgl.odin
index 6ac19695d..78a483a59 100644
--- a/vendor/raylib/rlgl/rlgl.odin
+++ b/vendor/raylib/rlgl/rlgl.odin
@@ -112,47 +112,12 @@ import rl "../."
VERSION :: "5.0"
-RAYLIB_SHARED :: #config(RAYLIB_SHARED, false)
-RAYLIB_WASM_LIB :: #config(RAYLIB_WASM_LIB, "../wasm/libraylib.a")
-
// Note: We pull in the full raylib library. If you want a truly stand-alone rlgl, then:
// - Compile a separate rlgl library and use that in the foreign import blocks below.
// - Remove the `import rl "../."` line
// - Copy the code from raylib.odin for any types we alias from that package (see PixelFormat etc)
-when ODIN_OS == .Windows {
- @(extra_linker_flags="/NODEFAULTLIB:" + ("msvcrt" when RAYLIB_SHARED else "libcmt"))
- foreign import lib {
- "../windows/raylibdll.lib" when RAYLIB_SHARED else "../windows/raylib.lib" ,
- "system:Winmm.lib",
- "system:Gdi32.lib",
- "system:User32.lib",
- "system:Shell32.lib",
- }
-} else when ODIN_OS == .Linux {
- foreign import lib {
- // Note(bumbread): I'm not sure why in `linux/` folder there are
- // multiple copies of raylib.so, but since these bindings are for
- // particular version of the library, I better specify it. Ideally,
- // though, it's best specified in terms of major (.so.4)
- "../linux/libraylib.so.550" when RAYLIB_SHARED else "../linux/libraylib.a",
- "system:dl",
- "system:pthread",
- }
-} else when ODIN_OS == .Darwin {
- foreign import lib {
- "../macos/libraylib.550.dylib" when RAYLIB_SHARED else "../macos/libraylib.a",
- "system:Cocoa.framework",
- "system:OpenGL.framework",
- "system:IOKit.framework",
- }
-} else when ODIN_ARCH == .wasm32 || ODIN_ARCH == .wasm64p32 {
- foreign import lib {
- RAYLIB_WASM_LIB,
- }
-} else {
- foreign import lib "system:raylib"
-}
+foreign import lib "system:raylib"
GRAPHICS_API_OPENGL_11 :: false
GRAPHICS_API_OPENGL_21 :: true

View File

@@ -0,0 +1,116 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
pkg-config,
alsa-lib,
freetype,
libjack2,
lv2,
libX11,
libXcursor,
libXext,
libXinerama,
libXrandr,
libGL,
gcc-unwrapped,
copyDesktopItems,
makeDesktopItem,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "odin2";
version = "2.4.1";
src = fetchFromGitHub {
owner = "TheWaveWarden";
repo = "odin2";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-j/rZvBNBTDo2vwESXbGIXR89PHOI1HK8hvzV7y6dJHI=";
};
nativeBuildInputs = [
cmake
pkg-config
copyDesktopItems
];
buildInputs = [
alsa-lib
freetype
libjack2
lv2
libX11
libXcursor
libXext
libXinerama
libXrandr
libGL
];
# JUCE dlopen's these at runtime, crashes without them
NIX_LDFLAGS = (
toString [
"-lX11"
"-lXext"
"-lXcursor"
"-lXinerama"
"-lXrandr"
]
);
# JUCE wants to write to $HOME/.{lv2,vst3}
preConfigure = ''
export HOME="$TMPDIR"
'';
cmakeFlags = [
"-DCMAKE_AR=${gcc-unwrapped}/bin/gcc-ar"
"-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib"
"-DCMAKE_NM=${gcc-unwrapped}/bin/gcc-nm"
];
installPhase = ''
mkdir -p $out/bin $out/lib/vst3 $out/lib/lv2 $out/lib/clap $out/share/icons/hicolor/512x512/apps
cd Odin2_artefacts/Release
cp Standalone/Odin2 $out/bin
cp -r VST3/Odin2.vst3 $out/lib/vst3
cp -r LV2/Odin2.lv2 $out/lib/lv2
cp -r CLAP/Odin2.clap $out/lib/clap
# Theres no application icon, so the vendors logo will have to do.
cp $src/manual/graphics/logo.png $out/share/icons/hicolor/512x512/apps/odin2.png
copyDesktopItems
'';
desktopItems = [
(makeDesktopItem {
name = "Odin2";
desktopName = "Odin 2";
comment = "Odin 2 Free Synthesizer";
icon = "odin2";
startupNotify = true;
categories = [
"AudioVideo"
"Audio"
"Midi"
"Music"
];
dbusActivatable = false;
exec = "Odin2";
})
];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Odin 2 Synthesizer Plugin";
homepage = "https://thewavewarden.com/odin2";
license = licenses.gpl3;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ magnetophon ];
mainProgram = "Odin2";
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
odo,
}:
buildGoModule rec {
pname = "odo";
version = "3.16.1";
src = fetchFromGitHub {
owner = "redhat-developer";
repo = "odo";
rev = "v${version}";
sha256 = "sha256-zEN8yfjW3JHf6OzPQC6Rg2/hJ+3d9d2nYhz60BdSK9s=";
};
vendorHash = null;
buildPhase = ''
make bin
'';
installPhase = ''
mkdir -p $out/bin
cp -a odo $out/bin
'';
passthru.tests.version = testers.testVersion {
package = odo;
command = "odo version";
version = "v${version}";
};
meta = {
description = "Developer-focused CLI for OpenShift and Kubernetes";
mainProgram = "odo";
license = lib.licenses.asl20;
homepage = "https://odo.dev";
changelog = "https://github.com/redhat-developer/odo/releases/v${version}";
maintainers = with lib.maintainers; [ stehessel ];
};
}

View File

@@ -0,0 +1,109 @@
{
lib,
fetchzip,
python312,
rtlcss,
wkhtmltopdf,
nixosTests,
}:
let
odoo_version = "18.0";
odoo_release = "20250506";
python = python312.override {
self = python;
};
in
python.pkgs.buildPythonApplication rec {
pname = "odoo";
version = "${odoo_version}.${odoo_release}";
format = "setuptools";
src = fetchzip {
# find latest version on https://nightly.odoo.com/${odoo_version}/nightly/src
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip";
name = "odoo-${version}";
hash = "sha256-rNG0He+51DnRT5g1SovGZ9uiE1HWXtcmAybcadBMjY4="; # odoo
};
makeWrapperArgs = [
"--prefix"
"PATH"
":"
"${lib.makeBinPath [
wkhtmltopdf
rtlcss
]}"
];
propagatedBuildInputs = with python.pkgs; [
babel
chardet
cryptography
decorator
docutils
distutils
ebaysdk
freezegun
geoip2
gevent
greenlet
idna
jinja2
libsass
lxml
lxml-html-clean
markupsafe
num2words
ofxparse
passlib
pillow
polib
psutil
psycopg2
pydot
pyopenssl
pypdf2
pyserial
python-dateutil
python-ldap
python-stdnum
pytz
pyusb
qrcode
reportlab
requests
rjsmin
urllib3
vobject
werkzeug
xlrd
xlsxwriter
xlwt
zeep
setuptools
mock
];
# takes 5+ minutes and there are not files to strip
dontStrip = true;
passthru = {
updateScript = ./update.sh;
tests = {
inherit (nixosTests) odoo;
};
};
meta = {
description = "Open Source ERP and CRM";
homepage = "https://www.odoo.com/";
license = lib.licenses.lgpl3Only;
maintainers = with lib.maintainers; [
mkg20001
siriobalmelli
];
};
}

32
pkgs/by-name/od/odoo/update.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused nix coreutils nix-prefetch
# shellcheck shell=bash
set -euo pipefail
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
PKG=$(basename "$SCRIPT_DIR")
LATEST="18" # increment manually
VERSION="${PKG/#odoo}"
VERSION="${VERSION:-$LATEST}.0"
RELEASE="$(
curl "https://nightly.odoo.com/$VERSION/nightly/src/" |
sed -nE 's/.*odoo_'"$VERSION"'.(20[0-9]{6}).tar.gz.*/\1/p' |
tail -n 1
)"
latestVersion="$VERSION.$RELEASE"
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; $PKG.version or (lib.getVersion $PKG)" | tr -d '"')
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "$PKG is up-to-date: $currentVersion"
exit 0
fi
cd "$SCRIPT_DIR"
sed -ri "s| hash.+ # odoo| hash = \"$(nix-prefetch -q fetchzip --option extra-experimental-features flakes --url "https://nightly.odoo.com/${VERSION}/nightly/src/odoo_${latestVersion}.zip")\"; # odoo|g" package.nix
sed -ri "s|odoo_version = .+|odoo_version = \"$VERSION\";|" package.nix
sed -ri "s|odoo_release = .+|odoo_release = \"$RELEASE\";|" package.nix

View File

@@ -0,0 +1,22 @@
diff --git a/odoo/http.py b/odoo/http.py
index f26dd52db235c..9689fc894b2b1 100644
--- a/odoo/http.py
+++ b/odoo/http.py
@@ -117,6 +117,7 @@
import glob
import hashlib
import hmac
+import importlib.metadata
import inspect
import json
import logging
@@ -256,7 +257,7 @@ def get_default_session():
'alias', 'host', 'methods',
}
-if parse_version(werkzeug.__version__) >= parse_version('2.0.2'):
+if parse_version(importlib.metadata.version('werkzeug')) >= parse_version('2.0.2'):
# Werkzeug 2.0.2 adds the websocket option. If a websocket request
# (ws/wss) is trying to access an HTTP route, a WebsocketMismatch
# exception is raised. On the other hand, Werkzeug 0.16 does not

View File

@@ -0,0 +1,105 @@
{
lib,
fetchzip,
python311,
rtlcss,
wkhtmltopdf,
nixosTests,
}:
let
odoo_version = "16.0";
odoo_release = "20250506";
python = python311.override {
self = python;
};
in
python.pkgs.buildPythonApplication rec {
pname = "odoo";
version = "${odoo_version}.${odoo_release}";
format = "setuptools";
# latest release is at https://github.com/odoo/docker/blob/master/16.0/Dockerfile
src = fetchzip {
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip";
name = "odoo-${version}";
hash = "sha256-dBqRZ3cf4/udP9hm+u9zhuUCkH176uG2NPAy5sujyNc="; # odoo
};
patches = [ ./fix-test.patch ];
makeWrapperArgs = [
"--prefix"
"PATH"
":"
"${lib.makeBinPath [
wkhtmltopdf
rtlcss
]}"
];
propagatedBuildInputs = with python.pkgs; [
babel
chardet
cryptography
decorator
docutils
ebaysdk
freezegun
gevent
greenlet
idna
jinja2
libsass
lxml
lxml-html-clean
markupsafe
num2words
ofxparse
passlib
pillow
polib
psutil
psycopg2
pydot
pyopenssl
pypdf2
pyserial
python-dateutil
python-ldap
python-stdnum
pytz
pyusb
qrcode
reportlab
requests
urllib3
vobject
werkzeug
xlrd
xlsxwriter
xlwt
zeep
setuptools
mock
];
# takes 5+ minutes and there are not files to strip
dontStrip = true;
passthru = {
updateScript = ./update.sh;
tests = {
inherit (nixosTests) odoo16;
};
};
meta = {
description = "Open Source ERP and CRM";
homepage = "https://www.odoo.com/";
license = lib.licenses.lgpl3Only;
maintainers = with lib.maintainers; [ mkg20001 ];
};
}

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused nix coreutils nix-prefetch
# shellcheck shell=bash
set -euo pipefail
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
PKG=$(basename "$SCRIPT_DIR")
LATEST="18" # increment manually
VERSION="${PKG/#odoo}"
VERSION="${VERSION:-$LATEST}.0"
RELEASE="$(
curl "https://nightly.odoo.com/$VERSION/nightly/src/" |
sed -nE 's/.*odoo_'"$VERSION"'.(20[0-9]{6}).tar.gz.*/\1/p' |
tail -n 1
)"
latestVersion="$VERSION.$RELEASE"
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; $PKG.version or (lib.getVersion $PKG)" | tr -d '"')
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "$PKG is up-to-date: $currentVersion"
exit 0
fi
cd "$SCRIPT_DIR"
sed -ri "s| hash.+ # odoo| hash = \"$(nix-prefetch -q fetchzip --option extra-experimental-features flakes --url "https://nightly.odoo.com/${VERSION}/nightly/src/odoo_${latestVersion}.zip")\"; # odoo|g" package.nix
sed -ri "s|odoo_version = .+|odoo_version = \"$VERSION\";|" package.nix
sed -ri "s|odoo_release = .+|odoo_release = \"$RELEASE\";|" package.nix

View File

@@ -0,0 +1,128 @@
{
lib,
fetchgit,
fetchzip,
fetchpatch2,
python311,
rtlcss,
wkhtmltopdf,
nixosTests,
}:
let
odoo_version = "17.0";
odoo_release = "20250506";
python = python311.override {
self = python;
packageOverrides = final: prev: {
# requirements.txt fixes docutils at 0.17; the default 0.21.1 tested throws exceptions
docutils-0_17 = prev.docutils.overridePythonAttrs (old: rec {
version = "0.17";
src = fetchgit {
url = "git://repo.or.cz/docutils.git";
rev = "docutils-${version}";
hash = "sha256-O/9q/Dg1DBIxKdNBOhDV16yy5ez0QANJYMjeovDoWX8=";
};
buildInputs = with prev; [ setuptools ];
});
};
};
in
python.pkgs.buildPythonApplication rec {
pname = "odoo";
version = "${odoo_version}.${odoo_release}";
format = "setuptools";
# latest release is at https://github.com/odoo/docker/blob/master/17.0/Dockerfile
src = fetchzip {
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip";
name = "odoo-${version}";
hash = "sha256-V15Oe3AOBJ1agt5WmpFZnC7EkyoKyxTH8Iqdf2/9aec="; # odoo
};
patches = [
(fetchpatch2 {
url = "https://github.com/odoo/odoo/commit/ade3200e8138a9c28eb9b294a4efd2753a8e5591.patch?full_index=1";
hash = "sha256-EFKjrR38eg9bxlNmRNoLSXem+MjQKqPcR3/mSgs0cDs=";
})
];
makeWrapperArgs = [
"--prefix"
"PATH"
":"
"${lib.makeBinPath [
wkhtmltopdf
rtlcss
]}"
];
propagatedBuildInputs = with python.pkgs; [
babel
chardet
cryptography
decorator
docutils-0_17 # sphinx has a docutils requirement >= 18
ebaysdk
freezegun
geoip2
gevent
greenlet
idna
jinja2
libsass
lxml
lxml-html-clean
markupsafe
num2words
ofxparse
passlib
pillow
polib
psutil
psycopg2
pydot
pyopenssl
pypdf2
pyserial
python-dateutil
python-ldap
python-stdnum
pytz
pyusb
qrcode
reportlab
requests
rjsmin
urllib3
vobject
werkzeug
xlrd
xlsxwriter
xlwt
zeep
setuptools
mock
];
# takes 5+ minutes and there are not files to strip
dontStrip = true;
passthru = {
updateScript = ./update.sh;
tests = {
inherit (nixosTests) odoo17;
};
};
meta = {
description = "Open Source ERP and CRM";
homepage = "https://www.odoo.com/";
license = lib.licenses.lgpl3Only;
maintainers = with lib.maintainers; [
mkg20001
siriobalmelli
];
};
}

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused nix coreutils nix-prefetch
# shellcheck shell=bash
set -euo pipefail
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
PKG=$(basename "$SCRIPT_DIR")
LATEST="18" # increment manually
VERSION="${PKG/#odoo}"
VERSION="${VERSION:-$LATEST}.0"
RELEASE="$(
curl "https://nightly.odoo.com/$VERSION/nightly/src/" |
sed -nE 's/.*odoo_'"$VERSION"'.(20[0-9]{6}).tar.gz.*/\1/p' |
tail -n 1
)"
latestVersion="$VERSION.$RELEASE"
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; $PKG.version or (lib.getVersion $PKG)" | tr -d '"')
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "$PKG is up-to-date: $currentVersion"
exit 0
fi
cd "$SCRIPT_DIR"
sed -ri "s| hash.+ # odoo| hash = \"$(nix-prefetch -q fetchzip --option extra-experimental-features flakes --url "https://nightly.odoo.com/${VERSION}/nightly/src/odoo_${latestVersion}.zip")\"; # odoo|g" package.nix
sed -ri "s|odoo_version = .+|odoo_version = \"$VERSION\";|" package.nix
sed -ri "s|odoo_release = .+|odoo_release = \"$RELEASE\";|" package.nix

View File

@@ -0,0 +1,46 @@
diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h
index deb1fd43f2..0f63ebe1d5 100644
--- a/lib/eal/include/rte_bitops.h
+++ b/lib/eal/include/rte_bitops.h
@@ -525,10 +525,12 @@ __rte_bit_ ## variant ## flip ## size(qualifier uint ## size ## _t *addr, unsign
__RTE_GEN_BIT_OPS(,, size) \
__RTE_GEN_BIT_OPS(v_, volatile, size)
+#ifndef __cplusplus
#ifdef ALLOW_EXPERIMENTAL_API
__RTE_GEN_BIT_OPS_SIZE(32)
__RTE_GEN_BIT_OPS_SIZE(64)
#endif
+#endif
#define __RTE_GEN_BIT_ATOMIC_TEST(variant, qualifier, size) \
__rte_experimental \
@@ -653,10 +655,12 @@ __rte_bit_atomic_ ## variant ## test_and_assign ## size( \
__RTE_GEN_BIT_ATOMIC_OPS(,, size) \
__RTE_GEN_BIT_ATOMIC_OPS(v_, volatile, size)
+#ifndef __cplusplus
#ifdef ALLOW_EXPERIMENTAL_API
__RTE_GEN_BIT_ATOMIC_OPS_SIZE(32)
__RTE_GEN_BIT_ATOMIC_OPS_SIZE(64)
#endif
+#endif
/*------------------------ 32-bit relaxed operations ------------------------*/
@@ -1485,6 +1489,7 @@ rte_bit_ ## family ## fun(qualifier uint ## size ## _t *addr, arg1_type arg1_nam
__RTE_BIT_OVERLOAD_SZ_4R(family, fun, qualifier, 64, ret_type, arg1_type, arg1_name, \
arg2_type, arg2_name, arg3_type, arg3_name)
+#ifndef __cplusplus
#ifdef ALLOW_EXPERIMENTAL_API
__RTE_BIT_OVERLOAD_2R(, test, const, bool, unsigned int, nr)
__RTE_BIT_OVERLOAD_2(, set,, unsigned int, nr)
@@ -1502,6 +1507,7 @@ __RTE_BIT_OVERLOAD_3R(atomic_, test_and_clear,, bool, unsigned int, nr, int, mem
__RTE_BIT_OVERLOAD_4R(atomic_, test_and_assign,, bool, unsigned int, nr, bool, value,
int, memory_order)
#endif
+#endif
#endif

View File

@@ -0,0 +1,50 @@
diff --git a/platform/linux-dpdk/odp_packet_dpdk.c b/platform/linux-dpdk/odp_packet_dpdk.c
index cd95ba0f9..7e8b7e3f1 100644
--- a/platform/linux-dpdk/odp_packet_dpdk.c
+++ b/platform/linux-dpdk/odp_packet_dpdk.c
@@ -372,13 +372,18 @@ static void prepare_rss_conf(pktio_entry_t *pktio_entry,
uint64_t rss_hf_capa;
pkt_dpdk_t *pkt_dpdk = pkt_priv(pktio_entry);
uint16_t port_id = pkt_dpdk->port_id;
+ int ret;
memset(&pkt_dpdk->rss_conf, 0, sizeof(struct rte_eth_rss_conf));
if (!p->hash_enable)
return;
- rte_eth_dev_info_get(port_id, &dev_info);
+ ret = rte_eth_dev_info_get(port_id, &dev_info);
+ if (ret) {
+ _ODP_ERR("Failed to read device info: %d\n", ret);
+ return;
+ }
rss_hf_capa = dev_info.flow_type_rss_offloads;
/* Print debug info about unsupported hash protocols */
@@ -842,7 +847,11 @@ static int dpdk_start(pktio_entry_t *pktio_entry)
pktio_entry->state == PKTIO_STATE_STOP_PENDING)
rte_eth_dev_stop(pkt_dpdk->port_id);
- rte_eth_dev_info_get(port_id, &dev_info);
+ ret = rte_eth_dev_info_get(port_id, &dev_info);
+ if (ret) {
+ _ODP_ERR("Failed to read device info: %d\n", ret);
+ return -1;
+ }
/* Pcap driver reconfiguration may fail if number of rx/tx queues is set to zero */
if (!strncmp(dev_info.driver_name, PCAP_DRV_NAME, strlen(PCAP_DRV_NAME))) {
@@ -1258,7 +1267,11 @@ static uint32_t _dpdk_vdev_mtu(uint16_t port_id)
int ret;
int sockfd;
- rte_eth_dev_info_get(port_id, &dev_info);
+ ret = rte_eth_dev_info_get(port_id, &dev_info);
+ if (ret) {
+ _ODP_ERR("Failed to read device info: %d\n", ret);
+ return 0;
+ }
if_indextoname(dev_info.if_index, ifr.ifr_name);
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
ret = ioctl(sockfd, SIOCGIFMTU, &ifr);

View File

@@ -0,0 +1,72 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
dpdk,
libbpf,
libconfig,
libpcap,
numactl,
openssl,
zlib,
zstd,
libbsd,
elfutils,
jansson,
libnl,
}:
stdenv.mkDerivation rec {
pname = "odp-dpdk";
version = "1.46.0.0_DPDK_22.11";
src = fetchFromGitHub {
owner = "OpenDataPlane";
repo = "odp-dpdk";
rev = "v${version}";
hash = "sha256-9stWGupRSQwUXOdPEQ9Rhkim22p5BBA5Z+2JCYS7Za0=";
};
patches = [
./odp-dpdk_25.03.patch
];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
(dpdk.overrideAttrs {
patches = [
./dpdk_25.03.patch
];
})
libconfig
libpcap
numactl
openssl
zlib
zstd
libbsd
elfutils
jansson
libbpf
libnl
];
# binaries will segfault otherwise
dontStrip = true;
enableParallelBuilding = true;
meta = with lib; {
description = "Open Data Plane optimized for DPDK";
homepage = "https://www.opendataplane.org";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = [ maintainers.abuibrahim ];
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitHub,
fixDarwinDylibNames,
oracle-instantclient,
libaio,
}:
let
version = "5.6.2";
libPath = lib.makeLibraryPath [ oracle-instantclient.lib ];
in
stdenv.mkDerivation {
inherit version;
pname = "odpic";
src = fetchFromGitHub {
owner = "oracle";
repo = "odpi";
rev = "v${version}";
sha256 = "sha256-UBLv7iTqwjxDuLc09zxACYQxoU3/AKNPfNOwgMJ2qjw=";
};
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ oracle-instantclient ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libaio ];
dontPatchELF = true;
makeFlags = [
"PREFIX=$(out)"
"CC=${stdenv.cc.targetPrefix}cc"
"LD=${stdenv.cc.targetPrefix}cc"
];
postFixup = ''
${lib.optionalString (stdenv.hostPlatform.isLinux) ''
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary})" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}
''}
${lib.optionalString (stdenv.hostPlatform.isDarwin) ''
install_name_tool -add_rpath "${libPath}" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}
''}
'';
meta = with lib; {
description = "Oracle ODPI-C library";
homepage = "https://oracle.github.io/odpi/";
license = licenses.asl20;
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
];
hydraPlatforms = [ ];
};
}

View File

@@ -0,0 +1,42 @@
{
stdenv,
lib,
fetchFromGitHub,
coreutils,
ubootOdroidXU3,
runtimeShell,
}:
stdenv.mkDerivation {
pname = "odroid-xu3-bootloader";
version = "unstable-2015-12-04";
src = fetchFromGitHub {
owner = "hardkernel";
repo = "u-boot";
rev = "fe2f831fd44a4071f58a42f260164544697aa666";
sha256 = "1h5yvawzla0vqhkk98gxcwc824bhc936bh6j77qkyspvqcw761fr";
};
buildCommand = ''
install -Dm644 -t $out/lib/sd_fuse-xu3 $src/sd_fuse/hardkernel_1mb_uboot/{bl2,tzsw}.*
install -Dm644 -t $out/lib/sd_fuse-xu3 $src/sd_fuse/hardkernel/bl1.*
ln -sf ${ubootOdroidXU3}/u-boot-dtb.bin $out/lib/sd_fuse-xu3/u-boot-dtb.bin
install -Dm755 $src/sd_fuse/hardkernel_1mb_uboot/sd_fusing.1M.sh $out/bin/sd_fuse-xu3
sed -i \
-e '1i#!${runtimeShell}' \
-e '1iPATH=${lib.makeBinPath [ coreutils ]}:$PATH' \
-e '/set -x/d' \
-e 's,.\/sd_fusing\.sh,sd_fuse-xu3,g' \
-e "s,\./,$out/lib/sd_fuse-xu3/,g" \
$out/bin/sd_fuse-xu3
'';
meta = with lib; {
platforms = platforms.linux;
license = licenses.unfreeRedistributableFirmware;
description = "Secure boot enabled boot loader for ODROID-XU{3,4}";
maintainers = [ ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchurl,
zlib,
libiconv,
}:
stdenv.mkDerivation rec {
pname = "odt2txt";
version = "0.5";
src = fetchurl {
url = "${meta.homepage}/archive/v${version}.tar.gz";
sha256 = "23a889109ca9087a719c638758f14cc3b867a5dcf30a6c90bf6a0985073556dd";
};
configurePhase = "export makeFlags=\"DESTDIR=$out\"";
buildInputs = [
zlib
libiconv
];
meta = {
description = "Simple .odt to .txt converter";
mainProgram = "odt2txt";
homepage = "https://github.com/dstosberg/odt2txt";
platforms = lib.platforms.all;
license = lib.licenses.gpl2Only;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,12 @@
diff --git a/third_party/kiwi/kiwi.h b/third_party/kiwi/kiwi.h
index d3bf4113..a8a2ad6e 100644
--- a/third_party/kiwi/kiwi.h
+++ b/third_party/kiwi/kiwi.h
@@ -15,6 +15,7 @@
#include <string.h>
#include <pthread.h>
#include <assert.h>
+#include <ctype.h>
#include <machinarium.h>
#include "kiwi/macro.h"

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
openssl,
libpq,
zstd,
fetchpatch,
}:
stdenv.mkDerivation rec {
pname = "odyssey";
version = "1.3";
src = fetchFromGitHub {
owner = "yandex";
repo = "odyssey";
rev = version;
sha256 = "sha256-1ALTKRjpKmmFcAuhmgpcbJBkNuUlTyau8xWDRHh7gf0=";
};
patches = [
# Fix compression build. Remove with the next release. https://github.com/yandex/odyssey/pull/441
(fetchpatch {
url = "https://github.com/yandex/odyssey/commit/01ca5b345c4483add7425785c9c33dfa2c135d63.patch";
sha256 = "sha256-8UPkZkiI08ZZL6GShhug/5/kOVrmdqYlsD1bcqfxg/w=";
})
# Fixes kiwi build.
./fix-missing-c-header.patch
];
nativeBuildInputs = [ cmake ];
buildInputs = [
openssl
libpq
zstd
];
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-int -Wno-error=incompatible-pointer-types";
cmakeFlags = [
"-DBUILD_COMPRESSION=ON"
"-DPOSTGRESQL_INCLUDE_DIR=${lib.getDev libpq}/include/postgresql/server"
"-DPOSTGRESQL_LIBRARY=${libpq}/lib"
"-DPOSTGRESQL_LIBPGPORT=${lib.getDev libpq}/lib"
];
installPhase = ''
install -Dm755 -t $out/bin sources/odyssey
'';
meta = with lib; {
description = "Scalable PostgreSQL connection pooler";
homepage = "https://github.com/yandex/odyssey";
license = licenses.bsd3;
maintainers = [ ];
platforms = [ "x86_64-linux" ];
mainProgram = "odyssey";
};
}