Merge master into staging-nixos

This commit is contained in:
nixpkgs-ci[bot]
2025-10-16 18:07:07 +00:00
committed by GitHub
89 changed files with 2280 additions and 662 deletions
+2 -11
View File
@@ -11,9 +11,6 @@ on:
systems:
required: true
type: string
defaultVersion:
required: true
type: string
testVersions:
required: false
default: false
@@ -108,7 +105,7 @@ jobs:
- name: Evaluate the ${{ matrix.system }} output paths at the merge commit
env:
MATRIX_SYSTEM: ${{ matrix.system }}
MATRIX_VERSION: ${{ matrix.version || inputs.defaultVersion }}
MATRIX_VERSION: ${{ matrix.version || 'nixVersions.latest' }}
run: |
nix-build nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A eval.singleSystem \
--argstr evalSystem "$MATRIX_SYSTEM" \
@@ -122,14 +119,12 @@ jobs:
if: inputs.targetSha
env:
MATRIX_SYSTEM: ${{ matrix.system }}
# This must match the default version set in the Merge Queue.
VERSION: lixPackageSets.latest.lix
# This is very quick, because it pulls the eval results from Cachix.
run: |
nix-build nixpkgs/trusted/ci --arg nixpkgs ./nixpkgs/trusted-pinned -A eval.singleSystem \
--argstr evalSystem "$MATRIX_SYSTEM" \
--arg chunkSize 8000 \
--argstr nixPath "$VERSION" \
--argstr nixPath "nixVersions.latest" \
--out-link target
- name: Compare outpaths against the target branch
@@ -289,10 +284,6 @@ jobs:
diff.removed,
diff.changed,
diff.rebuilds
).filter(attr =>
// Exceptions related to dev shells, which changed at some time between 2.18 and 2.24.
!attr.startsWith('tests.devShellTools.nixos.') &&
!attr.startsWith('tests.devShellTools.unstructuredDerivationInputEnv.')
)
if (attrs.length > 0) {
core.setFailed(
-2
View File
@@ -55,8 +55,6 @@ jobs:
with:
mergedSha: ${{ inputs.mergedSha || github.event.merge_group.head_sha }}
systems: ${{ needs.prepare.outputs.systems }}
# This must match the version in Eval's target step.
defaultVersion: lixPackageSets.latest.lix
# This job's only purpose is to create the target for the "Required Status Checks" branch ruleset.
# It "needs" all the jobs that should block the Merge Queue.
-1
View File
@@ -86,7 +86,6 @@ jobs:
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
targetSha: ${{ needs.prepare.outputs.targetSha }}
systems: ${{ needs.prepare.outputs.systems }}
defaultVersion: nixVersions.latest
testVersions: ${{ contains(fromJSON(needs.prepare.outputs.touched), 'pinned') && !contains(fromJSON(needs.prepare.outputs.headBranch).type, 'development') }}
labels:
@@ -112,6 +112,8 @@
- [ente](https://github.com/ente-io/ente), a service that provides a fully open source, end-to-end encrypted platform for photos and videos. Available as [services.ente.api](#opt-services.ente.api.enable) and [services.ente.web](#opt-services.ente.web.enable).
- [PairDrop](https://github.com/schlagmichdoch/pairdrop), a peer-to-peer file transfer web app. Available as [services.pairdrop](#opt-services.pairdrop.enable).
- [SuiteNumérique Docs](https://github.com/suitenumerique/docs), a collaborative note taking, wiki and documentation web platform and alternative to Notion or Outline. Available as [services.lasuite-docs](#opt-services.lasuite-docs.enable).
- [dwl](https://codeberg.org/dwl/dwl), a compact, hackable compositor for Wayland based on wlroots. Available as [programs.dwl](#opt-programs.dwl.enable).
+1
View File
@@ -1671,6 +1671,7 @@
./services/web-apps/openvscode-server.nix
./services/web-apps/openwebrx.nix
./services/web-apps/outline.nix
./services/web-apps/pairdrop.nix
./services/web-apps/part-db.nix
./services/web-apps/peering-manager.nix
./services/web-apps/peertube-runner.nix
+1 -1
View File
@@ -22,7 +22,6 @@ let
${listenCfg}
hostname ${cfg.hostName}
${tlsCfg}
db sqlite3 ${stateDir}/soju.db
${logCfg}
http-origin ${concatStringsSep " " cfg.httpOrigins}
accept-proxy-ip ${concatStringsSep " " cfg.acceptProxyIP}
@@ -153,6 +152,7 @@ in
ExecStart = "${lib.getExe' cfg.package "soju"} -config ${cfg.configFile}";
StateDirectory = "soju";
RuntimeDirectory = "soju";
WorkingDirectory = stateDir;
};
};
};
@@ -0,0 +1,152 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (lib)
boolToString
getExe
isBool
maintainers
mapAttrs
mkEnableOption
mkIf
mkOption
mkPackageOption
optionalAttrs
optionals
types
;
cfg = config.services.pairdrop;
json = pkgs.formats.json { };
in
{
options.services.pairdrop = {
enable = mkEnableOption "pairdrop";
package = mkPackageOption pkgs "pairdrop" { };
port = mkOption {
type = types.port;
default = 3000;
example = 3010;
description = "The port to listen on.";
};
rtcConfig = mkOption {
type = json.type;
default = null;
example = {
sdpSemantics = "unified-plan";
iceServers = [
{
urls = "stun:stun.example.com:19302";
}
];
};
description = ''
Configuration for STUN/TURN servers.
This is converted to JSON and written into a file automatically.
If you want to provide a file path instead, set `RTC_CONFIG` in {option}`services.pairdrop.environment`.
'';
};
environment = mkOption {
description = ''
Additional configuration (environment variables) for PairDrop, see
<https://github.com/schlagmichdoch/PairDrop/blob/master/docs/host-your-own.md#environment-variables>
for supported values.
'';
type = types.submodule {
freeformType =
with types;
attrsOf (oneOf [
bool
int
str
]);
options = { };
};
default = { };
example = {
DEBUG_MODE = true;
RATE_LIMIT = 1;
IPV6_LOCALIZE = 4;
WS_FALLBACK = true;
SIGNALING_SERVER = "pairdrop.net";
RTC_CONFIG = "/etc/pairdrop/rtc-config.json";
DONATION_BUTTON_ACTIVE = false;
TWITTER_BUTTON_ACTIVE = false;
MASTODON_BUTTON_ACTIVE = false;
BLUESKY_BUTTON_ACTIVE = false;
CUSTOM_BUTTON_ACTIVE = false;
PRIVACYPOLICY_BUTTON_ACTIVE = false;
};
};
};
config = mkIf cfg.enable {
warnings = optionals (cfg.rtcConfig != null && cfg.environment ? RTC_CONFIG) [
"Both services.pairdrop.rtcConfig and services.pairdrop.environment.RTC_CONFIG are set. The environment variable will take precedence."
];
systemd.services.pairdrop =
let
environment = {
PORT = toString cfg.port;
}
// (optionalAttrs (cfg.rtcConfig != null) {
RTC_CONFIG = json.generate "rtc-config.json" cfg.rtcConfig;
})
// (mapAttrs (_: v: if isBool v then boolToString v else toString v) cfg.environment);
in
{
inherit environment;
description = "PairDrop: Transfer Files Cross-Platform";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = getExe cfg.package;
Type = "simple";
Restart = "on-failure";
RestartSec = 3;
DynamicUser = true;
# Hardening
CapabilityBoundingSet = "";
NoNewPrivileges = true;
PrivateUsers = true;
PrivateTmp = true;
PrivateDevices = true;
PrivateMounts = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
};
};
};
meta.maintainers = with maintainers; [ diogotcorreia ];
}
+1
View File
@@ -1149,6 +1149,7 @@ in
oxidized = handleTest ./oxidized.nix { };
pacemaker = runTest ./pacemaker.nix;
packagekit = runTest ./packagekit.nix;
pairdrop = runTest ./web-apps/pairdrop.nix;
paisa = runTest ./paisa.nix;
pam-file-contents = runTest ./pam/pam-file-contents.nix;
pam-lastlog = runTest ./pam/pam-lastlog.nix;
+32
View File
@@ -0,0 +1,32 @@
{ ... }:
{
name = "pairdrop-nixos";
nodes.machine =
{ pkgs, ... }:
{
services.pairdrop = {
enable = true;
port = 1337;
environment = {
SIGNALING_SERVER = "pairdrop.net";
CUSTOM_BUTTON_ACTIVE = false;
};
};
};
testScript = ''
import json
machine.wait_for_unit("pairdrop.service")
machine.wait_for_open_port(1337)
machine.succeed("curl --fail http://localhost:1337/")
res = machine.succeed("curl --fail http://localhost:1337/config")
print(res)
cfg = json.loads(res)
assert cfg["signalingServer"] == "pairdrop.net/"
assert cfg["buttons"]["custom_button"]["active"] == "false"
'';
}
@@ -7,8 +7,8 @@ vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "claude-dev";
publisher = "saoudrizwan";
version = "3.32.7";
hash = "sha256-cnjF/laOw7A+nAtBOMWXi4M6NoOK/4kWHne4qlyn4wM=";
version = "3.32.8";
hash = "sha256-IwWAk8Awi6JNDQbJ7XX2wiFVsEYKzIBHqynig5W5Dtg=";
};
meta = {
@@ -1,11 +1,11 @@
{
"packageVersion": "143.0.4-1",
"packageVersion": "144.0-1",
"source": {
"rev": "143.0.4-1",
"hash": "sha256-RyLz5se2AqXAmsa/MckiUgcBfRxZVVsrNg2L757qOuo="
"rev": "144.0-1",
"hash": "sha256-5LE8VUKQUua8l/mZN8a7MQCr3uPWJuFZ2WfhJyt14bE="
},
"firefox": {
"version": "143.0.4",
"hash": "sha512-K8veTnLqQenMyYg2kBY1NQtdx7UMYY4Zq2EDonrcDwF8o/p1VTeMivbuHzoU0Ck1KJ/isNNdhA1hD1rAeojktg=="
"version": "144.0",
"hash": "sha512-4fkk7QBqMfUzPqavIZwfuQ1IZuWImsY0wySj6AsEKn4LK5rreYZy6hpDT7+Bf8C4KhLsD7QFpI46LKIcw5REXg=="
}
}
@@ -6,6 +6,7 @@
ninja,
nv-codec-headers-12,
fetchFromGitHub,
fetchpatch2,
addDriverRunpath,
autoAddDriverRunpath,
cudaSupport ? config.cudaSupport,
@@ -97,6 +98,11 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
./fix-nix-plugin-path.patch
# Fix build with Qt 6.10 https://github.com/obsproject/obs-studio/pull/12328
(fetchpatch2 {
url = "https://github.com/obsproject/obs-studio/commit/26dfacbd4f5217258a2f1c5472a544c65a182d10.patch?full_index=1";
hash = "sha256-gEWDzZ+GPCR+rmytXcbiBcvzLg8VwZCveMKkvho3COI=";
})
];
nativeBuildInputs = [
+9 -26
View File
@@ -4,8 +4,6 @@
fontconfig,
llvmPackages,
nix-update-script,
python3Packages,
pythonSupport ? false,
stdenv,
# nativeBuildInputs
@@ -23,18 +21,19 @@
pinocchio,
# checkInputs
catch2_3,
gbenchmark,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "aligator";
version = "0.15.0";
version = "0.16.0";
src = fetchFromGitHub {
owner = "Simple-Robotics";
repo = "aligator";
tag = "v${finalAttrs.version}";
hash = "sha256-x9vOj5Dy2SaQOLBCM13wZ/4SxgBz+99K/UxJqhKTg3c=";
hash = "sha256-OyCJa2iTkCxVLooSKdVgBd0y7rHObo4vFcc56t48TSY=";
};
outputs = [
@@ -49,48 +48,33 @@ stdenv.mkDerivation (finalAttrs: {
cmake
graphviz
pkg-config
]
++ lib.optionals pythonSupport [
python3Packages.python
python3Packages.pythonImportsCheckHook
];
buildInputs = [
fmt
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
llvmPackages.openmp
];
propagatedBuildInputs = [
suitesparse
]
++ lib.optionals pythonSupport [
python3Packages.crocoddyl
python3Packages.matplotlib
python3Packages.pinocchio
]
++ lib.optionals (!pythonSupport) [
crocoddyl
pinocchio
suitesparse
];
checkInputs = [
catch2_3
gbenchmark
]
++ lib.optionals pythonSupport [
python3Packages.matplotlib
python3Packages.pytest
];
cmakeFlags = [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" false)
(lib.cmakeBool "BUILD_WITH_PINOCCHIO_SUPPORT" true)
(lib.cmakeBool "BUILD_CROCODDYL_COMPAT" true)
(lib.cmakeBool "BUILD_WITH_OPENMP_SUPPORT" true)
(lib.cmakeBool "BUILD_WITH_CHOLMOD_SUPPORT" true)
(lib.cmakeBool "GENERATE_PYTHON_STUBS" false) # this need git at configure time
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && pythonSupport) [
# ignore one failing test for now
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;'aligator-test-py-rollout|aligator-test-py-frames'")
];
# Fontconfig error: Cannot load default config file: No such file: (null)
@@ -105,7 +89,6 @@ stdenv.mkDerivation (finalAttrs: {
'';
doCheck = true;
pythonImportsCheck = [ "aligator" ];
passthru.updateScript = nix-update-script { };
+6 -1
View File
@@ -34,12 +34,17 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
(lib.cmakeBool "ASSIMP_BUILD_ASSIMP_TOOLS" true)
(lib.cmakeBool "ASSIMP_BUILD_TESTS" finalAttrs.finalPackage.doCheck)
];
# Some matrix tests fail on non-86_64-linux:
# https://github.com/assimp/assimp/issues/6246
# https://github.com/assimp/assimp/issues/6247
doCheck = !(stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isx86_64);
# On Darwin, the bundled googletest is not compatible with Clang 21.
# contrib/googletest/googletest/include/gtest/gtest-printers.h:498:35:
# error: implicit conversion from 'char16_t' to 'char32_t' may change the meaning of the represented code unit
# [-Werror,-Wcharacter-conversion]
doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64;
checkPhase = ''
runHook preCheck
bin/unit
+3 -3
View File
@@ -22,16 +22,16 @@ let
in
buildNpmPackage' rec {
pname = "balena-cli";
version = "22.4.10";
version = "22.4.13";
src = fetchFromGitHub {
owner = "balena-io";
repo = "balena-cli";
rev = "v${version}";
hash = "sha256-KvFyqVrb5C89B4BeZCqdDZtneX7kWyaLF0oI8SqrsGw=";
hash = "sha256-nke7EQscVPu1A/d4DKi7pSb6/MQgeFtG+zhMZT+bhWk=";
};
npmDepsHash = "sha256-ty+D/p4cDlWkruUD0J4IzaEWIFp/fe4KBGqorV+qmrw=";
npmDepsHash = "sha256-GQXbXkOt8nkOB2OeEcKsp1yJd5lXS+KKout/5ffLgD0=";
postPatch = ''
ln -s npm-shrinkwrap.json package-lock.json
@@ -38,11 +38,12 @@ stdenv.mkDerivation {
inherit (bcachefs-tools.meta)
homepage
downloadPage
license
maintainers
platforms
;
broken = !(lib.versionAtLeast kernel.version "6.16" && lib.versionOlder kernel.version "6.18");
broken = !(lib.versionAtLeast kernel.version "6.16" && lib.versionOlder kernel.version "6.19");
};
}
+29 -29
View File
@@ -19,7 +19,7 @@
rustPlatform,
makeWrapper,
nix-update-script,
testers,
versionCheckHook,
nixosTests,
installShellFiles,
fuseSupport ? false,
@@ -28,15 +28,25 @@
stdenv.mkDerivation (finalAttrs: {
pname = "bcachefs-tools";
version = "1.31.7";
version = "1.31.11";
src = fetchFromGitHub {
owner = "koverstreet";
repo = "bcachefs-tools";
tag = "v${finalAttrs.version}";
hash = "sha256-gKtOyaDN9hQo45Rk9hMabKRefOG+ooaCrtLBCPx0fT8=";
hash = "sha256-CnRB/iS1NZ0Ebsi12wXFvVb0qdv0V9q1oC3nLj13mqs=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) src;
hash = "sha256-50xy1nqDctgz/lXd5JsfaU6yxDoRCQRtiYBwuEuiKFA=";
};
postPatch = ''
substituteInPlace Makefile \
--replace-fail "target/release/bcachefs" "target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/bcachefs"
'';
nativeBuildInputs = [
pkg-config
cargo
@@ -45,14 +55,12 @@ stdenv.mkDerivation (finalAttrs: {
rustPlatform.bindgenHook
makeWrapper
installShellFiles
udevCheckHook
];
buildInputs = [
libaio
keyutils
lz4
libsodium
liburcu
libuuid
@@ -63,16 +71,6 @@ stdenv.mkDerivation (finalAttrs: {
]
++ lib.optional fuseSupport fuse3;
cargoDeps = rustPlatform.fetchCargoVendor {
src = finalAttrs.src;
hash = "sha256-INnv9kRgM8RRMwBnC6Vwj9S5FfI5gMscU//aNzHF+8w=";
};
outputs = [
"out"
"dkms"
];
makeFlags = [
"PREFIX=${placeholder "out"}"
"VERSION=${finalAttrs.version}"
@@ -84,6 +82,9 @@ stdenv.mkDerivation (finalAttrs: {
"PKGCONFIG_UDEVDIR=$(out)/lib/udev"
]
++ lib.optional fuseSupport "BCACHEFS_FUSE=1";
enableParallelBuilding = true;
installFlags = [
"install"
"install_dkms"
@@ -97,18 +98,18 @@ stdenv.mkDerivation (finalAttrs: {
# FIXME: Try enabling this once the default linux kernel is at least 6.7
doCheck = false; # needs bcachefs module loaded on builder
doInstallCheck = true;
postPatch = ''
substituteInPlace Makefile \
--replace-fail "target/release/bcachefs" "target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/bcachefs"
'';
preCheck = lib.optionalString (!fuseSupport) ''
rm tests/test_fuse.py
'';
checkFlags = [ "BCACHEFS_TEST_USE_VALGRIND=no" ];
doInstallCheck = true;
nativeInstallCheckInputs = [
udevCheckHook
versionCheckHook
];
versionCheckProgramArg = "version";
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd bcachefs \
--bash <($out/sbin/bcachefs completions bash) \
@@ -116,16 +117,16 @@ stdenv.mkDerivation (finalAttrs: {
--fish <($out/sbin/bcachefs completions fish)
'';
outputs = [
"out"
"dkms"
];
passthru = {
# See NOTE in linux-kernels.nix
kernelModule = import ./kernel-module.nix finalAttrs.finalPackage;
tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "${finalAttrs.meta.mainProgram} version";
version = "${finalAttrs.version}";
};
smoke-test = nixosTests.bcachefs;
inherit (nixosTests.installer) bcachefsSimple bcachefsEncrypted bcachefsMulti;
};
@@ -133,11 +134,10 @@ stdenv.mkDerivation (finalAttrs: {
updateScript = nix-update-script { };
};
enableParallelBuilding = true;
meta = {
description = "Tool for managing bcachefs filesystems";
homepage = "https://bcachefs.org/";
downloadPage = "https://github.com/koverstreet/bcachefs-tools";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [
davidak
+3 -3
View File
@@ -6,16 +6,16 @@
}:
rustPlatform.buildRustPackage rec {
pname = "bootspec";
version = "1.1.0";
version = "2.0.0";
src = fetchFromGitHub {
owner = "DeterminateSystems";
repo = "bootspec";
rev = "v${version}";
hash = "sha256-WDEaTxj5iT8tvasd6gnMhRgNoEdDi9Wi4ke8sVtNpt8=";
hash = "sha256-FeNBn/HeOanvFSCH9gNBCwlSJx1EhhEdrgX2rbXdZgI=";
};
cargoHash = "sha256-ZJKoL1vYfAG1rpCcE1jRm7Yj2dhooJ6iQ91c6EGF83E=";
cargoHash = "sha256-vJVOseAvIGNxos180Z5OHgo3u/2iyeOgOetXTJxyZx0=";
passthru.updateScript = nix-update-script { };
+5 -19
View File
@@ -9,21 +9,20 @@
jrl-cmakemodules,
assimp,
octomap,
pkg-config,
qhull,
pythonSupport ? false,
python3Packages,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "coal";
version = "3.0.1";
version = "3.0.2";
src = fetchFromGitHub {
owner = "coal-library";
repo = "coal";
tag = "v${finalAttrs.version}";
hash = "sha256-2X1chL4tYQXo50W/C5z+IVA1DGPcPdA378lh+7Bs2OE=";
hash = "sha256-7Ww1vAzKaCccBpBQU1hzI7Jk+oXw73zhnH594Xn9gbw=";
};
strictDeps = true;
@@ -31,10 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
doxygen
]
++ lib.optionals pythonSupport [
python3Packages.numpy
python3Packages.pythonImportsCheckHook
pkg-config
];
propagatedBuildInputs = [
@@ -43,28 +39,18 @@ stdenv.mkDerivation (finalAttrs: {
octomap
qhull
zlib
]
++ lib.optionals (!pythonSupport) [
boost
eigen
]
++ lib.optionals pythonSupport [
python3Packages.boost
python3Packages.eigenpy
];
cmakeFlags = [
(lib.cmakeBool "COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL" true)
(lib.cmakeBool "COAL_HAS_QHULL" true)
(lib.cmakeBool "INSTALL_DOCUMENTATION" true)
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" false)
];
doCheck = true;
pythonImportsCheck = [
"coal"
"hppfcl"
];
outputs = [
"dev"
+3 -3
View File
@@ -13,13 +13,13 @@
buildGoModule (finalAttrs: {
pname = "cosign";
version = "2.6.1";
version = "3.0.2";
src = fetchFromGitHub {
owner = "sigstore";
repo = "cosign";
rev = "v${finalAttrs.version}";
hash = "sha256-JQxVO7wZFyRovst3qb0EErDyIIhPNsIpBq/iQVf6djY=";
hash = "sha256-5jCO2LW7nzbzo+de0fpxBcVASDmINB6yFerkQZlo2o8=";
};
buildInputs = lib.optional (stdenv.hostPlatform.isLinux && pivKeySupport) (lib.getDev pcsclite);
@@ -29,7 +29,7 @@ buildGoModule (finalAttrs: {
installShellFiles
];
vendorHash = "sha256-7qVJMQI5htqMavrxFP2lQfQ/7b27bRWnNYg2cHmTZYE=";
vendorHash = "sha256-hedkslhyAsictu9Cbw7CgreoWa1StLpTt8oTPNLr5fc=";
subPackages = [
"cmd/cosign"
+14 -19
View File
@@ -4,27 +4,35 @@
doxygen,
example-robot-data,
fetchFromGitHub,
fetchpatch,
ipopt,
lapack,
lib,
pinocchio,
pkg-config,
pythonSupport ? false,
python3Packages,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "crocoddyl";
version = "3.0.1";
version = "3.1.0";
src = fetchFromGitHub {
owner = "loco-3d";
repo = "crocoddyl";
tag = "v${finalAttrs.version}";
hash = "sha256-eUH9fMhuIUp5kuDKNo4B8iJ3JlMIqv7wX6meOpyPTJk=";
hash = "sha256-m7UiCa8ydjsAIhsFiShTi3/JaKgq2TCQ1XYAMyTNg1U=";
};
patches = [
# ref. https://github.com/loco-3d/crocoddyl/pull/1440 merged upstream
(fetchpatch {
name = "add-missing-include.patch";
url = "https://github.com/loco-3d/crocoddyl/commit/6994bea7bb3ae6027f5b611ef1635768538150fd.patch";
hash = "sha256-XbQKRWpWm5Rk4figoA2swId4Pz2xKDpU4NFP46p8WO0=";
})
];
outputs = [
"out"
"doc"
@@ -36,31 +44,20 @@ stdenv.mkDerivation (finalAttrs: {
cmake
doxygen
pkg-config
]
++ lib.optionals pythonSupport [
python3Packages.python
python3Packages.pythonImportsCheckHook
];
propagatedBuildInputs = [
blas
ipopt
lapack
]
++ lib.optionals (!pythonSupport) [
example-robot-data
pinocchio
]
++ lib.optionals pythonSupport [
python3Packages.example-robot-data
python3Packages.pinocchio
python3Packages.scipy
];
cmakeFlags = [
(lib.cmakeBool "INSTALL_DOCUMENTATION" true)
(lib.cmakeBool "BUILD_EXAMPLES" pythonSupport)
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
(lib.cmakeBool "BUILD_EXAMPLES" false)
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" false)
];
prePatch = ''
@@ -71,8 +68,6 @@ stdenv.mkDerivation (finalAttrs: {
'';
doCheck = true;
pythonImportsCheck = [ "crocoddyl" ];
checkInputs = lib.optionals pythonSupport [ python3Packages.scipy ];
meta = with lib; {
description = "Crocoddyl optimal control library";
@@ -6,20 +6,20 @@
buildNpmPackage rec {
pname = "dockerfile-language-server";
version = "0.14.1";
version = "0.15.0";
src = fetchFromGitHub {
owner = "rcjsuen";
repo = "dockerfile-language-server";
tag = "v${version}";
hash = "sha256-oPU9XVxD9GbXMWkeGKncriFi1oP3YlkWnjxzltaz/iU=";
hash = "sha256-olgOUbVHHj9vD7upswqVJYBRIRb+kg6uXC2y5shnM+g=";
};
preBuild = ''
npm run prepublishOnly
'';
npmDepsHash = "sha256-p5BBKoq+ANR8z4YWsjmKaNqkyQGETwG5OmdapasLk+c=";
npmDepsHash = "sha256-cJ11l2NF/sCzPw/eQNFon5oKRM+KPoy4lxLz0yivHTo=";
meta = {
changelog = "https://github.com/rcjsuen/dockerfile-language-server/blob/${src.tag}/CHANGELOG.md";
+22 -8
View File
@@ -1,37 +1,51 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
pkg-config,
fontconfig,
makeFontsConf,
versionCheckHook,
nix-update-script,
}:
let
fontsConf = makeFontsConf {
fontDirectories = [ ];
};
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "dovi-tool";
version = "2.2.0";
version = "2.3.1";
src = fetchFromGitHub {
owner = "quietvoid";
repo = "dovi_tool";
tag = finalAttrs.version;
hash = "sha256-z783L6gBr9o44moKYZGwymWEMp5ZW7yOhZcpvbznXK4=";
hash = "sha256-4C9d8Rt1meV6Pcdnf2SaiWGA97sRj2WmvKsf1rC01Bs=";
};
cargoHash = "sha256-pwB6QBLeHALbYZHzTBm/ODLPHhxM3B5n+B/0iXYNuVc=";
cargoHash = "sha256-Dg6IDcYm3qTSyE5kVgZ8Yka8538KDFyBN+weUyAfQT8=";
nativeBuildInputs = [
nativeBuildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [
pkg-config
];
buildInputs = [
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [
fontconfig
];
checkFlags = [
# fails because nix-store is read only
"--skip=rpu::plot::plot_p7"
preCheck = lib.optionals (!stdenv.hostPlatform.isDarwin) ''
# Fontconfig error: Cannot load default config file: No such file: (null)
export FONTCONFIG_FILE="${fontsConf}"
# Fontconfig error: No writable cache directories
export XDG_CACHE_HOME="$(mktemp -d)"
'';
# Needed for rpu::plot::plot_p7 to pass in the sandbox.
__impureHostDeps = lib.optionals stdenv.hostPlatform.isDarwin [
"/System/Library/Fonts/Supplemental/Arial.ttf"
];
nativeInstallCheckInputs = [
+10
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
}:
@@ -16,6 +17,15 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-XejxohLVdBBzpYZ//OpqC1ActmCaZ8tunJyhOYtZmKQ=";
};
patches = [
# Bump minimum CMake version to 3.20
(fetchpatch {
name = "bump-cmake-version.patch";
url = "https://github.com/Martinsos/edlib/commit/47359e591f3861f12105fa8e72242de64d5597c4.patch?full_index=1";
hash = "sha256-Efbv8XYF1jOz6MypIyhfFJGQQt8gTYNZRd+R8ukIf3o=";
})
];
nativeBuildInputs = [ cmake ];
doCheck = true;
+3 -3
View File
@@ -8,7 +8,7 @@
versionCheckHook,
}:
let
version = "1.35.4";
version = "1.36.0";
inherit (stdenv.hostPlatform) system;
throwSystem = throw "envoy-bin is not available for ${system}.";
@@ -21,8 +21,8 @@ let
hash =
{
aarch64-linux = "sha256-iTZilcY0Tc6xjMCSOEdwyzyJeRhd+5A4WIhq89817bc=";
x86_64-linux = "sha256-hBy2DmJlTADt9E3V81CKlFXkM17q52gN5Eq/l4F+qcw=";
aarch64-linux = "sha256-AQFQbCksOJshIzSPvkixRd2jq+hT8+/B5yw1iFzdNqY=";
x86_64-linux = "sha256-2fAq74ha9P3KUukQcmu2HxJ7iLAdmAZm/DF832oqMME=";
}
.${system} or throwSystem;
in
+4 -16
View File
@@ -5,20 +5,18 @@
lib,
jrl-cmakemodules,
pkg-config,
pythonSupport ? false,
python3Packages,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "example-robot-data";
version = "4.3.0";
version = "4.4.0";
src = fetchFromGitHub {
owner = "Gepetto";
repo = "example-robot-data";
tag = "v${finalAttrs.version}";
hash = "sha256-i5YU5lcbB3gm8/YrRRiE2NDcLEq7+eF7GtIrJ1DF1cU=";
hash = "sha256-HnI1EaTSqk7mbihwFTgnMxgPZxMSYnAwaCLEXS3LUbE=";
};
outputs = [
@@ -32,25 +30,15 @@ stdenv.mkDerivation (finalAttrs: {
cmake
doxygen
pkg-config
]
++ lib.optionals pythonSupport [
python3Packages.python
python3Packages.pythonImportsCheckHook
];
propagatedBuildInputs = [
jrl-cmakemodules
]
++ lib.optionals pythonSupport [ python3Packages.pinocchio ];
];
cmakeFlags = [ (lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport) ];
cmakeFlags = [ (lib.cmakeBool "BUILD_PYTHON_INTERFACE" false) ];
doCheck = true;
# The package expect to find an `example-robot-data/robots` folder somewhere
# either in install prefix or in the sources
# where it can find the meshes for unit tests
preCheck = "ln -s source ../../example-robot-data";
pythonImportsCheck = [ "example_robot_data" ];
meta = with lib; {
description = "Set of robot URDFs for benchmarking and developed examples";
+2 -2
View File
@@ -27,7 +27,7 @@
}:
let
version = "1.24.0";
version = "1.25.0";
# build stimuli file for PGO build and the script to generate it
# independently of the foot's build, so we can cache the result
@@ -104,7 +104,7 @@ stdenv.mkDerivation {
owner = "dnkl";
repo = "foot";
tag = version;
hash = "sha256-uex2p28rKBwnqPjO1Pen1GA3a9mEnrcpIb1oIUJv/Lk=";
hash = "sha256-s7SwIdkWhBKcq9u4V0FLKW6CA36MBvDyB9ELB0V52O0=";
};
separateDebugInfo = true;
@@ -8,13 +8,13 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "gradle-completion";
version = "1.4.1";
version = "1.5.2";
src = fetchFromGitHub {
owner = "gradle";
repo = "gradle-completion";
rev = "v${finalAttrs.version}";
sha256 = "15b0692i3h8h7b95465b2aw9qf5qjmjag5n62347l8yl7zbhv3l2";
sha256 = "u3bnvNkjKzNp604hnPoAT3YY3Xf9eJlAe174YnM2RMQ=";
};
nativeBuildInputs = [
+3 -3
View File
@@ -10,13 +10,13 @@
buildGoModule (finalAttrs: {
pname = "grype";
version = "0.100.0";
version = "0.101.0";
src = fetchFromGitHub {
owner = "anchore";
repo = "grype";
tag = "v${finalAttrs.version}";
hash = "sha256-POGGhZ2uTqWjUsl1zR4eirb+Daji+igTtUNwTte7gPA=";
hash = "sha256-20nl2mfU5PeEtUwyOUrKZ58nHyVvxZol4M37IPabx3A=";
# populate values that require us to use git. By doing this in postFetch we
# can delete .git afterwards and maintain better reproducibility of the src.
leaveDotGit = true;
@@ -31,7 +31,7 @@ buildGoModule (finalAttrs: {
proxyVendor = true;
vendorHash = "sha256-QGGY88CELV9e5UxtfDXKmShnKiP8i+0f8iA9pOTirzc=";
vendorHash = "sha256-VbJKdd04S1aXXnflEZTtpIh4eJFe17WXZXqWDDo9YiI=";
nativeBuildInputs = [ installShellFiles ];
+22 -3
View File
@@ -4,8 +4,9 @@
fetchFromGitHub,
openssl,
stdenv,
copyPkgconfigItems,
makePkgconfigItem,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "httplib";
version = "0.19.0";
@@ -17,18 +18,36 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-OLwD7mpwqG7BUugUca+CJpPMaabJzUMC0zYzJK9PBCg=";
};
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [
cmake
copyPkgconfigItems
];
buildInputs = [ openssl ];
strictDeps = true;
pkgconfigItems = [
(makePkgconfigItem rec {
name = "httplib";
inherit (finalAttrs) version;
cflags = [ "-I${variables.includedir}" ];
variables = rec {
prefix = placeholder "out";
includedir = "${prefix}/include";
};
inherit (finalAttrs.meta) description;
})
];
meta = {
homepage = "https://github.com/yhirose/cpp-httplib";
description = "C++ header-only HTTP/HTTPS server and client library";
changelog = "https://github.com/yhirose/cpp-httplib/releases/tag/${finalAttrs.src.rev}";
license = lib.licenses.mit;
maintainers = [ ];
maintainers = with lib.maintainers; [
fzakaria
];
platforms = lib.platforms.all;
};
})
+19 -5
View File
@@ -2,27 +2,41 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
nix-update-script,
cmake,
}:
stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
pname = "jrl-cmakemodules";
version = "0-unstable-2025-05-04";
version = "1.1.0";
src = fetchFromGitHub {
owner = "jrl-umi3218";
repo = "jrl-cmakemodules";
rev = "2dd858f5a71d8224f178fb3dc0bcd95256ba10e7";
hash = "sha256-Iq9IuhEJBmDd14FhQ3wb94AoJDUjJ1h1D3qCdQYCnUc=";
tag = "v${finalAttrs.version}";
hash = "sha256-WQiAAexshQ4zgaBNo/CD91XV+PAeoPZatmehSA14aPM=";
};
patches = [
# ref. https://github.com/jrl-umi3218/jrl-cmakemodules/pull/783
(fetchpatch {
name = "fix-permissions.patch";
url = "https://github.com/jrl-umi3218/jrl-cmakemodules/commit/defed70c8a7c5e4bd5b26006bef26e3fb22c3b26.patch";
hash = "sha256-muO6DwQhNPCv6DPmnHnEHjsh/FSj0ljgNCb+ZowLRaY=";
})
];
nativeBuildInputs = [ cmake ];
passthru.updateScript = nix-update-script { };
meta = {
description = "CMake utility toolbox";
homepage = "https://github.com/jrl-umi3218/jrl-cmakemodules";
changelog = "https://github.com/jrl-umi3218/jrl-cmakemodules/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.lgpl3Plus;
maintainers = [ lib.maintainers.nim65s ];
platforms = lib.platforms.all;
};
}
})
+2 -2
View File
@@ -7,7 +7,7 @@
tk,
addDriverRunpath,
apple-sdk_12,
apple-sdk_13,
koboldLiteSupport ? true,
@@ -63,7 +63,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
tk
]
++ finalAttrs.pythonInputs
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_12 ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_13 ]
++ lib.optionals cublasSupport [
cudaPackages.libcublas
cudaPackages.cuda_nvcc
+2 -2
View File
@@ -13,14 +13,14 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "kurve";
version = "2.0.0";
version = "2.1.0";
dontWrapQtApps = true;
src = fetchFromGitHub {
owner = "luisbocanegra";
repo = "kurve";
tag = "v${finalAttrs.version}";
hash = "sha256-qw/6V3TWGZFL8dgyDUxzBr4U6/jaX9uwpyg3Bd3pKdg=";
hash = "sha256-Fm2HoD3W/MymUr3JiVxssHvxwIGQ7jri0iz+asSS1eY=";
};
installPhase = ''
+75
View File
@@ -0,0 +1,75 @@
{
stdenv,
fetchFromGitLab,
meson,
pkg-config,
docutils,
ninja,
glib,
libvirt,
libvirt-glib,
systemd,
gitUpdater,
lib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libvirt-dbus";
version = "1.4.1";
outputs = [
"out"
"man"
];
src = fetchFromGitLab {
owner = "libvirt";
repo = "libvirt-dbus";
tag = "v${finalAttrs.version}";
hash = "sha256-S4QktQmcnTte4XsIcgc5dkA8LjMJaOD2lljS01WT0dk=";
};
postPatch = ''
substituteInPlace "data/system/meson.build" \
--replace-fail ": systemd_system_unit_dir" ": '$out/lib/systemd/system'"
substituteInPlace "data/session/meson.build" \
--replace-fail ": systemd_user_unit_dir" ": '$out/lib/systemd/user'"
'';
nativeBuildInputs = [
meson
pkg-config
docutils
ninja
];
buildInputs = [
glib
libvirt
libvirt-glib
systemd
];
mesonFlags = [
(lib.mesonOption "init_script" "systemd")
(lib.mesonOption "unix_socket_group" "qemu-libvirtd")
# TODO: uncomment below on next release
# (lib.mesonOption "sysusersdir" "${placeholder "out"}/lib/sysusers.d")
];
doCheck = false; # needs running D-Bus and libvirt
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
meta = {
description = "libvirt D-Bus API binding";
homepage = "https://libvirt.org/dbus.html";
changelog = "https://gitlab.com/libvirt/libvirt-dbus/-/blob/v${finalAttrs.version}/NEWS.rst";
license = lib.licenses.lgpl2Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ andre4ik3 ];
};
})
@@ -0,0 +1,52 @@
From 1cb7fe38e3ec43117c646cae521eb8347145965a Mon Sep 17 00:00:00 2001
From: Guilhem Saurel <guilhem.saurel@laas.fr>
Date: Tue, 14 Oct 2025 19:37:16 +0200
Subject: [PATCH] fix for crocoddyl v3.1.0 explicit template instanciation
ref. https://github.com/loco-3d/crocoddyl/pull/1367
Yes, that was a breaking change
---
tests/factory/point-mass.hpp | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/tests/factory/point-mass.hpp b/tests/factory/point-mass.hpp
index e82c977..c2e93af 100644
--- a/tests/factory/point-mass.hpp
+++ b/tests/factory/point-mass.hpp
@@ -60,6 +60,17 @@ class DAMPointMass1D : public crocoddyl::DifferentialActionModelAbstract {
// Destructor
virtual ~DAMPointMass1D();
+ // Explicit template instanciation
+ std::shared_ptr<crocoddyl::DifferentialActionModelBase> cloneAsDouble()
+ const override {
+ return std::make_shared<DAMPointMass1D>(*this);
+ }
+
+ std::shared_ptr<crocoddyl::DifferentialActionModelBase> cloneAsFloat()
+ const override {
+ return std::make_shared<DAMPointMass1D>(*this);
+ }
+
// Cost & dynamics
void calc(const std::shared_ptr<DifferentialActionDataAbstract>& data,
const Eigen::Ref<const VectorXd>& x,
@@ -135,6 +146,17 @@ class DAMPointMass2D : public crocoddyl::DifferentialActionModelAbstract {
// Destructor
virtual ~DAMPointMass2D();
+ // Explicit template instanciation
+ std::shared_ptr<crocoddyl::DifferentialActionModelBase> cloneAsDouble()
+ const override {
+ return std::make_shared<DAMPointMass2D>(*this);
+ }
+
+ std::shared_ptr<crocoddyl::DifferentialActionModelBase> cloneAsFloat()
+ const override {
+ return std::make_shared<DAMPointMass2D>(*this);
+ }
+
// Cost & dynamics
void calc(const std::shared_ptr<DifferentialActionDataAbstract>& data,
const Eigen::Ref<const VectorXd>& x,
+24 -32
View File
@@ -3,12 +3,11 @@
crocoddyl,
ctestCheckHook,
fetchFromGitHub,
fetchpatch,
lib,
llvmPackages,
pkg-config,
proxsuite,
python3Packages,
pythonSupport ? false,
stdenv,
nix-update-script,
}:
@@ -24,49 +23,44 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-1Mqu9Hfy65HUIOVG/gJBpSMlOwDWVcH+LrR8CaWz0BE=";
};
# eigenpy is not used without python support
postPatch = lib.optionalString (!pythonSupport) ''
substituteInPlace CMakeLists.txt --replace-fail \
"add_project_dependency(eigenpy 2.7.10 REQUIRED)" \
""
'';
patches = [
# ref. https://github.com/machines-in-motion/mim_solvers/pull/71 merged upstream
(fetchpatch {
name = "build-standalone-python-interface.patch";
url = "https://github.com/machines-in-motion/mim_solvers/commit/796eecf05dd9165dd0795aa562ead17de4f19633.patch";
hash = "sha256-/OiMzyDVEbpC/Dr/HcguwAdhmbQNxnIRsHAVkX68xqA=";
})
# Fix for crocoddyl 3.1.0
# ref. https://github.com/machines-in-motion/mim_solvers/pull/72
./fix-croco-310.patch
];
nativeBuildInputs = [
cmake
pkg-config
]
++ lib.optional pythonSupport python3Packages.pythonImportsCheckHook;
];
buildInputs = lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;
propagatedBuildInputs =
lib.optionals pythonSupport [
python3Packages.crocoddyl
python3Packages.osqp
python3Packages.proxsuite
python3Packages.scipy
]
++ lib.optionals (!pythonSupport) [
crocoddyl
proxsuite
];
propagatedBuildInputs = [
crocoddyl
proxsuite
];
cmakeFlags = [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" false)
(lib.cmakeBool "BUILD_WITH_PROXSUITE" true)
]
++ lib.optional (stdenv.hostPlatform.isDarwin) (
lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;'py-test-clqr-osqp'"
)
++ lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) (
lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;'test_solvers'"
);
];
nativeCheckInputs = [
ctestCheckHook
];
disabledTests = [
# Fails with osqp>=1.0.0
# See https://github.com/machines-in-motion/mim_solvers/pull/66
# See https://github.com/machines-in-motion/mim_solvers/pull/67
"py-test-clqr-osqp"
# need removed ActuationModelMultiCopterBase in crocoddyl 3.1.0
"py-test-sqp-no-reg"
]
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
# Several errors such as:
@@ -78,8 +72,6 @@ stdenv.mkDerivation (finalAttrs: {
];
doCheck = true;
pythonImportsCheck = [ "mim_solvers" ];
passthru.updateScript = nix-update-script { };
meta = {
+2 -2
View File
@@ -13,13 +13,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "ndcurves";
version = "2.0.0";
version = "2.1.0";
src = fetchFromGitHub {
owner = "loco-3d";
repo = "ndcurves";
rev = "v${finalAttrs.version}";
hash = "sha256-dDH2XpnlBlhG5Q8N9Aljxvf/K9jFuiAx0lyBIcXNOZE=";
hash = "sha256-VHxGm6fzoS51PtTj/qeZumz58ZHtxy28ihbzbnoHvHg=";
};
outputs = [
+2 -2
View File
@@ -23,13 +23,13 @@
buildDotnetModule (finalAttrs: {
pname = "OpenTabletDriver";
version = "0.6.6.0";
version = "0.6.6.1";
src = fetchFromGitHub {
owner = "OpenTabletDriver";
repo = "OpenTabletDriver";
tag = "v${finalAttrs.version}";
hash = "sha256-NS/r4FU3dT7UT+R7NryRnU5RfLEN0E6pSqtNDpKMS7U=";
hash = "sha256-ixckDFE/LCSncNGjXqPT5GurPhm5aSVALOw4ZrBa5Ww=";
};
dotnet-sdk = dotnetCorePackages.sdk_8_0;
+79
View File
@@ -0,0 +1,79 @@
{
lib,
stdenvNoCC,
fetchurl,
_7zz,
}:
let
inherit (stdenvNoCC.hostPlatform) system;
version = "2.0.3-19876";
sourceData = {
aarch64-darwin = {
arch = "arm64";
hash = "sha256-3Ppc0zWEgR/nTS7R9uAkUYYgYu5q2TWmfd3evT+Z8g4=";
};
x86_64-darwin = {
arch = "amd64";
hash = "sha256-+JpyynFKmDjHLetvvEpQ0qw4crAVmx0ucWm+bvtZ2Fg=";
};
};
sources = lib.mapAttrs (
system:
{ arch, hash }:
fetchurl {
url = "https://cdn-updates.orbstack.dev/${arch}/OrbStack_v${
lib.replaceString "-" "_" version
}_${arch}.dmg";
inherit hash;
}
) sourceData;
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "orbstack";
inherit version;
src = finalAttrs.passthru.sources.${system} or (throw "unsupported system ${system}");
# -snld prevents "ERROR: Dangerous symbolic link path was ignored"
# -xr'!*:com.apple.*' prevents macOS extended attributes (e.g. macl or
# quarantine) being turned into real files when extracting an APFS .dmg
# (e.g. Info.plist:com.apple.macl or Info.plist:com.apple.quarantine).
# These bogus files corrupt the .app bundle and prevent it from launching.
unpackCmd = "7zz x -snld -xr'!*:com.apple.*' $curSrc";
nativeBuildInputs = [ _7zz ];
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p "$out/Applications"
cp -R OrbStack.app "$out/Applications"
mkdir -p "$out/bin"
for binary in "$out"/Applications/OrbStack.app/Contents/MacOS/{bin,xbin}/*; do
ln -s "$binary" "$out/bin/$(basename "$binary")"
done
runHook postInstall
'';
passthru = {
inherit sources;
updateScript = ./update.sh;
};
meta = {
changelog = "https://docs.orbstack.dev/release-notes#${
builtins.replaceStrings [ "." ] [ "-" ] version
}";
description = "Fast, light, and easy way to run Docker containers and Linux machines";
homepage = "https://orbstack.dev/";
license = lib.licenses.unfree;
mainProgram = "orb";
maintainers = with lib.maintainers; [ deejayem ];
platforms = lib.platforms.darwin;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils curl gawk gnugrep gnused common-updater-scripts
#shellcheck shell=bash
set -eu -o pipefail
update_arch() {
local arch="$1"
local system="$2"
local source_url
source_url="$(curl -L -I "https://orbstack.dev/download/stable/latest/$arch" | grep -i "location:" | awk '{print $2}' | tr -d '\r')"
local version
version="$(echo "$source_url" | grep -o '\([0-9]\+\.\)\{2\}[0-9]\+_[0-9]\+' | sed 's/_/-/')"
local hash
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$(nix-prefetch-url --type sha256 "$source_url")")
update-source-version orbstack "$version" "$hash" --system="$system" --source-key="sources.$system" --ignore-same-version
}
update_arch "arm64" "aarch64-darwin"
update_arch "amd64" "x86_64-darwin"
+7
View File
@@ -2,6 +2,7 @@
lib,
buildNpmPackage,
fetchFromGitHub,
nixosTests,
nodejs,
}:
@@ -36,6 +37,12 @@ buildNpmPackage rec {
runHook postInstall
'';
passthru = {
tests = {
inherit (nixosTests) pairdrop;
};
};
meta = with lib; {
description = "Local file sharing in your browser";
mainProgram = "pairdrop";
+2 -2
View File
@@ -41,12 +41,12 @@ let
in
stdenv.mkDerivation rec {
pname = "peergos";
version = "1.11.0";
version = "1.12.0";
src = fetchFromGitHub {
owner = "Peergos";
repo = "web-ui";
rev = "v${version}";
hash = "sha256-JUeNNBWzIZlC1+sc1YV+3iPg4PMt+BevG5dDi4JybPk=";
hash = "sha256-PwjSMW5d/M/IShclyFqAZJ75+dq0xSCnZmYsdKN5/O0=";
fetchSubmodules = true;
};
+36 -39
View File
@@ -5,29 +5,29 @@
cmake,
collisionSupport ? true,
console-bridge,
ctestCheckHook,
doxygen,
eigen,
example-robot-data,
fetchFromGitHub,
fetchpatch,
coal,
jrl-cmakemodules,
lib,
pkg-config,
pythonSupport ? false,
python3Packages,
stdenv,
urdfdom,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pinocchio";
version = "3.7.0";
version = "3.8.0";
src = fetchFromGitHub {
owner = "stack-of-tasks";
repo = "pinocchio";
rev = "v${finalAttrs.version}";
hash = "sha256-MykHbHSXY/eJ1+8v0hptiXeVmglU9/wImimiuByw0tE=";
hash = "sha256-2oMP653fJ7Msk+IB8whRk2L8xkAmRdDeMLPJyyD99OQ=";
};
outputs = [
@@ -35,18 +35,16 @@ stdenv.mkDerivation (finalAttrs: {
"doc"
];
# test failure, ref https://github.com/stack-of-tasks/pinocchio/issues/2277
prePatch = lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ''
substituteInPlace unittest/algorithm/utils/CMakeLists.txt \
--replace-fail "add_pinocchio_unit_test(force)" ""
'';
patches = [
# ref. https://github.com/stack-of-tasks/pinocchio/pull/2771
(fetchpatch {
name = "fix-viser-path.patch";
url = "https://github.com/stack-of-tasks/pinocchio/commit/36a04bddb6980a7bcd28ebcc55d4e442f7920d87.patch";
hash = "sha256-9oENiMmRqJLU4ZiyGojm7suqdwTDGfk56aS2kcZiGaI=";
})
];
postPatch = ''
# example-robot-data models are used in checks.
# Upstream provide them as git submodule, but we can use our own version instead.
test -d models/example-robot-data && rmdir models/example-robot-data
ln -s ${example-robot-data.src} models/example-robot-data
# allow package:// uri use in examples
export ROS_PACKAGE_PATH=${example-robot-data}/share
@@ -60,47 +58,46 @@ stdenv.mkDerivation (finalAttrs: {
cmake
doxygen
pkg-config
]
++ lib.optionals pythonSupport [
python3Packages.python
python3Packages.pythonImportsCheckHook
];
propagatedBuildInputs = [
boost
coal
console-bridge
eigen
jrl-cmakemodules
urdfdom
]
++ lib.optionals (!pythonSupport) [
boost
eigen
]
++ lib.optionals (!pythonSupport && collisionSupport) [ coal ]
++ lib.optionals pythonSupport [
python3Packages.boost
python3Packages.eigenpy
]
++ lib.optionals (pythonSupport && collisionSupport) [ python3Packages.coal ]
++ lib.optionals (!pythonSupport && casadiSupport) [ casadi ]
++ lib.optionals (pythonSupport && casadiSupport) [ python3Packages.casadi ];
++ lib.optionals collisionSupport [ coal ]
++ lib.optionals casadiSupport [ casadi ];
checkInputs = lib.optionals (pythonSupport && casadiSupport) [ python3Packages.matplotlib ];
nativeCheckInputs = [
ctestCheckHook
];
checkInputs = [
example-robot-data
];
disabledTests =
lib.optionals stdenv.hostPlatform.isDarwin [
# Disable test that fails on darwin
# https://github.com/stack-of-tasks/pinocchio/blob/42306ed023b301aafef91e2e76cb070c5e9c3f7d/flake.nix#L24C1-L27C17
"pinocchio-example-py-casadi-quadrotor-ocp"
]
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
# test failure, ref https://github.com/stack-of-tasks/pinocchio/issues/2277
"test-cpp-algorithm-utils-force"
];
cmakeFlags = [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
(lib.cmakeBool "BUILD_WITH_LIBPYTHON" pythonSupport)
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" false)
(lib.cmakeBool "BUILD_WITH_CASADI_SUPPORT" casadiSupport)
(lib.cmakeBool "BUILD_WITH_COLLISION_SUPPORT" collisionSupport)
(lib.cmakeBool "INSTALL_DOCUMENTATION" true)
# Disable test that fails on darwin
# https://github.com/stack-of-tasks/pinocchio/blob/42306ed023b301aafef91e2e76cb070c5e9c3f7d/flake.nix#L24C1-L27C17
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "--exclude-regex;pinocchio-example-py-casadi-quadrotor-ocp")
];
doCheck = true;
pythonImportsCheck = [ "pinocchio" ];
meta = {
description = "Fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives";
-79
View File
@@ -1,79 +0,0 @@
{
cmake,
doxygen,
eigenrand,
example-robot-data,
fetchFromGitHub,
fmt,
fontconfig,
graphviz,
lib,
stdenv,
pinocchio,
pkg-config,
proxsuite,
python3Packages,
pythonSupport ? false,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "proxsuite-nlp";
version = "0.11.0";
src = fetchFromGitHub {
owner = "Simple-Robotics";
repo = "proxsuite-nlp";
rev = "v${finalAttrs.version}";
hash = "sha256-ae8o0R+79qetAsc/KmvtBSVfH9695Cg4bcDBAEzKr6A=";
};
outputs = [
"out"
"doc"
];
nativeBuildInputs = [
cmake
doxygen
graphviz
pkg-config
]
++ lib.optional pythonSupport python3Packages.pythonImportsCheckHook;
checkInputs = [ eigenrand ] ++ lib.optional pythonSupport python3Packages.pytest;
propagatedBuildInputs = [
example-robot-data
fmt
]
++ lib.optionals pythonSupport [
python3Packages.pinocchio
python3Packages.proxsuite
]
++ lib.optionals (!pythonSupport) [
pinocchio
proxsuite
];
cmakeFlags = [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
(lib.cmakeBool "BUILD_WITH_PINOCCHIO_SUPPORT" true)
(lib.cmakeBool "BUILD_WITH_PROXSUITE_SUPPORT" true)
];
# Fontconfig error: Cannot load default config file: No such file: (null)
env.FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf";
# Fontconfig error: No writable cache directories
preBuild = "export XDG_CACHE_HOME=$(mktemp -d)";
doCheck = true;
pythonImportsCheck = [ "proxsuite_nlp" ];
meta = {
description = "Primal-dual augmented Lagrangian solver for nonlinear programming on manifolds";
homepage = "https://github.com/Simple-Robotics/proxsuite-nlp";
changelog = "https://github.com/Simple-Robotics/proxsuite-nlp/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ nim65s ];
platforms = lib.platforms.unix;
};
})
+7
View File
@@ -36,6 +36,13 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-1+a5tFOlEwzhGZtll35EMFceD0iUOOQCbwJd9NcFDlk=";
};
# ref. https://github.com/Simple-Robotics/proxsuite/pull/408 merged upstream
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail \
"cmake_minimum_required(VERSION 3.10)" \
"cmake_minimum_required(VERSION 3.22)"
'';
outputs = [
"doc"
"out"
+2 -2
View File
@@ -13,13 +13,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "qmapshack";
version = "1.18.0";
version = "1.18.1";
src = fetchFromGitHub {
owner = "Maproom";
repo = "qmapshack";
tag = "V_${finalAttrs.version}";
hash = "sha256-+M76EZeZOsBQ7RXtVplsrbrDgU0plRAht4/jz/GpIhM=";
hash = "sha256-uJO0WBA8/PAvO3yFE7O2Ncz801UBoL2Nf7Dv61yxQag=";
};
nativeBuildInputs = [
+29 -20
View File
@@ -1,4 +1,5 @@
{
stdenv,
fetchFromGitHub,
file,
lib,
@@ -7,6 +8,27 @@
sqlite,
zstd,
cmake,
python3,
wayland,
withPolars ? true,
withPython ? stdenv.buildPlatform == stdenv.hostPlatform,
withUi ? true,
buildFeatures ?
# enable all features except self_update by default
# https://github.com/dathere/qsv/blob/7.1.0/Cargo.toml#L370
[
"apply"
"feature_capable"
"fetch"
"foreach"
"geocode"
"luau"
"to"
]
++ lib.optional withPolars "polars"
++ lib.optional withPython "python"
++ lib.optional withUi "ui",
mainProgram ? "qsv",
}:
let
@@ -14,7 +36,7 @@ let
version = "7.1.0";
in
rustPlatform.buildRustPackage {
inherit pname version;
inherit pname version buildFeatures;
src = fetchFromGitHub {
owner = "dathere";
@@ -29,30 +51,15 @@ rustPlatform.buildRustPackage {
file
sqlite
zstd
];
]
++ lib.optional (lib.elem "ui" buildFeatures && stdenv.hostPlatform.isLinux) wayland;
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
cmake
];
buildFeatures = [
"apply"
"feature_capable"
"fetch"
"foreach"
"geocode"
"to"
];
checkFeatures = [
"apply"
"feature_capable"
"fetch"
"foreach"
"geocode"
];
]
++ lib.optional (lib.elem "python" buildFeatures) python3;
doCheck = false;
@@ -69,8 +76,10 @@ rustPlatform.buildRustPackage {
# or
unlicense
];
inherit mainProgram;
maintainers = with lib.maintainers; [
detroyejr
misuzu
];
};
}
+5
View File
@@ -0,0 +1,5 @@
{ qsv }:
qsv.override {
buildFeatures = [ "lite" ];
mainProgram = "qsvlite";
}
-119
View File
@@ -1,119 +0,0 @@
{
lib,
stdenv,
fetchFromGitea,
fetchurl,
lua,
jemalloc,
pkg-config,
tcl,
which,
ps,
getconf,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
systemd,
# dependency ordering is broken at the moment when building with openssl
tlsSupport ? !stdenv.hostPlatform.isStatic,
openssl,
# Using system jemalloc fixes cross-compilation and various setups.
# However the experimental 'active defragmentation' feature of redict requires
# their custom patched version of jemalloc.
useSystemJemalloc ? true,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "redict";
version = "7.3.6";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "redict";
repo = "redict";
tag = finalAttrs.version;
hash = "sha256-ye2uO6EQzfyonRvM0/+pVPoNZe2f9WO/2yafy52G10M=";
};
patches = lib.optionals useSystemJemalloc [
# use system jemalloc
(fetchurl {
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/redis/-/raw/102cc861713c796756abd541bf341a4512eb06e6/redis-5.0-use-system-jemalloc.patch";
hash = "sha256-VPRfoSnctkkkzLrXEWQX3Lh5HmZaCXoJafyOG007KzM=";
})
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
lua
]
++ lib.optional useSystemJemalloc jemalloc
++ lib.optional withSystemd systemd
++ lib.optionals tlsSupport [ openssl ];
preBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace src/Makefile --replace-fail "-flto" ""
'';
# More cross-compiling fixes.
makeFlags = [
"PREFIX=${placeholder "out"}"
]
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"AR=${stdenv.cc.targetPrefix}ar"
"RANLIB=${stdenv.cc.targetPrefix}ranlib"
]
++ lib.optionals withSystemd [ "USE_SYSTEMD=yes" ]
++ lib.optionals tlsSupport [ "BUILD_TLS=yes" ];
enableParallelBuilding = true;
hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ];
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ "-std=c11" ]);
# darwin currently lacks a pure `pgrep` which is extensively used here
doCheck = !stdenv.hostPlatform.isDarwin;
nativeCheckInputs = [
which
tcl
ps
]
++ lib.optionals stdenv.hostPlatform.isStatic [ getconf ];
checkPhase = ''
runHook preCheck
# disable test "Connect multiple replicas at the same time": even
# upstream find this test too timing-sensitive
substituteInPlace tests/integration/replication.tcl \
--replace-fail "foreach mdl {no yes}" "foreach mdl {}"
substituteInPlace tests/support/server.tcl \
--replace-fail "exec /usr/bin/env" "exec env"
sed -i '/^proc wait_load_handlers_disconnected/{n ; s/wait_for_condition 50 100/wait_for_condition 50 500/; }' \
tests/support/util.tcl
./runtest \
--no-latency \
--timeout 2000 \
--clients $NIX_BUILD_CORES \
--tags -leaks \
--skipunit integration/failover \
--skipunit integration/aof-multi-part
runHook postCheck
'';
meta = {
homepage = "https://redict.io";
description = "Distributed key/value store";
license = lib.licenses.lgpl3Only;
platforms = lib.platforms.all;
changelog = "https://codeberg.org/redict/redict/releases/tag/${finalAttrs.version}";
maintainers = with lib.maintainers; [ yuka ];
mainProgram = "redict-cli";
};
})
+5 -13
View File
@@ -9,23 +9,21 @@
pinocchio,
proxsuite,
stdenv,
pythonSupport ? false,
python3Packages,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tsid";
version = "1.8.0";
version = "1.9.0";
src = fetchFromGitHub {
owner = "stack-of-tasks";
repo = "tsid";
rev = "v${finalAttrs.version}";
hash = "sha256-SS6JhU4fuZtTzv/EY31ixwwLOzmO/dN3H5HEMh/URTA=";
hash = "sha256-enSYneV/Av7lF8ADdLqU1Wj2z8/ePocgecFtOBXS0EY=";
};
cmakeFlags = [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" pythonSupport)
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" false)
(lib.cmakeBool "BUILD_WITH_OSQP" true)
(lib.cmakeBool "BUILD_WITH_PROXQP" true)
(lib.cmakeBool "INSTALL_DOCUMENTATION" true)
@@ -40,22 +38,16 @@ stdenv.mkDerivation (finalAttrs: {
doxygen
cmake
pkg-config
]
++ lib.optionals pythonSupport [
python3Packages.python
python3Packages.pythonImportsCheckHook
];
propagatedBuildInputs = [
eiquadprog
osqp-eigen
pinocchio
proxsuite
]
++ lib.optional (!pythonSupport) pinocchio
++ lib.optional pythonSupport python3Packages.pinocchio;
];
doCheck = true;
pythonImportsCheck = [ "tsid" ];
meta = {
description = "Efficient Task Space Inverse Dynamics (TSID) based on Pinocchio";
+2 -2
View File
@@ -18,13 +18,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "vencord";
version = "1.13.3";
version = "1.13.4";
src = fetchFromGitHub {
owner = "Vendicated";
repo = "Vencord";
tag = "v${finalAttrs.version}";
hash = "sha256-wKLI2YE1rEzkRjDeM85XAx2DIrWYGoZrQT8OHtsNJ7E=";
hash = "sha256-NZuZ3WRHsM94PaGfikwB0Y7RRRPe+64FAfx80kRrQ1U=";
};
patches = [ ./fix-deps.patch ];
+2 -2
View File
@@ -7,14 +7,14 @@
python3Packages.buildPythonApplication rec {
pname = "virtnbdbackup";
version = "2.37";
version = "2.38";
pyproject = true;
src = fetchFromGitHub {
owner = "abbbi";
repo = "virtnbdbackup";
tag = "v${version}";
hash = "sha256-G3nDaAIWxSA6EsqiVpdouBRWprSbogcMTTroquK8Big=";
hash = "sha256-GKFMldHqIVi8PjnfYjj1nyS6hDH9ANHEm4kH9K+Al9E=";
};
build-system = with python3Packages; [
+3 -3
View File
@@ -10,16 +10,16 @@
rustPlatform.buildRustPackage (finalAttrs: {
pname = "zizmor";
version = "1.13.0";
version = "1.15.2";
src = fetchFromGitHub {
owner = "zizmorcore";
repo = "zizmor";
tag = "v${finalAttrs.version}";
hash = "sha256-D4SJFueWUUABkJeKpgVywoJcQETVKCFA9dYisFIh11I=";
hash = "sha256-fl3Z4jgeqNxNjcdYQRt02oR7nDrYPN2dhzKeBium7Ug=";
};
cargoHash = "sha256-7MKTw1XeZk4VYRA3q24iEGD/gXs+Uy0XC090kx+/Z5I=";
cargoHash = "sha256-4+1EURDrDYG4luaNV9KdRVojXY++H9LNNl2oINfWeLc=";
nativeBuildInputs = lib.optionals (stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
installShellFiles
+2 -2
View File
@@ -31,14 +31,14 @@
stdenv.mkDerivation rec {
pname = "mate-panel";
version = "1.28.6";
version = "1.28.7";
src = fetchFromGitHub {
owner = "mate-desktop";
repo = "mate-panel";
tag = "v${version}";
fetchSubmodules = true;
hash = "sha256-jfPXvb/iQGP+WwhquKtQICDUtjMhBY10YY8+dMfM8S8=";
hash = "sha256-8GS6JY5kS2YKscItAo8dzudgkZeG51JsSBUj0EfLiZQ=";
};
nativeBuildInputs = [
+3 -3
View File
@@ -27,9 +27,9 @@ let
"20.1.8".officialRelease.sha256 = "sha256-ysyB/EYxi2qE9fD5x/F2zI4vjn8UDoo1Z9ukiIrjFGw=";
"21.1.1".officialRelease.sha256 = "sha256-IB9Z3bIMwfgw2W2Vxo89CmtCM9DfOyV2Ei64nqgHrgc=";
"22.0.0-git".gitRelease = {
rev = "550b2ef041ba16ee8b5f55b5f2307f501b2c15a0";
rev-version = "22.0.0-unstable-2025-10-05";
sha256 = "sha256-K3wjvVFCjFpEDLdLWGWvAoAFGWWAKoD8a6xgXDslC7M=";
rev = "1d0a85a78b7ec7b994b280d30ca125fe58dbbd84";
rev-version = "22.0.0-unstable-2025-10-12";
sha256 = "sha256-68GnNkVPQ9NGyowndSpqqVBb/2AF9gmSwm38bjxmErQ=";
};
}
// llvmVersions;
@@ -1,4 +1,4 @@
import ./common.nix {
version = "140.3.1";
hash = "sha512-qTAtmdfwf0slCqIUY1gUlk3QgyBCaOBf6Hej2DMLnAyqbCntGdpxvYiXm3zzntUvF2mJaLDaWw10MLZ2S0O2zA==";
version = "140.4.0";
hash = "sha512-z84L3PbUWZx7lrzNn9E5C/s2RduSdqNpowdgzmgZhQqqQlGGnmvTxdhYLqNyi5IHYsXxb3zhLOFRw+dDJ7jIEQ==";
}
@@ -0,0 +1,28 @@
{
buildDunePackage,
fetchFromGitHub,
lib,
}:
buildDunePackage rec {
pname = "ubase";
version = "0.20";
minimalOCamlVersion = "4.14.0";
src = fetchFromGitHub {
owner = "sanette";
repo = "ubase";
tag = version;
sha256 = "sha256-zmYjWEk0r1h87RczCJu2tYlS79F/pAiBt16BplPmA7c=";
};
doCheck = true;
meta = {
description = "Remove accents from utf8 strings";
license = lib.licenses.gpl3;
homepage = "https://github.com/sanette/ubase";
maintainers = with lib.maintainers; [ mrdev023 ];
};
}
@@ -16,7 +16,7 @@
buildPythonPackage rec {
pname = "aioshelly";
version = "13.12.0";
version = "13.14.0";
pyproject = true;
disabled = pythonOlder "3.11";
@@ -25,7 +25,7 @@ buildPythonPackage rec {
owner = "home-assistant-libs";
repo = "aioshelly";
tag = version;
hash = "sha256-ajo7Uu9U2Xowncb4hF95Gx6YbVjTxY4a52mlU4yOy/0=";
hash = "sha256-yhmX5TFikTP9JbO089sHqm8QzC52z9f9JxK19qHhDyI=";
};
build-system = [ setuptools ];
@@ -0,0 +1,54 @@
{
lib,
toPythonModule,
pythonImportsCheckHook,
stdenv,
aligator,
crocoddyl,
pinocchio,
python,
matplotlib,
pytest,
}:
toPythonModule (
aligator.overrideAttrs (super: {
pname = "py-${super.pname}";
cmakeFlags = super.cmakeFlags ++ [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" true)
(lib.cmakeBool "BUILD_STANDALONE_PYTHON_INTERFACE" true)
];
# this is used by CMake at configure/build time
nativeBuildInputs = super.nativeBuildInputs ++ [
python
];
propagatedBuildInputs = super.propagatedBuildInputs ++ [
aligator
crocoddyl
pinocchio
];
nativeCheckInputs = [
pythonImportsCheckHook
];
checkInputs = super.checkInputs ++ [
matplotlib
pytest
];
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
# SIGTRAP
"aligator-test-py-rollout"
];
pythonImportsCheck = [
"aligator"
];
})
)
@@ -358,13 +358,13 @@
buildPythonPackage rec {
pname = "boto3-stubs";
version = "1.40.52";
version = "1.40.53";
pyproject = true;
src = fetchPypi {
pname = "boto3_stubs";
inherit version;
hash = "sha256-vSCnvJEiuxuTkZVDG50/VAse8FAQO8FyDXhpYJB0ZP0=";
hash = "sha256-LbtJZCEkoIFdJx3elrnSTNSpCMlrt7483GMbUxaaLZI=";
};
build-system = [ setuptools ];
@@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "botocore-stubs";
version = "1.40.52";
version = "1.40.53";
pyproject = true;
disabled = pythonOlder "3.7";
@@ -18,7 +18,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "botocore_stubs";
inherit version;
hash = "sha256-npgJ5WPrLJJQUdhJJXvcdgV2C8u2Kz1f4xF/k4U0VIg=";
hash = "sha256-xcui4fH7S0GUWnPN+ZmlRESB5K0AnKVNLA2WsPRzUi8=";
};
nativeBuildInputs = [ setuptools ];
@@ -0,0 +1,44 @@
{
lib,
toPythonModule,
pythonImportsCheckHook,
coal,
boost,
eigenpy,
pylatexenc,
numpy,
}:
toPythonModule (
coal.overrideAttrs (super: {
pname = "py-${super.pname}";
cmakeFlags = super.cmakeFlags ++ [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" true)
(lib.cmakeBool "BUILD_STANDALONE_PYTHON_INTERFACE" true)
];
# those are used by CMake at configure/build time
nativeBuildInputs = super.nativeBuildInputs ++ [
numpy
pylatexenc
];
propagatedBuildInputs = super.propagatedBuildInputs ++ [
boost
coal
eigenpy
];
nativeCheckInputs = [
pythonImportsCheckHook
];
pythonImportsCheck = [
"coal"
"hppfcl"
];
})
)
@@ -0,0 +1,54 @@
{
lib,
toPythonModule,
pythonImportsCheckHook,
crocoddyl,
example-robot-data,
ffmpeg,
matplotlib,
nbconvert,
nbformat,
ipykernel,
python,
scipy,
}:
toPythonModule (
crocoddyl.overrideAttrs (super: {
pname = "py-${super.pname}";
cmakeFlags = super.cmakeFlags ++ [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" true)
(lib.cmakeBool "BUILD_STANDALONE_PYTHON_INTERFACE" true)
];
# those are used by CMake at configure/build time
nativeBuildInputs = super.nativeBuildInputs ++ [
python
];
propagatedBuildInputs = super.propagatedBuildInputs ++ [
crocoddyl
example-robot-data
];
nativeCheckInputs = [
ffmpeg
pythonImportsCheckHook
];
checkInputs = [
matplotlib
nbconvert
nbformat
ipykernel
scipy
];
pythonImportsCheck = [
"crocoddyl"
];
})
)
@@ -1,14 +1,16 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
writableTmpDirAsHomeHook,
fontconfig,
# nativeBuildInputs
cmake,
doxygen,
graphviz,
pkg-config,
scipy,
# buildInputs
@@ -18,7 +20,6 @@
eigen,
jrl-cmakemodules,
numpy,
}:
buildPythonPackage rec {
@@ -47,9 +48,6 @@ buildPythonPackage rec {
strictDeps = true;
# Fontconfig error: No writable cache directories
preBuild = "export XDG_CACHE_HOME=$(mktemp -d)";
# Fontconfig error: Cannot load default config file: No such file: (null)
env.FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf";
@@ -57,7 +55,9 @@ buildPythonPackage rec {
cmake
doxygen
graphviz
pkg-config
scipy
writableTmpDirAsHomeHook
];
buildInputs = [ boost ];
@@ -68,7 +68,9 @@ buildPythonPackage rec {
numpy
];
preInstallCheck = "make test";
preInstallCheck = ''
make test
'';
pythonImportsCheck = [ "eigenpy" ];
@@ -13,7 +13,7 @@
}:
let
version = "2.17.0";
version = "2.18.0";
tag = "v${version}";
in
buildPythonPackage {
@@ -25,7 +25,7 @@ buildPythonPackage {
owner = "elevenlabs";
repo = "elevenlabs-python";
inherit tag;
hash = "sha256-nIIUMz43o3C7nMMpBnPAPFLTcK3WJyW0v4Vb29yRa88=";
hash = "sha256-FSUKKYG9cMuh4AcU6nYBtzjt+znfel3SHLRDDWPNCv8=";
};
build-system = [ poetry-core ];
@@ -20,14 +20,14 @@
buildPythonPackage rec {
pname = "env-canada";
version = "0.11.3";
version = "0.12.1";
pyproject = true;
src = fetchFromGitHub {
owner = "michaeldavie";
repo = "env_canada";
tag = "v${version}";
hash = "sha256-9sgdoHsYklszt1y63WQ4BkIGLxprILx2kh7+BmmUlqE=";
hash = "sha256-DTrlis7YDWk8SNmDBnbHk4XEu+SCrXLPLZMb5f+ynY8=";
};
build-system = [ setuptools ];
@@ -3,25 +3,26 @@
buildPythonPackage,
fetchPypi,
aiohttp,
async-timeout,
pyserial-asyncio,
pyserial-asyncio-fast,
setuptools,
}:
buildPythonPackage rec {
pname = "epson-projector";
version = "0.5.1";
format = "setuptools";
version = "0.6.0";
pyproject = true;
src = fetchPypi {
pname = "epson_projector";
inherit version;
hash = "sha256-LwsdMuwvLifIP1PRNhfLi4TTZRp/cw9Bcf57vrsNrbI=";
hash = "sha256-/9Nc3xOxnXFfTsS8s83MXTkVAhqLwrKnmfR/E87s+Bk=";
};
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
aiohttp
async-timeout
pyserial-asyncio
pyserial-asyncio-fast
];
# tests need real device
@@ -38,6 +39,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Epson projector support for Python";
homepage = "https://github.com/pszafer/epson_projector";
changelog = "https://github.com/pszafer/epson_projector/releases/tag/v.${version}";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
@@ -0,0 +1,43 @@
{
lib,
toPythonModule,
pythonImportsCheckHook,
example-robot-data,
python,
pinocchio,
}:
toPythonModule (
example-robot-data.overrideAttrs (super: {
pname = "py-${super.pname}";
cmakeFlags = super.cmakeFlags ++ [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" true)
(lib.cmakeBool "BUILD_STANDALONE_PYTHON_INTERFACE" true)
];
nativeBuildInputs = super.nativeBuildInputs ++ [
python
];
propagatedBuildInputs = super.propagatedBuildInputs ++ [
example-robot-data
pinocchio
];
nativeCheckInputs = [
pythonImportsCheckHook
];
# The package expect to find an `example-robot-data/robots` folder somewhere
# either in install prefix or in the sources
# where it can find the meshes for unit tests
preCheck = ''
ln -s source ../../example-robot-data
'';
pythonImportsCheck = [ "example_robot_data" ];
})
)
@@ -8,14 +8,14 @@
buildPythonPackage rec {
pname = "iamdata";
version = "0.1.202510151";
version = "0.1.202510161";
pyproject = true;
src = fetchFromGitHub {
owner = "cloud-copilot";
repo = "iam-data-python";
tag = "v${version}";
hash = "sha256-lP0l3U1Jdy+wpgyBUqMrd3Cm3/PdQd2WKMdaFClMhws=";
hash = "sha256-v0asi+lPYKUUo90tbZ+ZjRt0J29gwzJbRg2t7GOuHbI=";
};
build-system = [ hatchling ];
@@ -18,14 +18,14 @@
buildPythonPackage rec {
pname = "lacuscore";
version = "1.18.0";
version = "1.19.1";
pyproject = true;
src = fetchFromGitHub {
owner = "ail-project";
repo = "LacusCore";
tag = "v${version}";
hash = "sha256-+K2zfUGhjQNGIxsh3YHYAH4G3mAoysdpMnscshwl7xI=";
hash = "sha256-5cMgeZlbgK+YixHiwnolqxLUVNbfVdabtVZWZIGzjdk=";
};
pythonRelaxDeps = [
@@ -9,13 +9,13 @@
buildPythonPackage rec {
pname = "llama-index-vector-stores-milvus";
version = "0.9.2";
version = "0.9.3";
pyproject = true;
src = fetchPypi {
pname = "llama_index_vector_stores_milvus";
inherit version;
hash = "sha256-qIGFmmiet1VXkQLyy72l2ub5ePyYwozTzisVhQkWmoY=";
hash = "sha256-JiGsSKKlwV3efEkT5p3lXcEY7hCbVWRdCAX9X539Ke0=";
};
build-system = [ hatchling ];
@@ -0,0 +1,57 @@
{
lib,
toPythonModule,
pythonImportsCheckHook,
mim-solvers,
# nativeBuildInputs
python,
# propagatedBuildInputs
boost,
crocoddyl,
eigenpy,
osqp,
proxsuite,
scipy,
# nativeCheckInputs
pytest,
}:
toPythonModule (
mim-solvers.overrideAttrs (super: {
pname = "py-${super.pname}";
cmakeFlags = super.cmakeFlags ++ [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" true)
(lib.cmakeBool "BUILD_STANDALONE_PYTHON_INTERFACE" true)
];
# this is used by CMake at configure/build time
nativeBuildInputs = super.nativeBuildInputs ++ [
python
];
propagatedBuildInputs = [
boost
crocoddyl
eigenpy
mim-solvers
osqp
proxsuite
scipy
]
++ super.propagatedBuildInputs;
nativeCheckInputs = super.nativeCheckInputs ++ [
pythonImportsCheckHook
pytest
];
pythonImportsCheck = [
"mim_solvers"
];
})
)
@@ -8,14 +8,14 @@
buildPythonPackage rec {
pname = "momonga";
version = "0.1.5";
version = "0.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "nbtk";
repo = "momonga";
tag = "v${version}";
hash = "sha256-sc81L71DJq+XiIYUSMH6knfaPfV7cng/Sp0ZTY6N7ZI=";
hash = "sha256-afPTJH1cVG4Ts6k1GwTJmSZgVZa0ejUERWgNumIUkbs=";
};
build-system = [ setuptools ];
@@ -418,8 +418,8 @@ in
"sha256-Is9yMouO7WxY/P7ViK+s8Y1q8Y7KvTvY7X/H4ndeG6s=";
mypy-boto3-docdb =
buildMypyBoto3Package "docdb" "1.40.16"
"sha256-qpxQc8Zq/XAJJBKaAVFnoGlfVL/08lh+HqT2ix/UDOc=";
buildMypyBoto3Package "docdb" "1.40.53"
"sha256-yHfHczjN4v+5IoQy9WuSEGWnhKiF70xJxsxiYHj/s+Y=";
mypy-boto3-docdb-elastic =
buildMypyBoto3Package "docdb-elastic" "1.40.0"
@@ -446,8 +446,8 @@ in
"sha256-jtkx0kbI7SB74U5uWyGdVhKMlsy/T82lz3P89k8LMPA=";
mypy-boto3-ec2 =
buildMypyBoto3Package "ec2" "1.40.52"
"sha256-5X7I+IrUOxothFVyw3gPP7xCq5gPXTQplA372U6rwRc=";
buildMypyBoto3Package "ec2" "1.40.53"
"sha256-SCjXpXIBjg31/0OknDgJfBBvVCf8gUSDiuD4IGETGeA=";
mypy-boto3-ec2-instance-connect =
buildMypyBoto3Package "ec2-instance-connect" "1.40.20"
@@ -494,8 +494,8 @@ in
"sha256-9LKKt1qGw/gWS+XtNzmnjk0WOFHAmTuzkj9D3tYuMtU=";
mypy-boto3-elbv2 =
buildMypyBoto3Package "elbv2" "1.40.0"
"sha256-zxpAc7Z4Vm6Bzdq7bhdekg6HAUKe/3PXRviQ0f8p7NE=";
buildMypyBoto3Package "elbv2" "1.40.53"
"sha256-TGc78KsQ4y8QSFutN+/cj/gr2iJWi7fYh52OYFCFwho=";
mypy-boto3-emr =
buildMypyBoto3Package "emr" "1.40.0"
@@ -593,8 +593,8 @@ in
"sha256-/LlMFYC7cJWb9C5JIt0dTEPtl2sPsalSq7mYaFSf3c4=";
mypy-boto3-guardduty =
buildMypyBoto3Package "guardduty" "1.40.44"
"sha256-vOTVkra2RG5DPgcegpDij+6tjWkY01b6zXoSIze8AZ8=";
buildMypyBoto3Package "guardduty" "1.40.53"
"sha256-gTfRwvZekeaQ8V7QgepE4S+i134YQiJ1UXDTU+otVZ8=";
mypy-boto3-health =
buildMypyBoto3Package "health" "1.40.0"
@@ -801,8 +801,8 @@ in
"sha256-hp2jCL1IkXluhEyexdawQvwLfk+9pUVjKlnE9dkVnxc=";
mypy-boto3-lightsail =
buildMypyBoto3Package "lightsail" "1.40.39"
"sha256-9FTMfIe6W22GTcULfhDYsYojrXXOq30TQygctO15+24=";
buildMypyBoto3Package "lightsail" "1.40.53"
"sha256-UzFFqox5VlOBemuJ7oPybKtNx+y9yNlC9wc3r1FidEw=";
mypy-boto3-location =
buildMypyBoto3Package "location" "1.40.0"
@@ -0,0 +1,37 @@
{
lib,
toPythonModule,
pythonImportsCheckHook,
ndcurves,
boost,
pinocchio,
python,
}:
toPythonModule (
ndcurves.overrideAttrs (super: {
pname = "py-${super.pname}";
cmakeFlags = super.cmakeFlags ++ [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" true)
(lib.cmakeBool "BUILD_STANDALONE_PYTHON_INTERFACE" true)
];
# those are used by CMake at configure/build time
nativeBuildInputs = super.nativeBuildInputs ++ [
python
];
propagatedBuildInputs = [
boost
pinocchio
ndcurves
]
++ super.propagatedBuildInputs;
nativeCheckInputs = [
pythonImportsCheckHook
];
pythonImportsCheck = [
"ndcurves"
];
})
)
@@ -28,7 +28,7 @@
buildPythonPackage rec {
pname = "ocrmypdf";
version = "16.11.0";
version = "16.11.1";
pyproject = true;
src = fetchFromGitHub {
@@ -41,7 +41,7 @@ buildPythonPackage rec {
postFetch = ''
rm "$out/.git_archival.txt"
'';
hash = "sha256-seylNBl29+QxN+3SbgRUdtTo1JwvW1sODpsz7Gwer3E=";
hash = "sha256-EPGAM7hRmhKTk4NZz529yC0j5uJjB2Q/00tU1sjx1Zw=";
};
patches = [
@@ -0,0 +1,45 @@
{
lib,
toPythonModule,
pythonImportsCheckHook,
pinocchio,
coal,
casadi,
matplotlib,
python,
}:
toPythonModule (
pinocchio.overrideAttrs (super: {
pname = "py-${super.pname}";
cmakeFlags = super.cmakeFlags ++ [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" true)
(lib.cmakeBool "BUILD_STANDALONE_PYTHON_INTERFACE" true)
];
nativeBuildInputs = super.nativeBuildInputs ++ [
python
];
propagatedBuildInputs = super.propagatedBuildInputs ++ [
casadi
coal
pinocchio
];
checkInputs = super.checkInputs ++ [
matplotlib
];
nativeCheckInputs = super.nativeCheckInputs ++ [
pythonImportsCheckHook
];
pythonImportsCheck = [
"pinocchio"
];
})
)
@@ -12,14 +12,14 @@
buildPythonPackage rec {
pname = "smp";
version = "3.3.2";
version = "4.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "JPHutchins";
repo = "smp";
tag = version;
hash = "sha256-klMFJOKGSy6s16M+9wQhSvLSWdNPO/IMNdY5RW+wyFc=";
hash = "sha256-V6TGDG05sebn0IF3j0EbkozfO4X1DL3nnwrGOSh+Wuc=";
};
build-system = [
@@ -11,14 +11,14 @@
buildPythonPackage rec {
pname = "stringzilla";
version = "4.2.0";
version = "4.2.1";
pyproject = true;
src = fetchFromGitHub {
owner = "ashvardanian";
repo = "stringzilla";
tag = "v${version}";
hash = "sha256-YREm8VAO+oD/NV+vgnZo39vcPdaxY9wWwWgoOTG03QA=";
hash = "sha256-0CIekVxChvH912vFnBF2FR1YyIpxi3SD7KhBlh7yFGA=";
};
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
@@ -0,0 +1,39 @@
{
lib,
toPythonModule,
pythonImportsCheckHook,
tsid,
pinocchio,
python,
}:
toPythonModule (
tsid.overrideAttrs (super: {
pname = "py-${super.pname}";
cmakeFlags = super.cmakeFlags ++ [
(lib.cmakeBool "BUILD_PYTHON_INTERFACE" true)
(lib.cmakeBool "BUILD_STANDALONE_PYTHON_INTERFACE" true)
];
# those are used by CMake at configure/build time
nativeBuildInputs = super.nativeBuildInputs ++ [
python
];
propagatedBuildInputs = super.propagatedBuildInputs ++ [
pinocchio
tsid
];
nativeCheckInputs = [
pythonImportsCheckHook
];
pythonImportsCheck = [
"tsid"
];
})
)
@@ -0,0 +1,181 @@
diff --git a/tensilelite/Tensile/Common/Utilities.py b/tensilelite/Tensile/Common/Utilities.py
index 0a9d9db5b3..cb9779eaac 100644
--- a/tensilelite/Tensile/Common/Utilities.py
+++ b/tensilelite/Tensile/Common/Utilities.py
@@ -24,6 +24,7 @@
import functools
import math
+import operator
import os
import sys
import time
@@ -269,8 +270,20 @@ def state(obj):
def state_key_ordering(cls):
- def tup(obj):
- return tuple([getattr(obj, k) for k in cls.StateKeys])
+ # Use operator.attrgetter for efficiency if __slots__ is defined
+ if hasattr(cls, '__slots__'):
+ # attrgetter is faster for slotted classes
+ getter = operator.attrgetter(*cls.StateKeys)
+ if len(cls.StateKeys) == 1:
+ # attrgetter returns scalar for single key, we need tuple
+ def tup(obj):
+ return (getter(obj),)
+ else:
+ tup = getter
+ else:
+ # Fallback for regular classes
+ def tup(obj):
+ return tuple([getattr(obj, k) for k in cls.StateKeys])
def lt(a, b):
return tup(a) < tup(b)
diff --git a/tensilelite/Tensile/Contractions.py b/tensilelite/Tensile/Contractions.py
index c0d4e851b1..3f2c2e98c6 100644
--- a/tensilelite/Tensile/Contractions.py
+++ b/tensilelite/Tensile/Contractions.py
@@ -37,9 +37,60 @@ from Tensile.Toolchain.Component import Assembler
from math import ceil
MIN_K_FOR_GSU = 32
+
+# Interning helpers to reduce memory usage by reusing identical objects
+_free_index_cache = {}
+def intern_free_index(isA, i=None, c=None, d=None, a=None, b=None):
+ key = (isA, i, c, d, a, b)
+ if key not in _free_index_cache:
+ obj = FreeIndex(isA, i, c, d)
+ obj.a = a
+ if b is not None:
+ obj.b = b
+ _free_index_cache[key] = obj
+ return _free_index_cache[key]
+
+_batch_index_cache = {}
+def intern_batch_index(a=None, b=None, c=None, d=None):
+ key = (a, b, c, d)
+ if key not in _batch_index_cache:
+ obj = BatchIndex(c=c, d=d)
+ obj.a = a
+ obj.b = b
+ _batch_index_cache[key] = obj
+ return _batch_index_cache[key]
+
+_bound_index_cache = {}
+def intern_bound_index(a=None, b=None, aMirror=False, bMirror=False):
+ key = (a, b, aMirror, bMirror)
+ if key not in _bound_index_cache:
+ obj = BoundIndex(aMirror=aMirror, bMirror=bMirror)
+ obj.a = a
+ obj.b = b
+ _bound_index_cache[key] = obj
+ return _bound_index_cache[key]
+
+_size_mapping_cache = {}
+def intern_size_mapping(size_mapping):
+ """Intern a SizeMapping instance to reduce redundancy."""
+ # Build hashable key from StateKeys, converting lists to tuples
+ key_parts = []
+ for attr in size_mapping.StateKeys:
+ val = getattr(size_mapping, attr)
+ # Convert lists to tuples for hashing
+ if isinstance(val, list):
+ val = tuple(val)
+ key_parts.append(val)
+ key = tuple(key_parts)
+
+ if key not in _size_mapping_cache:
+ _size_mapping_cache[key] = size_mapping
+ return _size_mapping_cache[key]
+
@state_key_ordering
class FreeIndex:
StateKeys = ['isA', 'i', 'c', 'd']
+ __slots__ = ['isA', 'i', 'c', 'd', 'a', 'b']
def __init__(self, isA, i=None, c=None, d=None):
self.isA = isA
@@ -50,6 +101,7 @@ class FreeIndex:
@state_key_ordering
class BatchIndex:
StateKeys = ['a', 'b', 'c', 'd']
+ __slots__ = ['a', 'b', 'c', 'd']
def __init__(self, a=None, b=None, c=None, d=None):
self.a = a
self.b = b
@@ -59,6 +111,7 @@ class BatchIndex:
@state_key_ordering
class BoundIndex:
StateKeys = ['a', 'b', 'aMirror', 'bMirror']
+ __slots__ = ['a', 'b', 'aMirror', 'bMirror']
def __init__(self, a=None, b=None, aMirror=False, bMirror=False):
self.a = a
self.b = b
@@ -107,6 +160,23 @@ class ProblemType:
for ib, ic in enumerate(d['IndexAssignmentsB']):
indices[ic].b = ib
+ # Now intern all indices with their final state (including .a and .b)
+ for i, idx in enumerate(indices):
+ if isinstance(idx, FreeIndex):
+ indices[i] = intern_free_index(idx.isA, idx.i, idx.c, idx.d,
+ getattr(idx, 'a', None), getattr(idx, 'b', None))
+ elif isinstance(idx, BatchIndex):
+ indices[i] = intern_batch_index(getattr(idx, 'a', None), getattr(idx, 'b', None),
+ idx.c, idx.d)
+ elif isinstance(idx, BoundIndex):
+ indices[i] = intern_bound_index(getattr(idx, 'a', None), getattr(idx, 'b', None),
+ idx.aMirror, idx.bMirror)
+
+ # Update the lists with interned versions
+ freeIndices = [idx for idx in indices if isinstance(idx, FreeIndex)]
+ batchIndices = [idx for idx in indices if isinstance(idx, BatchIndex)]
+ boundIndices = [idx for idx in indices if isinstance(idx, BoundIndex)]
+
for idx in indices:
assert idx is not None
idxState = state(idx)
@@ -596,6 +666,7 @@ class SizeMapping:
'nonTemporalA',
'nonTemporalB',
]
+ __slots__ = StateKeys
@classmethod
def FromOriginalState(cls, d):
@@ -751,7 +822,7 @@ class Solution:
info = cls.ReadOriginalInfo(d)
rv.libraryLogicIndex = int(info.get("SolutionIndex", -1))
- rv.sizeMapping = SizeMapping.FromOriginalState(d)
+ rv.sizeMapping = intern_size_mapping(SizeMapping.FromOriginalState(d))
rv.internalArgsSupport = InternalArgsSupport.FromOriginalState(d)
diff --git a/tensilelite/Tensile/TensileCreateLibrary/Run.py b/tensilelite/Tensile/TensileCreateLibrary/Run.py
index 730b6b1fff..b0068563a0 100644
--- a/tensilelite/Tensile/TensileCreateLibrary/Run.py
+++ b/tensilelite/Tensile/TensileCreateLibrary/Run.py
@@ -104,7 +104,6 @@ class KernelCodeGenResult(NamedTuple):
src: str
header: Optional[str]
name: str
- targetObjFilename: str
isa: IsaVersion
wavefrontSize: int
cuoccupancy: int
@@ -127,10 +126,9 @@ def processKernelSource(kernelWriterAssembly, data, splitGSU, kernel) -> KernelC
asmFilename = getKernelFileBase(splitGSU, kernel)
err, src = kernelWriter.getSourceFileString(kernel)
header = kernelWriter.getHeaderFileString(kernel)
- objFilename = kernel._state.get("codeObjectFile", None)
pgr = int(kernel["PrefetchGlobalRead"])
return KernelCodeGenResult(
- err, src, header, asmFilename, objFilename, tuple(kernel["ISA"]), \
+ err, src, header, asmFilename, tuple(kernel["ISA"]), \
kernel["WavefrontSize"], kernel["CUOccupancy"], \
pgr, kernel["MathClocksUnrolledLoop"]
)
@@ -0,0 +1,868 @@
diff --git a/tensilelite/Tensile/SolutionStructs/Naming.py b/tensilelite/Tensile/SolutionStructs/Naming.py
index 4f220960db1d..99535e246650 100644
--- a/tensilelite/Tensile/SolutionStructs/Naming.py
+++ b/tensilelite/Tensile/SolutionStructs/Naming.py
@@ -105,7 +105,6 @@ def _getName(state, requiredParameters: frozenset, splitGSU: bool, ignoreInterna
if splitGSU:
state["GlobalSplitU"] = "M" if (state["GlobalSplitU"] > 1 or state["GlobalSplitU"] == -1) else state["GlobalSplitU"]
-
requiredParametersTemp = set(requiredParameters.union(["GlobalSplitU"]))
if ignoreInternalArgs:
diff --git a/tensilelite/Tensile/CustomYamlLoader.py b/tensilelite/Tensile/CustomYamlLoader.py
index bab8c687509..e03f456fbec 100644
--- a/tensilelite/Tensile/CustomYamlLoader.py
+++ b/tensilelite/Tensile/CustomYamlLoader.py
@@ -1,3 +1,6 @@
+# Copyright © Advanced Micro Devices, Inc., or its affiliates.
+# SPDX-License-Identifier: MIT
+
import yaml
from pathlib import Path
Author: Luna Nova <git@lunnova.dev>
Date: Sun Oct 12 11:52:10 2025 -0700
[hipblaslt] intern strings to reduce duplicate memory for solution keys
diff --git a/tensilelite/Tensile/CustomYamlLoader.py b/tensilelite/Tensile/CustomYamlLoader.py
index 685e69220c..9fdf38d8e5 100644
--- a/tensilelite/Tensile/CustomYamlLoader.py
+++ b/tensilelite/Tensile/CustomYamlLoader.py
@@ -1,6 +1,7 @@
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
+import sys
import yaml
from pathlib import Path
@@ -85,7 +86,7 @@ def parse_scalar(loader: yaml.Loader):
if not evt.style:
return None
- return value
+ return sys.intern(value)
def load_yaml_stream(yaml_path: Path, loader_type: yaml.Loader):
with open(yaml_path, 'r') as f:
diff --git a/tensilelite/Tensile/Common/Parallel.py b/tensilelite/Tensile/Common/Parallel.py
index 1a2bf9e119..f46100c7b8 100644
--- a/tensilelite/Tensile/Common/Parallel.py
+++ b/tensilelite/Tensile/Common/Parallel.py
@@ -22,43 +22,58 @@
#
################################################################################
-import concurrent.futures
-import itertools
+import multiprocessing
import os
+import re
import sys
import time
-
-from joblib import Parallel, delayed
+from functools import partial
+from typing import Any, Callable
from .Utilities import tqdm
-def joblibParallelSupportsGenerator():
- import joblib
- from packaging.version import Version
+def get_inherited_job_limit() -> int:
+ # 1. Check CMAKE_BUILD_PARALLEL_LEVEL (CMake 3.12+)
+ if 'CMAKE_BUILD_PARALLEL_LEVEL' in os.environ:
+ try:
+ return int(os.environ['CMAKE_BUILD_PARALLEL_LEVEL'])
+ except ValueError:
+ pass
- joblibVer = joblib.__version__
- return Version(joblibVer) >= Version("1.4.0")
+ # 2. Parse MAKEFLAGS for -jN
+ makeflags = os.environ.get('MAKEFLAGS', '')
+ match = re.search(r'-j\s*(\d+)', makeflags)
+ if match:
+ return int(match.group(1))
+ return -1
-def CPUThreadCount(enable=True):
- from .GlobalParameters import globalParameters
+def CPUThreadCount(enable=True):
if not enable:
return 1
- else:
+ from .GlobalParameters import globalParameters
+
+ # Priority order:
+ # 1. Inherited from build system (CMAKE_BUILD_PARALLEL_LEVEL or MAKEFLAGS)
+ # 2. Explicit --jobs flag
+ # 3. Auto-detect
+ inherited_limit = get_inherited_job_limit()
+ cpuThreads = inherited_limit if inherited_limit > 0 else globalParameters["CpuThreads"]
+
+ if cpuThreads < 1:
if os.name == "nt":
- # Windows supports at most 61 workers because the scheduler uses
- # WaitForMultipleObjects directly, which has the limit (the limit
- # is actually 64, but some handles are needed for accounting).
- cpu_count = min(os.cpu_count(), 61)
+ cpuThreads = os.cpu_count()
else:
- cpu_count = len(os.sched_getaffinity(0))
- cpuThreads = globalParameters["CpuThreads"]
- if cpuThreads == -1:
- return cpu_count
+ cpuThreads = len(os.sched_getaffinity(0))
- return min(cpu_count, cpuThreads)
+ if os.name == "nt":
+ # Windows supports at most 61 workers because the scheduler uses
+ # WaitForMultipleObjects directly, which has the limit (the limit
+ # is actually 64, but some handles are needed for accounting).
+ cpuThreads = min(cpuThreads, 61)
+ return max(1, cpuThreads)
def pcallWithGlobalParamsMultiArg(f, args, newGlobalParameters):
@@ -71,19 +86,22 @@ def pcallWithGlobalParamsSingleArg(f, arg, newGlobalParameters):
return f(arg)
-def apply_print_exception(item, *args):
- # print(item, args)
+def OverwriteGlobalParameters(newGlobalParameters):
+ from . import GlobalParameters
+
+ GlobalParameters.globalParameters.clear()
+ GlobalParameters.globalParameters.update(newGlobalParameters)
+
+
+def worker_function(args, function, multiArg):
+ """Worker function that executes in the pool process."""
try:
- if len(args) > 0:
- func = item
- args = args[0]
- return func(*args)
+ if multiArg:
+ return function(*args)
else:
- func, item = item
- return func(item)
+ return function(args)
except Exception:
import traceback
-
traceback.print_exc()
raise
finally:
@@ -98,154 +116,121 @@ def OverwriteGlobalParameters(newGlobalParameters):
GlobalParameters.globalParameters.update(newGlobalParameters)
-def ProcessingPool(enable=True, maxTasksPerChild=None):
- import multiprocessing
- import multiprocessing.dummy
-
- threadCount = CPUThreadCount()
-
- if (not enable) or threadCount <= 1:
- return multiprocessing.dummy.Pool(1)
-
- if multiprocessing.get_start_method() == "spawn":
- from . import GlobalParameters
-
- return multiprocessing.Pool(
- threadCount,
- initializer=OverwriteGlobalParameters,
- maxtasksperchild=maxTasksPerChild,
- initargs=(GlobalParameters.globalParameters,),
- )
- else:
- return multiprocessing.Pool(threadCount, maxtasksperchild=maxTasksPerChild)
+def progress_logger(iterable, total, message, min_log_interval=5.0):
+ """
+ Generator that wraps an iterable and logs progress with time-based throttling.
+ Only logs progress if at least min_log_interval seconds have passed since last log.
+ Only prints completion message if task took >= min_log_interval seconds.
-def ParallelMap(function, objects, message="", enable=True, method=None, maxTasksPerChild=None):
+ Yields (index, item) tuples.
"""
- Generally equivalent to list(map(function, objects)), possibly executing in parallel.
-
- message: A message describing the operation to be performed.
- enable: May be set to false to disable parallelism.
- method: A function which can fetch the mapping function from a processing pool object.
- Leave blank to use .map(), other possiblities:
- - `lambda x: x.starmap` - useful if `function` takes multiple parameters.
- - `lambda x: x.imap` - lazy evaluation
- - `lambda x: x.imap_unordered` - lazy evaluation, does not preserve order of return value.
- """
- from .GlobalParameters import globalParameters
+ start_time = time.time()
+ last_log_time = start_time
+ log_interval = 1 + (total // 100)
- threadCount = CPUThreadCount(enable)
- pool = ProcessingPool(enable, maxTasksPerChild)
-
- if threadCount <= 1 and globalParameters["ShowProgressBar"]:
- # Provide a progress bar for single-threaded operation.
- # This works for method=None, and for starmap.
- mapFunc = map
- if method is not None:
- # itertools provides starmap which can fill in for pool.starmap. It provides imap on Python 2.7.
- # If this works, we will use it, otherwise we will fallback to the "dummy" pool for single threaded
- # operation.
- try:
- mapFunc = method(itertools)
- except NameError:
- mapFunc = None
-
- if mapFunc is not None:
- return list(mapFunc(function, tqdm(objects, message)))
-
- mapFunc = pool.map
- if method:
- mapFunc = method(pool)
-
- objects = zip(itertools.repeat(function), objects)
- function = apply_print_exception
-
- countMessage = ""
- try:
- countMessage = " for {} tasks".format(len(objects))
- except TypeError:
- pass
+ for idx, item in enumerate(iterable):
+ if idx % log_interval == 0:
+ current_time = time.time()
+ if (current_time - last_log_time) >= min_log_interval:
+ print(f"{message}\t{idx+1: 5d}/{total: 5d}")
+ last_log_time = current_time
+ yield idx, item
- if message != "":
- message += ": "
+ elapsed = time.time() - start_time
+ final_idx = idx + 1 if 'idx' in locals() else 0
- print("{0}Launching {1} threads{2}...".format(message, threadCount, countMessage))
- sys.stdout.flush()
- currentTime = time.time()
- rv = mapFunc(function, objects)
- totalTime = time.time() - currentTime
- print("{0}Done. ({1:.1f} secs elapsed)".format(message, totalTime))
- sys.stdout.flush()
- pool.close()
- return rv
+ if elapsed >= min_log_interval or last_log_time > start_time:
+ print(f"{message} done in {elapsed:.1f}s!\t{final_idx: 5d}/{total: 5d}")
-def ParallelMapReturnAsGenerator(function, objects, message="", enable=True, multiArg=True):
- from .GlobalParameters import globalParameters
+def imap_with_progress(pool, func, iterable, total, message, chunksize):
+ results = []
+ for _, result in progress_logger(pool.imap(func, iterable, chunksize=chunksize), total, message):
+ results.append(result)
+ return results
- threadCount = CPUThreadCount(enable)
- print("{0}Launching {1} threads...".format(message, threadCount))
- if threadCount <= 1 and globalParameters["ShowProgressBar"]:
- # Provide a progress bar for single-threaded operation.
- callFunc = lambda args: function(*args) if multiArg else lambda args: function(args)
- return [callFunc(args) for args in tqdm(objects, message)]
+def _ParallelMap_generator(worker, objects, objLen, message, chunksize, threadCount, globalParameters, maxtasksperchild):
+ # separate fn because yield makes the entire fn a generator even if unreachable
+ ctx = multiprocessing.get_context('forkserver' if os.name != 'nt' else 'spawn')
- with concurrent.futures.ProcessPoolExecutor(max_workers=threadCount) as executor:
- resultFutures = (executor.submit(function, *arg if multiArg else arg) for arg in objects)
- for result in concurrent.futures.as_completed(resultFutures):
- yield result.result()
+ with ctx.Pool(processes=threadCount, maxtasksperchild=maxtasksperchild,
+ initializer=OverwriteGlobalParameters, initargs=(globalParameters,)) as pool:
+ for _, result in progress_logger(pool.imap_unordered(worker, objects, chunksize=chunksize), objLen, message):
+ yield result
def ParallelMap2(
- function, objects, message="", enable=True, multiArg=True, return_as="list", procs=None
+ function: Callable,
+ objects: Any,
+ message: str = "",
+ enable: bool = True,
+ multiArg: bool = True,
+ minChunkSize: int = 1,
+ maxWorkers: int = -1,
+ maxtasksperchild: int = 1024,
+ return_as: str = "list"
):
+ """Executes a function over a list of objects in parallel or sequentially.
+
+ This function is generally equivalent to ``list(map(function, objects))``. However, it provides
+ additional functionality to run in parallel, depending on the 'enable' flag and available CPU
+ threads.
+
+ Args:
+ function: The function to apply to each item in 'objects'. If 'multiArg' is True, 'function'
+ should accept multiple arguments.
+ objects: An iterable of objects to be processed by 'function'. If 'multiArg' is True, each
+ item in 'objects' should be an iterable of arguments for 'function'.
+ message: Optional; a message describing the operation. Default is an empty string.
+ enable: Optional; if False, disables parallel execution and runs sequentially. Default is True.
+ multiArg: Optional; if True, treats each item in 'objects' as multiple arguments for
+ 'function'. Default is True.
+ return_as: Optional; "list" (default) or "generator_unordered" for streaming results
+
+ Returns:
+ A list or generator containing the results of applying **function** to each item in **objects**.
"""
- Generally equivalent to list(map(function, objects)), possibly executing in parallel.
+ from .GlobalParameters import globalParameters
- message: A message describing the operation to be performed.
- enable: May be set to false to disable parallelism.
- multiArg: True if objects represent multiple arguments
- (differentiates multi args vs single collection arg)
- """
- if return_as in ("generator", "generator_unordered") and not joblibParallelSupportsGenerator():
- return ParallelMapReturnAsGenerator(function, objects, message, enable, multiArg)
+ threadCount = CPUThreadCount(enable)
- from .GlobalParameters import globalParameters
+ if not hasattr(objects, "__len__"):
+ objects = list(objects)
- threadCount = procs if procs else CPUThreadCount(enable)
+ objLen = len(objects)
+ if objLen == 0:
+ return [] if return_as == "list" else iter([])
- threadCount = CPUThreadCount(enable)
+ f = (lambda x: function(*x)) if multiArg else function
+ if objLen == 1:
+ print(f"{message}: (1 task)")
+ result = [f(x) for x in objects]
+ return result if return_as == "list" else iter(result)
- if threadCount <= 1 and globalParameters["ShowProgressBar"]:
- # Provide a progress bar for single-threaded operation.
- return [function(*args) if multiArg else function(args) for args in tqdm(objects, message)]
+ extra_message = (
+ f": {threadCount} thread(s)" + f", {objLen} tasks"
+ if objLen
+ else ""
+ )
- countMessage = ""
- try:
- countMessage = " for {} tasks".format(len(objects))
- except TypeError:
- pass
-
- if message != "":
- message += ": "
- print("{0}Launching {1} threads{2}...".format(message, threadCount, countMessage))
- sys.stdout.flush()
- currentTime = time.time()
-
- pcall = pcallWithGlobalParamsMultiArg if multiArg else pcallWithGlobalParamsSingleArg
- pargs = zip(objects, itertools.repeat(globalParameters))
-
- if joblibParallelSupportsGenerator():
- rv = Parallel(n_jobs=threadCount, timeout=99999, return_as=return_as)(
- delayed(pcall)(function, a, params) for a, params in pargs
- )
+ print(f"ParallelMap {message}{extra_message}")
+
+ if threadCount <= 1:
+ result = [f(x) for x in objects]
+ return result if return_as == "list" else iter(result)
+
+ if maxWorkers > 0:
+ threadCount = min(maxWorkers, threadCount)
+
+ chunksize = max(minChunkSize, objLen // 2000)
+ worker = partial(worker_function, function=function, multiArg=multiArg)
+ if return_as == "generator_unordered":
+ # yield results as they complete without buffering
+ return _ParallelMap_generator(worker, objects, objLen, message, chunksize, threadCount, globalParameters, maxtasksperchild)
else:
- rv = Parallel(n_jobs=threadCount, timeout=99999)(
- delayed(pcall)(function, a, params) for a, params in pargs
- )
-
- totalTime = time.time() - currentTime
- print("{0}Done. ({1:.1f} secs elapsed)".format(message, totalTime))
- sys.stdout.flush()
- return rv
+ ctx = multiprocessing.get_context('forkserver' if os.name != 'nt' else 'spawn')
+ with ctx.Pool(processes=threadCount, maxtasksperchild=maxtasksperchild,
+ initializer=OverwriteGlobalParameters, initargs=(globalParameters,)) as pool:
+ return list(imap_with_progress(pool, worker, objects, objLen, message, chunksize))
diff --git a/tensilelite/Tensile/CustomKernels.py b/tensilelite/Tensile/CustomKernels.py
index ffceb636f5..127b3386a1 100644
--- a/tensilelite/Tensile/CustomKernels.py
+++ b/tensilelite/Tensile/CustomKernels.py
@@ -24,7 +24,9 @@
from . import CUSTOM_KERNEL_PATH
from Tensile.Common.ValidParameters import checkParametersAreValid, validParameters, newMIValidParameters
+from Tensile.CustomYamlLoader import DEFAULT_YAML_LOADER
+from functools import lru_cache
import yaml
import os
@@ -58,10 +60,13 @@ def getCustomKernelConfigAndAssembly(name, directory=CUSTOM_KERNEL_PATH):
return (config, assembly)
+# getCustomKernelConfig will get called repeatedly on the same file
+# 20x logic loading speedup for aquavanjaram_Cijk_Ailk_Bljk_F8NH_HHS_BH_Bias_HAS_SAB_SAV_freesize_custom_GSUs
+@lru_cache
def readCustomKernelConfig(name, directory=CUSTOM_KERNEL_PATH):
rawConfig, _ = getCustomKernelConfigAndAssembly(name, directory)
try:
- return yaml.safe_load(rawConfig)["custom.config"]
+ return yaml.load(rawConfig, Loader=DEFAULT_YAML_LOADER)["custom.config"]
except yaml.scanner.ScannerError as e:
raise RuntimeError("Failed to read configuration for custom kernel: {0}\nDetails:\n{1}".format(name, e))
diff --git a/tensilelite/Tensile/TensileCreateLibrary/Run.py b/tensilelite/Tensile/TensileCreateLibrary/Run.py
index 835ed9c019..024c6c49c1 100644
--- a/tensilelite/Tensile/TensileCreateLibrary/Run.py
+++ b/tensilelite/Tensile/TensileCreateLibrary/Run.py
@@ -26,8 +26,10 @@ import rocisa
import functools
import glob
+import gc
import itertools
import os
+import resource
import shutil
from pathlib import Path
from timeit import default_timer as timer
@@ -78,6 +80,25 @@ from Tensile.Utilities.Decorators.Timing import timing
from .ParseArguments import parseArguments
+def getMemoryUsage():
+ """Get peak and current memory usage in MB."""
+ rusage = resource.getrusage(resource.RUSAGE_SELF)
+ peak_memory_mb = rusage.ru_maxrss / 1024 # KB to MB on Linux
+
+ # Get current memory from /proc/self/status
+ current_memory_mb = 0
+ try:
+ with open('/proc/self/status') as f:
+ for line in f:
+ if line.startswith('VmRSS:'):
+ current_memory_mb = int(line.split()[1]) / 1024 # KB to MB
+ break
+ except:
+ current_memory_mb = peak_memory_mb # Fallback
+
+ return (peak_memory_mb, current_memory_mb)
+
+
class KernelCodeGenResult(NamedTuple):
err: int
src: str
@@ -115,6 +136,29 @@ def processKernelSource(kernelWriterAssembly, data, splitGSU, kernel) -> KernelC
)
+def processAndAssembleKernelTCL(kernelWriterAssembly, rocisa_data, splitGSU, kernel, assemblyTmpPath, assembler):
+ """
+ Pipeline function for TCL mode that:
+ 1. Generates kernel source
+ 2. Writes .s file to disk
+ 3. Assembles to .o file
+ 4. Deletes .s file
+ """
+ result = processKernelSource(kernelWriterAssembly, rocisa_data, splitGSU, kernel)
+ return writeAndAssembleKernel(result, assemblyTmpPath, assembler)
+
+
+def writeMasterSolutionLibrary(name_lib_tuple, newLibraryDir, splitGSU, libraryFormat):
+ """
+ Write a master solution library to disk.
+ Module-level function to support multiprocessing.
+ """
+ name, lib = name_lib_tuple
+ filename = os.path.join(newLibraryDir, name)
+ lib.applyNaming(splitGSU)
+ LibraryIO.write(filename, state(lib), libraryFormat)
+
+
def removeInvalidSolutionsAndKernels(results, kernels, solutions, errorTolerant, printLevel: bool, splitGSU: bool):
removeKernels = []
removeKernelNames = []
@@ -189,6 +233,24 @@ def writeAssembly(asmPath: Union[Path, str], result: KernelCodeGenResult):
return path, isa, wfsize, minResult
+def writeAndAssembleKernel(result: KernelCodeGenResult, asmPath: Union[Path, str], assembler):
+ """Write assembly file and immediately assemble it to .o file"""
+ if result.err:
+ printExit(f"Failed to build kernel {result.name} because it has error code {result.err}")
+
+ path = Path(asmPath) / f"{result.name}.s"
+ with open(path, "w", encoding="utf-8") as f:
+ f.write(result.src)
+
+ # Assemble .s -> .o
+ assembler(isaToGfx(result.isa), result.wavefrontSize, str(path), str(path.with_suffix(".o")))
+
+ # Delete assembly file immediately to save disk space
+ path.unlink()
+
+ return KernelMinResult(result.err, result.cuoccupancy, result.pgr, result.mathclk)
+
+
def writeHelpers(
outputPath, kernelHelperObjs, KERNEL_HELPER_FILENAME_CPP, KERNEL_HELPER_FILENAME_H
):
@@ -268,13 +330,14 @@ def writeSolutionsAndKernels(
numAsmKernels = len(asmKernels)
numKernels = len(asmKernels)
assert numKernels == numAsmKernels, "Only assembly kernels are supported in TensileLite"
- asmIter = zip(
- itertools.repeat(kernelWriterAssembly),
- itertools.repeat(rocisa.rocIsa.getInstance().getData()),
- itertools.repeat(splitGSU),
- asmKernels
+
+ processKernelFn = functools.partial(
+ processKernelSource,
+ kernelWriterAssembly=kernelWriterAssembly,
+ data=rocisa.rocIsa.getInstance().getData(),
+ splitGSU=splitGSU
)
- asmResults = ParallelMap2(processKernelSource, asmIter, "Generating assembly kernels", return_as="list")
+ asmResults = ParallelMap2(processKernelFn, asmKernels, "Generating assembly kernels", return_as="list", multiArg=False)
removeInvalidSolutionsAndKernels(
asmResults, asmKernels, solutions, errorTolerant, getVerbosity(), splitGSU
)
@@ -282,19 +345,21 @@ def writeSolutionsAndKernels(
asmResults, asmKernels, solutions, splitGSU
)
- def assemble(ret):
- p, isa, wavefrontsize, result = ret
- asmToolchain.assembler(isaToGfx(isa), wavefrontsize, str(p), str(p.with_suffix(".o")))
-
- unaryWriteAssembly = functools.partial(writeAssembly, assemblyTmpPath)
- compose = lambda *F: functools.reduce(lambda f, g: lambda x: f(g(x)), F)
+ # Use functools.partial to bind assemblyTmpPath and assembler
+ writeAndAssembleFn = functools.partial(
+ writeAndAssembleKernel,
+ asmPath=assemblyTmpPath,
+ assembler=asmToolchain.assembler
+ )
ret = ParallelMap2(
- compose(assemble, unaryWriteAssembly),
+ writeAndAssembleFn,
asmResults,
"Writing assembly kernels",
return_as="list",
multiArg=False,
)
+ del asmResults
+ gc.collect()
writeHelpers(outputPath, kernelHelperObjs, KERNEL_HELPER_FILENAME_CPP, KERNEL_HELPER_FILENAME_H)
srcKernelFile = Path(outputPath) / "Kernels.cpp"
@@ -369,32 +434,31 @@ def writeSolutionsAndKernelsTCL(
uniqueAsmKernels = [k for k in asmKernels if not k.duplicate]
- def assemble(ret):
- p, isa, wavefrontsize, result = ret
- asmToolchain.assembler(isaToGfx(isa), wavefrontsize, str(p), str(p.with_suffix(".o")))
- return result
-
- unaryProcessKernelSource = functools.partial(
- processKernelSource,
+ processKernelFn = functools.partial(
+ processAndAssembleKernelTCL,
kernelWriterAssembly,
rocisa.rocIsa.getInstance().getData(),
splitGSU,
+ assemblyTmpPath=assemblyTmpPath,
+ assembler=asmToolchain.assembler
)
- unaryWriteAssembly = functools.partial(writeAssembly, assemblyTmpPath)
- compose = lambda *F: functools.reduce(lambda f, g: lambda x: f(g(x)), F)
- ret = ParallelMap2(
- compose(assemble, unaryWriteAssembly, unaryProcessKernelSource),
+ results = ParallelMap2(
+ processKernelFn,
uniqueAsmKernels,
"Generating assembly kernels",
multiArg=False,
return_as="list"
)
+ del processKernelFn
+ gc.collect()
+
passPostKernelInfoToSolution(
- ret, uniqueAsmKernels, solutions, splitGSU
+ results, uniqueAsmKernels, solutions, splitGSU
)
- # result.src is very large so let garbage collector know to clean up
- del ret
+ del results
+ gc.collect()
+
buildAssemblyCodeObjectFiles(
asmToolchain.linker,
asmToolchain.bundler,
@@ -493,6 +557,15 @@ def generateKernelHelperObjects(solutions: List[Solution], cxxCompiler: str, isa
return sorted(khos, key=sortByEnum, reverse=True) # Ensure that we write Enum kernel helpers are first in list
+def libraryIter(lib: MasterSolutionLibrary):
+ if len(lib.solutions):
+ for i, s in enumerate(lib.solutions.items()):
+ yield (i, *s)
+ else:
+ for _, lazyLib in lib.lazyLibraries.items():
+ yield from libraryIter(lazyLib)
+
+
@timing
def generateLogicDataAndSolutions(logicFiles, args, assembler: Assembler, isaInfoMap):
@@ -508,26 +581,23 @@ def generateLogicDataAndSolutions(logicFiles, args, assembler: Assembler, isaInf
printSolutionRejectionReason = True
printIndexAssignmentInfo = False
- fIter = zip(
- logicFiles,
- itertools.repeat(assembler),
- itertools.repeat(splitGSU),
- itertools.repeat(printSolutionRejectionReason),
- itertools.repeat(printIndexAssignmentInfo),
- itertools.repeat(isaInfoMap),
- itertools.repeat(args["LazyLibraryLoading"]),
+ parseLogicFn = functools.partial(
+ LibraryIO.parseLibraryLogicFile,
+ assembler=assembler,
+ splitGSU=splitGSU,
+ printSolutionRejectionReason=printSolutionRejectionReason,
+ printIndexAssignmentInfo=printIndexAssignmentInfo,
+ isaInfoMap=isaInfoMap,
+ lazyLibraryLoading=args["LazyLibraryLoading"]
)
- def libraryIter(lib: MasterSolutionLibrary):
- if len(lib.solutions):
- for i, s in enumerate(lib.solutions.items()):
- yield (i, *s)
- else:
- for _, lazyLib in lib.lazyLibraries.items():
- yield from libraryIter(lazyLib)
-
for library in ParallelMap2(
- LibraryIO.parseLibraryLogicFile, fIter, "Loading Logics...", return_as="generator_unordered"
+ parseLogicFn, logicFiles, "Loading Logics...",
+ return_as="generator_unordered",
+ minChunkSize=24,
+ maxWorkers=32,
+ maxtasksperchild=1,
+ multiArg=False,
):
_, architectureName, _, _, _, newLibrary = library
@@ -539,6 +609,9 @@ def generateLogicDataAndSolutions(logicFiles, args, assembler: Assembler, isaInf
else:
masterLibraries[architectureName] = newLibrary
masterLibraries[architectureName].version = args["CodeObjectVersion"]
+ del library, newLibrary
+
+ gc.collect()
# Sort masterLibraries to make global soln index values deterministic
solnReIndex = 0
@@ -734,6 +807,9 @@ def run():
)
stop_wsk = timer()
print(f"Time to generate kernels (s): {(stop_wsk-start_wsk):3.2f}")
+ numKernelHelperObjs = len(kernelHelperObjs)
+ del kernelWriterAssembly, kernelHelperObjs
+ gc.collect()
archs = [ # is this really different than the other archs above?
isaToGfx(arch)
@@ -751,13 +827,10 @@ def run():
if kName not in solDict:
solDict["%s"%kName] = kernel
- def writeMsl(name, lib):
- filename = os.path.join(newLibraryDir, name)
- lib.applyNaming(splitGSU)
- LibraryIO.write(filename, state(lib), arguments["LibraryFormat"])
-
filename = os.path.join(newLibraryDir, "TensileLiteLibrary_lazy_Mapping")
LibraryIO.write(filename, libraryMapping, "msgpack")
+ del libraryMapping
+ gc.collect()
start_msl = timer()
for archName, newMasterLibrary in masterLibraries.items():
@@ -774,12 +847,22 @@ def run():
kName = getKeyNoInternalArgs(s.originalSolution, splitGSU)
s.sizeMapping.CUOccupancy = solDict["%s"%kName]["CUOccupancy"]
- ParallelMap2(writeMsl,
+ writeFn = functools.partial(
+ writeMasterSolutionLibrary,
+ newLibraryDir=newLibraryDir,
+ splitGSU=splitGSU,
+ libraryFormat=arguments["LibraryFormat"]
+ )
+
+ ParallelMap2(writeFn,
newMasterLibrary.lazyLibraries.items(),
"Writing master solution libraries",
+ multiArg=False,
return_as="list")
stop_msl = timer()
print(f"Time to write master solution libraries (s): {(stop_msl-start_msl):3.2f}")
+ del masterLibraries, solutions, kernels, solDict
+ gc.collect()
if not arguments["KeepBuildTmp"]:
buildTmp = Path(arguments["OutputPath"]).parent / "library" / "build_tmp"
@@ -796,8 +879,11 @@ def run():
print("")
stop = timer()
+ peak_memory_mb, current_memory_mb = getMemoryUsage()
print(f"Total time (s): {(stop-start):3.2f}")
print(f"Total kernels processed: {numKernels}")
print(f"Kernels processed per second: {(numKernels/(stop-start)):3.2f}")
- print(f"KernelHelperObjs: {len(kernelHelperObjs)}")
+ print(f"KernelHelperObjs: {numKernelHelperObjs}")
+ print(f"Peak memory usage (MB): {peak_memory_mb:,.1f}")
+ print(f"Current memory usage (MB): {current_memory_mb:,.1f}")
diff --git a/tensilelite/Tensile/TensileMergeLibrary.py b/tensilelite/Tensile/TensileMergeLibrary.py
index e33c617b6f..ba163e9918 100644
--- a/tensilelite/Tensile/TensileMergeLibrary.py
+++ b/tensilelite/Tensile/TensileMergeLibrary.py
@@ -303,8 +303,7 @@ def avoidRegressions(originalDir, incrementalDir, outputPath, forceMerge, noEff=
logicsFiles[origFile] = origFile
logicsFiles[incFile] = incFile
- iters = zip(logicsFiles.keys())
- logicsList = ParallelMap2(loadData, iters, "Loading Logics...", return_as="list")
+ logicsList = ParallelMap2(loadData, logicsFiles.keys(), "Loading Logics...", return_as="list", multiArg=False)
logicsDict = {}
for i, _ in enumerate(logicsList):
logicsDict[logicsList[i][0]] = logicsList[i][1]
diff --git a/tensilelite/Tensile/TensileUpdateLibrary.py b/tensilelite/Tensile/TensileUpdateLibrary.py
index 5ff265d0ed..c1803a6349 100644
--- a/tensilelite/Tensile/TensileUpdateLibrary.py
+++ b/tensilelite/Tensile/TensileUpdateLibrary.py
@@ -26,7 +26,7 @@ from . import LibraryIO
from .Tensile import addCommonArguments, argUpdatedGlobalParameters
from .Common import assignGlobalParameters, print1, restoreDefaultGlobalParameters, HR, \
- globalParameters, architectureMap, ensurePath, ParallelMap, __version__
+ globalParameters, architectureMap, ensurePath, ParallelMap2, __version__
import argparse
import copy
@@ -149,7 +149,7 @@ def TensileUpdateLibrary(userArgs):
for logicFile in logicFiles:
print("# %s" % logicFile)
fIter = zip(logicFiles, itertools.repeat(args.logic_path), itertools.repeat(outputPath))
- libraries = ParallelMap(UpdateLogic, fIter, "Updating logic files", method=lambda x: x.starmap)
+ libraries = ParallelMap2(UpdateLogic, fIter, "Updating logic files", multiArg=True, return_as="list")
def main():
diff --git a/tensilelite/Tensile/Toolchain/Assembly.py b/tensilelite/Tensile/Toolchain/Assembly.py
index a8b91e8d62..265e1d532c 100644
--- a/tensilelite/Tensile/Toolchain/Assembly.py
+++ b/tensilelite/Tensile/Toolchain/Assembly.py
@@ -30,7 +30,7 @@ import subprocess
from pathlib import Path
from typing import List, Union, NamedTuple
-from Tensile.Common import print2
+from Tensile.Common import print1, print2
from Tensile.Common.Architectures import isaToGfx
from ..SolutionStructs import Solution
@@ -92,8 +92,26 @@ def buildAssemblyCodeObjectFiles(
if coName:
coFileMap[asmDir / (coName + extCoRaw)].add(str(asmDir / (kernel["BaseName"] + extObj)))
+ # Build reference count map for .o files to handle shared object files
+ # (.o files from kernels marked .duplicate in TensileCreateLibrary)
+ objFileRefCount = collections.Counter()
+ for coFileRaw, objFiles in coFileMap.items():
+ for objFile in objFiles:
+ objFileRefCount[objFile] += 1
+
+ sharedObjFiles = {objFile: count for objFile, count in objFileRefCount.items() if count > 1}
+ if sharedObjFiles:
+ print1(f"Found {len(sharedObjFiles)} .o files shared across multiple code objects:")
+
for coFileRaw, objFiles in coFileMap.items():
linker(objFiles, str(coFileRaw))
+
+ # Delete .o files after linking once usage count reaches 0
+ for objFile in objFiles:
+ objFileRefCount[objFile] -= 1
+ if objFileRefCount[objFile] == 0:
+ Path(objFile).unlink()
+
coFile = destDir / coFileRaw.name.replace(extCoRaw, extCo)
if compress:
bundler.compress(str(coFileRaw), str(coFile), gfx)
diff --git a/tensilelite/Tensile/Toolchain/Component.py b/tensilelite/Tensile/Toolchain/Component.py
index 67fa35e2d8..dde83af4c3 100644
--- a/tensilelite/Tensile/Toolchain/Component.py
+++ b/tensilelite/Tensile/Toolchain/Component.py
@@ -355,6 +355,7 @@ class Linker(Component):
when invoking the linker, LLVM allows the provision of arguments via a "response file"
Reference: https://llvm.org/docs/CommandLine.html#response-files
"""
+ # FIXME: this prevents threading as clang_args.txt is overwritten
with open(Path.cwd() / "clang_args.txt", "wt") as file:
file.write(" ".join(srcPaths).replace('\\', '\\\\') if os_name == "nt" else " ".join(srcPaths))
return [*(self.default_args), "-o", destPath, "@clang_args.txt"]
diff --git a/tensilelite/requirements.txt b/tensilelite/requirements.txt
index 60c4c11445..5c8fd66a88 100644
--- a/tensilelite/requirements.txt
+++ b/tensilelite/requirements.txt
@@ -2,8 +2,6 @@ dataclasses; python_version == '3.6'
packaging
pyyaml
msgpack
-joblib>=1.4.0; python_version >= '3.8'
-joblib>=1.1.1; python_version < '3.8'
simplejson
ujson
orjson
@@ -22,6 +22,7 @@
ncurses,
ninja,
libffi,
jemalloc,
zlib,
zstd,
rocmUpdateScript,
@@ -54,7 +55,6 @@ let
ps.setuptools
ps.packaging
ps.nanobind
ps.joblib
ps.msgpack
]);
# workaround: build for one working target if no targets are supported
@@ -86,6 +86,8 @@ stdenv.mkDerivation (finalAttrs: {
env.ROCM_PATH = "${clr}";
env.TENSILE_ROCM_ASSEMBLER_PATH = lib.getExe' clr "amdclang++";
env.TENSILE_GEN_ASSEMBLY_TOOLCHAIN = lib.getExe' clr "amdclang++";
env.LD_PRELOAD = "${jemalloc}/lib/libjemalloc.so";
env.MALLOC_CONF = "background_thread:true,metadata_thp:auto,dirty_decay_ms:10000,muzzy_decay_ms:10000";
requiredSystemFeatures = [ "big-parallel" ];
__structuredAttrs = true;
@@ -111,9 +113,10 @@ stdenv.mkDerivation (finalAttrs: {
# Support loading zstd compressed .dat files, required to keep output under
# hydra size limit
./messagepack-compression-support.patch
# excessive comments are written to temporary asm files in build dir
# TODO: report upstream, find a better solution
./reduce-comment-spam.patch
# [hipblaslt] Refactor Parallel.py to drop joblib, massively reduce peak disk space usage
# https://github.com/ROCm/rocm-libraries/pull/2073
./TensileCreateLibrary-refactor.patch
./Tensile-interning.patch
];
postPatch = ''
@@ -125,7 +128,7 @@ stdenv.mkDerivation (finalAttrs: {
'';
doCheck = false;
doInstallCheck = false;
doInstallCheck = true;
nativeBuildInputs = [
cmake
@@ -136,6 +139,7 @@ stdenv.mkDerivation (finalAttrs: {
pkg-config
ninja
rocm-smi
zstd
];
buildInputs = [
@@ -154,7 +158,6 @@ stdenv.mkDerivation (finalAttrs: {
msgpack-cxx
libxml2
python3Packages.msgpack
python3Packages.joblib
zlib
zstd
]
@@ -212,6 +215,18 @@ stdenv.mkDerivation (finalAttrs: {
rmdir $out/bin
'';
installCheckPhase =
# Verify compression worked and .dat files aren't huge
''
runHook preInstallCheck
find "$out" -type f -name "*.dat" -size "+2M" -exec sh -c '
echo "ERROR: oversized .dat file, check for issues with install compression: {}" >&2
exit 1
' {} \;
echo "Verified .dat files in $out are not huge"
runHook postInstallCheck
'';
# If this is false there are no kernels in the output lib
# supporting the target device
# so if it's an optional dep it's best to not depend on it
@@ -1,47 +0,0 @@
diff --git a/projects/hipblaslt/tensilelite/rocisa/rocisa/include/format.hpp b/projects/hipblaslt/tensilelite/rocisa/rocisa/include/format.hpp
index b7dcb6f59a..b0625ba769 100644
--- a/tensilelite/rocisa/rocisa/include/format.hpp
+++ b/tensilelite/rocisa/rocisa/include/format.hpp
@@ -8,11 +8,13 @@ namespace rocisa
// Text format functions
inline std::string slash(const std::string& comment)
{
+ return "";
return "// " + comment + "\n";
}
inline std::string slash50(const std::string& comment)
{
+ return "";
std::ostringstream oss;
oss << std::setw(50) << ""
<< " // " << comment << "\n";
@@ -21,16 +23,19 @@ namespace rocisa
inline std::string block(const std::string& comment)
{
+ return "";
return "/* " + comment + " */\n";
}
inline std::string blockNewLine(const std::string& comment)
{
+ return "";
return "\n/* " + comment + " */\n";
}
inline std::string block3Line(const std::string& comment)
{
+ return "";
std::ostringstream oss;
oss << "\n/******************************************/\n";
std::istringstream iss(comment);
@@ -52,7 +57,7 @@ namespace rocisa
{
formattedStr = "\"" + formattedStr + "\\n\\t\"";
}
- if(!comment.empty())
+ if(false)
{
std::string buffer = formattedStr
+ std::string(std::max(0, 50 - int(formattedStr.length())), ' ')
@@ -15,14 +15,14 @@ let
variants = {
# ./update-xanmod.sh lts
lts = {
version = "6.12.51";
hash = "sha256-7fIOQ7VctDhueoOnZA8/7Dc7gxAl+vKgO/X5Oa4Z8kE=";
version = "6.12.53";
hash = "sha256-BhaWUdfCgIvD0LA69I1NVIW0rv6JWQs+7HNLxOkrmGc=";
isLTS = true;
};
# ./update-xanmod.sh main
main = {
version = "6.16.11";
hash = "sha256-EZjH22q8JvlbFpab4rdrA24kf+r9heneiwy5YM4WfYk=";
version = "6.17.3";
hash = "sha256-VL1SCMB89P0UcCbtPdkjxcCZqQZpnSTlzzf9e8uzkyA=";
};
};
@@ -6,16 +6,16 @@
buildGoModule rec {
pname = "prom2json";
version = "1.4.2";
version = "1.5.0";
src = fetchFromGitHub {
rev = "v${version}";
owner = "prometheus";
repo = "prom2json";
sha256 = "sha256-3A26xMXJv2MMpFoc0zKZdSLg9WCueIsKdRdyM2NsUJw=";
sha256 = "sha256-Zd3p1anHleKAkFcHEx7tgpxjTlb5OvdWXFNNyfJ63+w=";
};
vendorHash = "sha256-2XZYc6byupFTR2HCAVSL3wLYWwuzkkhqegzZRTakcgI=";
vendorHash = "sha256-PZXuhPpO02ix88RtBpsGaQxgQNVn+LW09rrN66+mCpw=";
meta = with lib; {
description = "Tool to scrape a Prometheus client and dump the result as JSON";
+1
View File
@@ -2289,6 +2289,7 @@ mapAliases {
rapidjson-unstable = lib.warnOnInstantiate "'rapidjson-unstable' has been renamed to 'rapidjson'" rapidjson; # Added 2024-07-28
rargs = throw "'rargs' has been removed due to lack of upstream maintenance"; # Added 2025-01-25
rebazel = throw "'rebazel' has been removed due to lack of upstream maintenance"; # Added 2025-01-26
redict = throw "'redict' has been removed due to lack of nixpkgs maintenance and a slow upstream development pace. Consider using 'valkey'."; # Added 2025-10-16
redoc-cli = throw "'redoc-cli' been removed because it has been marked as broken since at least November 2024. Consider using 'redocly' instead."; # Added 2025-10-01
redocly-cli = redocly; # Added 2024-04-14
redpanda = redpanda-client; # Added 2023-10-14
+2
View File
@@ -2091,6 +2091,8 @@ let
### U ###
ubase = callPackage ../development/ocaml-modules/ubase { };
uchar = callPackage ../development/ocaml-modules/uchar { };
uecc = callPackage ../development/ocaml-modules/uecc { };
+10 -55
View File
@@ -594,12 +594,7 @@ self: super: with self; {
algebraic-data-types = callPackage ../development/python-modules/algebraic-data-types { };
aligator = toPythonModule (
pkgs.aligator.override {
python3Packages = self;
pythonSupport = true;
}
);
aligator = callPackage ../development/python-modules/aligator { inherit (pkgs) aligator; };
alive-progress = callPackage ../development/python-modules/alive-progress { };
@@ -2774,12 +2769,7 @@ self: super: with self; {
co2signal = callPackage ../development/python-modules/co2signal { };
coal = toPythonModule (
pkgs.coal.override {
pythonSupport = true;
python3Packages = self;
}
);
coal = callPackage ../development/python-modules/coal { inherit (pkgs) coal; };
coapthon3 = callPackage ../development/python-modules/coapthon3 { };
@@ -3113,12 +3103,7 @@ self: super: with self; {
crochet = callPackage ../development/python-modules/crochet { };
crocoddyl = toPythonModule (
pkgs.crocoddyl.override {
pythonSupport = true;
python3Packages = self;
}
);
crocoddyl = callPackage ../development/python-modules/crocoddyl { inherit (pkgs) crocoddyl; };
cron-converter = callPackage ../development/python-modules/cron-converter { };
@@ -4903,12 +4888,9 @@ self: super: with self; {
ewmhlib = callPackage ../development/python-modules/ewmhlib { };
example-robot-data = toPythonModule (
pkgs.example-robot-data.override {
pythonSupport = true;
python3Packages = self;
}
);
example-robot-data = callPackage ../development/python-modules/example-robot-data {
inherit (pkgs) example-robot-data;
};
exceptiongroup = callPackage ../development/python-modules/exceptiongroup { };
@@ -9372,12 +9354,7 @@ self: super: with self; {
millheater = callPackage ../development/python-modules/millheater { };
mim-solvers = toPythonModule (
pkgs.mim-solvers.override {
python3Packages = self;
pythonSupport = true;
}
);
mim-solvers = callPackage ../development/python-modules/mim-solvers { inherit (pkgs) mim-solvers; };
minari = callPackage ../development/python-modules/minari { };
@@ -10384,12 +10361,7 @@ self: super: with self; {
nclib = callPackage ../development/python-modules/nclib { };
ndcurves = toPythonModule (
pkgs.ndcurves.override {
python3Packages = self;
pythonSupport = true;
}
);
ndcurves = callPackage ../development/python-modules/ndcurves { inherit (pkgs) ndcurves; };
ndeflib = callPackage ../development/python-modules/ndeflib { };
@@ -11840,12 +11812,7 @@ self: super: with self; {
ping3 = callPackage ../development/python-modules/ping3 { };
pinocchio = toPythonModule (
pkgs.pinocchio.override {
pythonSupport = true;
python3Packages = self;
}
);
pinocchio = callPackage ../development/python-modules/pinocchio { inherit (pkgs) pinocchio; };
pins = callPackage ../development/python-modules/pins { };
@@ -12304,13 +12271,6 @@ self: super: with self; {
}
);
proxsuite-nlp = toPythonModule (
pkgs.proxsuite-nlp.override {
pythonSupport = true;
python3Packages = self;
}
);
proxy-db = callPackage ../development/python-modules/proxy-db { };
proxy-py = callPackage ../development/python-modules/proxy-py { };
@@ -18850,12 +18810,7 @@ self: super: with self; {
tsfresh = callPackage ../development/python-modules/tsfresh { };
tsid = toPythonModule (
pkgs.tsid.override {
pythonSupport = true;
python3Packages = self;
}
);
tsid = callPackage ../development/python-modules/tsid { inherit (pkgs) tsid; };
tskit = callPackage ../development/python-modules/tskit { };