diff --git a/maintainers/github-teams.json b/maintainers/github-teams.json index 6296c340ca8b..6e794d09bd5f 100644 --- a/maintainers/github-teams.json +++ b/maintainers/github-teams.json @@ -292,7 +292,6 @@ "mdarocha": 11572618 }, "members": { - "GGG-KILLER": 5892127, "IvarWithoutBones": 41924494, "JamieMagee": 1358764, "anpin": 6060545, @@ -592,6 +591,8 @@ "7c6f434c": 1891350, "Shados": 338268, "khaneliman": 1778670, + "lolbinarycat": 19915050, + "mrcjkb": 12857160, "spencerpogo": 34356756 }, "name": "lua" diff --git a/nixos/modules/services/misc/docker-registry.nix b/nixos/modules/services/misc/docker-registry.nix index d6d8df3b2baf..860128aa163f 100644 --- a/nixos/modules/services/misc/docker-registry.nix +++ b/nixos/modules/services/misc/docker-registry.nix @@ -28,20 +28,6 @@ let }; }; - registryConfig.redis = lib.mkIf cfg.enableRedisCache { - addr = "${cfg.redisUrl}"; - password = "${cfg.redisPassword}"; - db = 0; - dialtimeout = "10ms"; - readtimeout = "10ms"; - writetimeout = "10ms"; - pool = { - maxidle = 16; - maxactive = 64; - idletimeout = "300s"; - }; - }; - configFile = cfg.configFile; in { @@ -139,6 +125,22 @@ in }; config = lib.mkIf cfg.enable { + services.dockerRegistry.extraConfig = lib.mkIf cfg.enableRedisCache { + redis = { + addr = "${cfg.redisUrl}"; + password = "${cfg.redisPassword}"; + db = 0; + dialtimeout = "10ms"; + readtimeout = "10ms"; + writetimeout = "10ms"; + pool = { + maxidle = 16; + maxactive = 64; + idletimeout = "300s"; + }; + }; + }; + systemd.services.docker-registry = { description = "Docker Container Registry"; wantedBy = [ "multi-user.target" ]; diff --git a/nixos/tests/docker-registry.nix b/nixos/tests/docker-registry.nix index d30c48132d89..0599e2d978db 100644 --- a/nixos/tests/docker-registry.nix +++ b/nixos/tests/docker-registry.nix @@ -53,7 +53,7 @@ client2.succeed("docker images | grep scratch") client2.succeed( - "curl -fsS -X DELETE registry:8080/v2/scratch/manifests/$(curl -fsS -I -H\"Accept: application/vnd.docker.distribution.manifest.v2+json\" registry:8080/v2/scratch/manifests/latest | grep Docker-Content-Digest | sed -e 's/Docker-Content-Digest: //' | tr -d '\\r')" + "curl -fsS -X DELETE registry:8080/v2/scratch/manifests/$(curl -fsS -I -H\"Accept: application/vnd.oci.image.manifest.v1+json\" registry:8080/v2/scratch/manifests/latest | grep Docker-Content-Digest | sed -e 's/Docker-Content-Digest: //' | tr -d '\\r')" ) registry.systemctl("start docker-registry-garbage-collect.service") diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 5119c7def0bf..68bccf2ae7e9 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -833,11 +833,11 @@ "vendorHash": "sha256-SJUlHerlt7Z3g1UJ7QKoCwEYolKL7SZp2O537poje3I=" }, "launchdarkly_launchdarkly": { - "hash": "sha256-sFCms2grd7R52ILnRhVubLSEBTaeryS5WBL6+rcTZ/k=", + "hash": "sha256-DCc+qQdVVDdFiHaDv6jc4MUuWPemk3XEeBEKAbTUi7M=", "homepage": "https://registry.terraform.io/providers/launchdarkly/launchdarkly", "owner": "launchdarkly", "repo": "terraform-provider-launchdarkly", - "rev": "v2.28.0", + "rev": "v2.29.0", "spdx": "MPL-2.0", "vendorHash": "sha256-OgKOjLwDQxJiv+VWdOzjMcUDPu9LOuhyTRyLyM39vLM=" }, @@ -869,13 +869,13 @@ "vendorHash": "sha256-vcuUt3WIo1TnLApch410JgtyCzliQRYMQQQ2Z9diDZ8=" }, "lxc_incus": { - "hash": "sha256-apgSFI+NgIGEnYAJifwN5X9eIrrdy7Xti83YGdu2bPU=", + "hash": "sha256-m3xUqIUvowu+SZ7TxXYKjOv0Th/Pah0MXVAdaaSPeCo=", "homepage": "https://registry.terraform.io/providers/lxc/incus", "owner": "lxc", "repo": "terraform-provider-incus", - "rev": "v1.0.2", + "rev": "v1.1.0", "spdx": "MPL-2.0", - "vendorHash": "sha256-6CoEZz7/8PysjolcTsrBKForJkoOQqgERYX8g5PeoMY=" + "vendorHash": "sha256-vTJXA7vHVE/m68gr1nHInGs/2T/4OzwS6T3BAAJ+ATo=" }, "marcofranssen_dexidp": { "hash": "sha256-Aby3FNEA6LgsGM/N10LNu9sCv3f2N8WIrmWoqEqTa8E=", diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index ddd307563367..2f75079ead55 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -201,7 +201,13 @@ lib.extendMkDerivation { urls_ = let - u = lib.lists.filter (url: lib.isString url) (map rewriteURL preRewriteUrls); + u = lib.lists.concatMap ( + url: + let + rewritten = rewriteURL url; + in + if lib.isString rewritten then [ rewritten ] else [ ] + ) preRewriteUrls; in if u == [ ] then throw "urls is empty after rewriteURL (was ${toString preRewriteUrls})" else u; diff --git a/pkgs/by-name/bc/bcachefs-tools/package.nix b/pkgs/by-name/bc/bcachefs-tools/package.nix index 9fc72267d488..faa4c82fbc70 100644 --- a/pkgs/by-name/bc/bcachefs-tools/package.nix +++ b/pkgs/by-name/bc/bcachefs-tools/package.nix @@ -5,6 +5,7 @@ pkg-config, libuuid, libsodium, + libunwind, keyutils, kmod, liburcu, @@ -29,18 +30,18 @@ stdenv.mkDerivation (finalAttrs: { pname = "bcachefs-tools"; - version = "1.38.2"; + version = "1.38.3"; src = fetchFromGitHub { owner = "koverstreet"; repo = "bcachefs-tools"; tag = "v${finalAttrs.version}"; - hash = "sha256-zUrvqds6gkqZLV5BbwZDf+IsClNn8CwiC4VdAUO2CWY="; + hash = "sha256-DR/aGCfqXUOubVEVmeJYOiF71rMYRYq8k23EXqluh5k="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) src; - hash = "sha256-vk5nI8CPYp9ux984yiFWRdOGWrabx/VWPNlgihuLCMM="; + hash = "sha256-aiLSgpK3wadrBvclrQrdCzCiSjLcxg58oeP6ijL+JbY="; }; postPatch = '' @@ -66,6 +67,7 @@ stdenv.mkDerivation (finalAttrs: { keyutils lz4 libsodium + libunwind liburcu libuuid zstd diff --git a/pkgs/by-name/ca/canfigger/package.nix b/pkgs/by-name/ca/canfigger/package.nix index f7f6ad629a23..331c0783a90a 100644 --- a/pkgs/by-name/ca/canfigger/package.nix +++ b/pkgs/by-name/ca/canfigger/package.nix @@ -8,13 +8,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "canfigger"; - version = "0.3.1"; + version = "0.3.2"; src = fetchFromGitHub { owner = "andy5995"; repo = "canfigger"; rev = "v${finalAttrs.version}"; - hash = "sha256-JphvLdBQPOu3a9DNlXTOkQyL0eFLM3FCvGZLPSvbKtA="; + hash = "sha256-vqNfakpouoQGKFCyNsn4Cney0UXVYBMCJhwEhaIGPrI="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/dd/ddnet/package.nix b/pkgs/by-name/dd/ddnet/package.nix index ff19ad0993ee..d28885b64238 100644 --- a/pkgs/by-name/dd/ddnet/package.nix +++ b/pkgs/by-name/dd/ddnet/package.nix @@ -15,7 +15,6 @@ libogg, libx11, opusfile, - pcre, python3, SDL2, sqlite, @@ -62,7 +61,6 @@ stdenv.mkDerivation rec { buildInputs = [ curl libnotify - pcre python3 sqlite ] diff --git a/pkgs/by-name/le/ledfx/package.nix b/pkgs/by-name/le/ledfx/package.nix index 41be9fd655f8..bb65c4e9071e 100644 --- a/pkgs/by-name/le/ledfx/package.nix +++ b/pkgs/by-name/le/ledfx/package.nix @@ -6,14 +6,14 @@ python3.pkgs.buildPythonApplication (finalAttrs: { pname = "ledfx"; - version = "2.1.0"; + version = "2.1.8"; pyproject = true; src = fetchFromGitHub { owner = "LedFx"; repo = "LedFx"; tag = "v${finalAttrs.version}"; - hash = "sha256-N9EHK0GVohFCjEKsm3g4h+4XWfzZO1tzdd2z5IN1YjI="; + hash = "sha256-le3SEGI9uis7wx9+SFpn0BJbpCybSecXEcxxAkC910U="; }; postPatch = '' @@ -28,6 +28,7 @@ python3.pkgs.buildPythonApplication (finalAttrs: { pythonRemoveDeps = [ # not packaged "rpi-ws281x" + "xled" ]; build-system = with python3.pkgs; [ @@ -41,7 +42,8 @@ python3.pkgs.buildPythonApplication (finalAttrs: { cffi aiohttp aiohttp-cors - aubio + aubio-ledfx + cython certifi multidict openrgb-python @@ -54,21 +56,25 @@ python3.pkgs.buildPythonApplication (finalAttrs: { sacn sentry-sdk sounddevice - samplerate icmplib voluptuous zeroconf pillow flux-led + lifx-async python-osc pybase64 mss uvloop stupidartnet python-dotenv - vnoise + pyfastnoiselite netifaces2 packaging + samplerate-ledfx + audio-hotplug + aiosendspin + pyflac ]; optional-dependencies = { @@ -76,8 +82,16 @@ python3.pkgs.buildPythonApplication (finalAttrs: { }; nativeCheckInputs = with python3.pkgs; [ - pytestCheckHook + lifx-emulator-core pytest-asyncio + pytest-order + pytest-timeout + pytestCheckHook + ]; + + disabledTests = [ + # requires internet + "TestURLDownloadWithExternalURL" ]; meta = { diff --git a/pkgs/by-name/ll/llmfit/package.nix b/pkgs/by-name/ll/llmfit/package.nix index 32aac6b8f44c..fba0dec40493 100644 --- a/pkgs/by-name/ll/llmfit/package.nix +++ b/pkgs/by-name/ll/llmfit/package.nix @@ -6,16 +6,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "llmfit"; - version = "0.9.18"; + version = "0.9.23"; src = fetchFromGitHub { owner = "AlexsJones"; repo = "llmfit"; tag = "v${finalAttrs.version}"; - hash = "sha256-0NswrJNA6IPqL5RaZyVyMc4p6UI7ZiWnjlnyTC4nW6o="; + hash = "sha256-KtmXNlKPz4W2hfLa1iTPUVrocEjXWfTcoMwcznV4ZEk="; }; - cargoHash = "sha256-pI3n53GSyM/HDyZ4frFzDENthupmCMC2aQOERVBMUJ4="; + cargoHash = "sha256-fx9/LVZrbwfGL03Xv53q4FaC6obKadZWesj4SfMvG78="; meta = { description = "TUI to find LLM models right sized for the system's RAM, CPU, and GPU"; diff --git a/pkgs/by-name/pd/pdfcpu/package.nix b/pkgs/by-name/pd/pdfcpu/package.nix index 38f4f4b51726..7a55adc0ed1f 100644 --- a/pkgs/by-name/pd/pdfcpu/package.nix +++ b/pkgs/by-name/pd/pdfcpu/package.nix @@ -9,13 +9,13 @@ buildGoModule (finalAttrs: { pname = "pdfcpu"; - version = "0.12.0"; + version = "0.12.1"; src = fetchFromGitHub { owner = "pdfcpu"; repo = "pdfcpu"; tag = "v${finalAttrs.version}"; - hash = "sha256-qCSfcxeMM7HzJIaeZJxjUVc834NmigpDKaxFQ0oSdkg="; + hash = "sha256-xAWzn32evg3PmHlevL38P06zOof3a4mmLmNuFfO2gAU="; # Apparently upstream requires that the compiled executable will know the # commit hash and the date of the commit. This information is also presented # in the output of `pdfcpu version` which we use as a sanity check in the diff --git a/pkgs/by-name/pl/plasma-panel-spacer-extended/package.nix b/pkgs/by-name/pl/plasma-panel-spacer-extended/package.nix index f6c16f5023e5..c4633c65946c 100644 --- a/pkgs/by-name/pl/plasma-panel-spacer-extended/package.nix +++ b/pkgs/by-name/pl/plasma-panel-spacer-extended/package.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "plasma-panel-spacer-extended"; - version = "1.15.0"; + version = "1.16.0"; src = fetchFromGitHub { owner = "luisbocanegra"; repo = "plasma-panel-spacer-extended"; tag = "v${finalAttrs.version}"; - hash = "sha256-ivfIlZvr7OOXa/zyrorcUPaaFU6IcS2L3yFiX29jnd4="; + hash = "sha256-HmRCdOpwTs9WOnMkzVeB/YjPO+FjD04VpMp0l7Re2XU="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/sc/scraper/package.nix b/pkgs/by-name/sc/scraper/package.nix index c9d77ae81f19..330d9316f9ed 100644 --- a/pkgs/by-name/sc/scraper/package.nix +++ b/pkgs/by-name/sc/scraper/package.nix @@ -9,16 +9,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "scraper"; - version = "0.26.0"; + version = "0.27.0"; src = fetchFromGitHub { owner = "rust-scraper"; repo = "scraper"; tag = "v${finalAttrs.version}"; - hash = "sha256-gdxE9vkN9y5KCmPF0IzSodgxKyWTzYHuLrIMFu4To1E="; + hash = "sha256-6gCoF+Uafw0WISuksBh4kwF7TL6N73Y8CpkcKe8Nyqw="; }; - cargoHash = "sha256-xpg5/ZZEUVNLHGJsbpb/m9TRUJS6wb2HOIoPt407+q0="; + cargoHash = "sha256-Mse6pO9VXturMxMpPe3zaNTsvRpADdns1zu/pX4mfgE="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/by-name/so/socalabs-voc/package.nix b/pkgs/by-name/so/socalabs-voc/package.nix index d1f7e6501f43..51c2e57714bb 100644 --- a/pkgs/by-name/so/socalabs-voc/package.nix +++ b/pkgs/by-name/so/socalabs-voc/package.nix @@ -30,13 +30,13 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "socalabs-voc"; - version = "1.1.1"; + version = "1.1.5"; src = fetchFromGitHub { owner = "FigBug"; repo = "Voc"; tag = "v${finalAttrs.version}"; - hash = "sha256-wLO/855JkpCN7BL5/V7bZJa4d9MvnfYrTC3d+0p1+F4="; + hash = "sha256-t9z+qnboGfHUcOp9WmfWXG7ss8VTkz8cv5qUMy//3AE="; fetchSubmodules = true; preFetch = '' # can't clone using ssh diff --git a/pkgs/by-name/te/telegraf/package.nix b/pkgs/by-name/te/telegraf/package.nix index 79011e7a8d80..09adb69afd7c 100644 --- a/pkgs/by-name/te/telegraf/package.nix +++ b/pkgs/by-name/te/telegraf/package.nix @@ -10,7 +10,7 @@ buildGoModule (finalAttrs: { pname = "telegraf"; - version = "1.38.3"; + version = "1.38.4"; subPackages = [ "cmd/telegraf" ]; @@ -18,10 +18,10 @@ buildGoModule (finalAttrs: { owner = "influxdata"; repo = "telegraf"; rev = "v${finalAttrs.version}"; - hash = "sha256-euWz4v9Xd4mjs0K6q+iU2pmyxybQdjhvsSKiVgC1Qmc="; + hash = "sha256-sd0kZz2R+DusoBH6J2B3DRJmwaWYNWiIJ2QsOq8Y+3g="; }; - vendorHash = "sha256-gCeGFjVRHD5LgFylWUETrCPR8rYO03sGyQVyQYhDHYM="; + vendorHash = "sha256-ZBAeuDF2SgqZx2XeoE3yN8Q6fVj8/zjtU7GogF/Z1Kg="; proxyVendor = true; ldflags = [ diff --git a/pkgs/development/compilers/gcc/all.nix b/pkgs/development/compilers/gcc/all.nix index 26fa34c03c30..e47e31a1b5f2 100644 --- a/pkgs/development/compilers/gcc/all.nix +++ b/pkgs/development/compilers/gcc/all.nix @@ -9,10 +9,13 @@ isl_0_20, noSysDirs, wrapCC, -}@args: +}: let versions = import ./versions.nix; + buildIsHost = lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform; + buildIsTarget = lib.systems.equals stdenv.buildPlatform stdenv.targetPlatform; + hostIsTarget = lib.systems.equals stdenv.hostPlatform stdenv.targetPlatform; gccForMajorMinorVersion = majorMinorVersion: let @@ -24,18 +27,13 @@ let callPackage ./default.nix { inherit noSysDirs; inherit majorMinorVersion; + _systemInfo = { + inherit buildIsHost hostIsTarget; + }; reproducibleBuild = true; profiledCompiler = false; - libcCross = - if !lib.systems.equals stdenv.targetPlatform stdenv.buildPlatform then - targetPackages.libc or pkgs.libc - else - null; - threadsCross = - if !lib.systems.equals stdenv.targetPlatform stdenv.buildPlatform then - targetPackages.threads or pkgs.threads - else - { }; + libcCross = if !buildIsTarget then targetPackages.libc or pkgs.libc else null; + threadsCross = if !buildIsTarget then targetPackages.threads or pkgs.threads else { }; isl = if stdenv.hostPlatform.isDarwin then null else isl_0_20; # do not allow version skew when cross-building gcc # @@ -56,13 +54,7 @@ let # Let's fix both problems by requiring the same compiler version for # cross-case. stdenv = - if - ( - (!lib.systems.equals stdenv.targetPlatform stdenv.buildPlatform) - || (!lib.systems.equals stdenv.hostPlatform stdenv.targetPlatform) - ) - && stdenv.cc.isGNU - then + if (!buildIsTarget || !hostIsTarget) && stdenv.cc.isGNU then overrideCC stdenv buildPackages."gcc${majorVersion}" else stdenv; diff --git a/pkgs/development/compilers/gcc/common/builder.nix b/pkgs/development/compilers/gcc/common/builder.nix index edd28a26ce95..e1e8a96ea8a3 100644 --- a/pkgs/development/compilers/gcc/common/builder.nix +++ b/pkgs/development/compilers/gcc/common/builder.nix @@ -3,11 +3,12 @@ stdenv, enableMultilib, targetConfig, + hostIsTarget, }: let forceLibgccToBuildCrtStuff = import ./libgcc-buildstuff.nix { inherit lib stdenv; }; - isCross = !lib.systems.equals stdenv.targetPlatform stdenv.hostPlatform; + isCross = !hostIsTarget; in # We don't support multilib and cross at the same time diff --git a/pkgs/development/compilers/gcc/common/checksum.nix b/pkgs/development/compilers/gcc/common/checksum.nix index a283d281c9ed..45c5e4340305 100644 --- a/pkgs/development/compilers/gcc/common/checksum.nix +++ b/pkgs/development/compilers/gcc/common/checksum.nix @@ -5,17 +5,12 @@ langC, langCC, runtimeShell, + buildIsHost, + hostIsTarget, }: let - enableChecksum = - ( - with stdenv; - lib.systems.equals buildPlatform hostPlatform && lib.systems.equals hostPlatform targetPlatform - ) - && langC - && langCC - && !stdenv.hostPlatform.isDarwin; + enableChecksum = buildIsHost && hostIsTarget && langC && langCC && !stdenv.hostPlatform.isDarwin; in ( pkg: diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index e2c735c0751f..66099c229743 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -32,7 +32,8 @@ langObjCpp, langJit, langRust ? false, - disableBootstrap ? (!lib.systems.equals stdenv.targetPlatform stdenv.hostPlatform), + hostIsTarget, + disableBootstrap ? (!hostIsTarget), }: assert !enablePlugin -> disableGdbPlugin; @@ -48,7 +49,6 @@ assert !enablePlugin -> disableGdbPlugin; let inherit (stdenv) - buildPlatform hostPlatform targetPlatform ; @@ -56,9 +56,8 @@ let # See https://github.com/NixOS/nixpkgs/pull/209870#issuecomment-1500550903 disableBootstrap' = disableBootstrap && !langFortran && !langGo; - crossMingw = (!lib.systems.equals targetPlatform hostPlatform) && targetPlatform.isMinGW; - crossDarwin = - (!lib.systems.equals targetPlatform hostPlatform) && targetPlatform.libc == "libSystem"; + crossMingw = !hostIsTarget && targetPlatform.isMinGW; + crossDarwin = !hostIsTarget && targetPlatform.libc == "libSystem"; crossConfigureFlags = # Ensure that -print-prog-name is able to find the correct programs. @@ -247,20 +246,18 @@ let ++ lib.optional (isl != null) "--with-isl=${isl}" # Ada options, gcc can't build the runtime library for a cross compiler - ++ lib.optional langAda ( - if lib.systems.equals hostPlatform targetPlatform then "--enable-libada" else "--disable-libada" - ) + ++ lib.optional langAda (if hostIsTarget then "--enable-libada" else "--disable-libada") ++ import ../common/platform-flags.nix { inherit (stdenv) targetPlatform; inherit lib; } - ++ lib.optionals (!lib.systems.equals targetPlatform hostPlatform) crossConfigureFlags + ++ lib.optionals (!hostIsTarget) crossConfigureFlags ++ lib.optional disableBootstrap' "--disable-bootstrap" # Platform-specific flags ++ lib.optional ( - lib.systems.equals targetPlatform hostPlatform && targetPlatform.isx86_32 + hostIsTarget && targetPlatform.isx86_32 ) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}" ++ lib.optional (targetPlatform.isNetBSD || targetPlatform.isCygwin) "--disable-libssp" # Provided by libc. ++ lib.optionals hostPlatform.isSunOS [ @@ -277,7 +274,7 @@ let lib.optional (targetPlatform.libc == "musl") # musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865 "--disable-libmpx" - ++ lib.optionals (lib.systems.equals targetPlatform hostPlatform && targetPlatform.libc == "musl") [ + ++ lib.optionals (hostIsTarget && targetPlatform.libc == "musl") [ "--disable-libsanitizer" "--disable-symvers" "libat_cv_have_ifunc=no" diff --git a/pkgs/development/compilers/gcc/common/dependencies.nix b/pkgs/development/compilers/gcc/common/dependencies.nix index c9e85c0d99fb..9d8feadde99e 100644 --- a/pkgs/development/compilers/gcc/common/dependencies.nix +++ b/pkgs/development/compilers/gcc/common/dependencies.nix @@ -27,11 +27,13 @@ cargo, withoutTargetLibc ? null, threadsCross ? null, + buildIsHost, + hostIsTarget, }: let inherit (lib) optionals; - inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (stdenv) buildPlatform targetPlatform; in { @@ -56,12 +58,12 @@ in # same for all gcc's depsBuildTarget = ( - if lib.systems.equals hostPlatform buildPlatform then + if buildIsHost then [ targetPackages.stdenv.cc.bintools # newly-built gcc will be used ] else - assert lib.systems.equals targetPlatform hostPlatform; + assert hostIsTarget; [ # build != host == target stdenv.cc diff --git a/pkgs/development/compilers/gcc/common/extra-target-flags.nix b/pkgs/development/compilers/gcc/common/extra-target-flags.nix index 437a015dbf7b..fa078b87ff67 100644 --- a/pkgs/development/compilers/gcc/common/extra-target-flags.nix +++ b/pkgs/development/compilers/gcc/common/extra-target-flags.nix @@ -4,12 +4,9 @@ withoutTargetLibc, libcCross, threadsCross, + hostIsTarget, }: -let - inherit (stdenv) hostPlatform targetPlatform; -in - { # For non-cross builds these flags are currently assigned in builder.sh. # It would be good to consolidate the generation of makeFlags @@ -18,7 +15,7 @@ in let mkFlags = dep: - lib.optionals ((!lib.systems.equals targetPlatform hostPlatform) && dep != null) ( + lib.optionals (!hostIsTarget && dep != null) ( [ "-O2 -idirafter ${lib.getDev dep}${dep.incdir or "/include"}" ] @@ -35,7 +32,7 @@ in let mkFlags = dep: - lib.optionals ((!lib.systems.equals targetPlatform hostPlatform) && dep != null) ( + lib.optionals (!hostIsTarget && dep != null) ( [ "-Wl,-L${lib.getLib dep}${dep.libdir or "/lib"}" ] diff --git a/pkgs/development/compilers/gcc/common/libgcc.nix b/pkgs/development/compilers/gcc/common/libgcc.nix index c9f6a7793344..d937775d54f0 100644 --- a/pkgs/development/compilers/gcc/common/libgcc.nix +++ b/pkgs/development/compilers/gcc/common/libgcc.nix @@ -10,6 +10,7 @@ hostPlatform, withoutTargetLibc, libcCross, + hostIsTarget, }: assert !stdenv.targetPlatform.hasSharedLibraries -> !enableShared; @@ -24,27 +25,20 @@ lib.pipe drv pkg: pkg.overrideAttrs ( previousAttrs: - lib.optionalAttrs - ( - (!lib.systems.equals targetPlatform hostPlatform) - && (enableShared || targetPlatform.isMinGW) - && withoutTargetLibc - ) - { - makeFlags = [ - "all-gcc" - "all-target-libgcc" - ]; - installTargets = "install-gcc install-target-libgcc"; - } + lib.optionalAttrs (!hostIsTarget && (enableShared || targetPlatform.isMinGW) && withoutTargetLibc) { + makeFlags = [ + "all-gcc" + "all-target-libgcc" + ]; + installTargets = "install-gcc install-target-libgcc"; + } ) ) ] ++ ( let - targetPlatformSlash = - if lib.systems.equals hostPlatform targetPlatform then "" else "${targetPlatform.config}/"; + targetPlatformSlash = if hostIsTarget then "" else "${targetPlatform.config}/"; # If we are building a cross-compiler and the target libc provided # to us at build time has a libgcc, use that instead of building a diff --git a/pkgs/development/compilers/gcc/common/pre-configure.nix b/pkgs/development/compilers/gcc/common/pre-configure.nix index 806cbfc5b115..39c9d73fa232 100644 --- a/pkgs/development/compilers/gcc/common/pre-configure.nix +++ b/pkgs/development/compilers/gcc/common/pre-configure.nix @@ -14,6 +14,8 @@ enableShared, enableMultilib, pkgsBuildTarget, + buildIsHost, + hostIsTarget, }: assert langAda -> gnat-bootstrap != null; @@ -39,7 +41,7 @@ lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' langFortran && ( - (!lib.systems.equals buildPlatform hostPlatform) && (lib.systems.equals hostPlatform targetPlatform) + !buildIsHost && hostIsTarget ) ) '' @@ -57,12 +59,9 @@ lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' # HACK: if host and target config are the same, but the platforms are # actually different we need to convince the configure script that it # is in fact building a cross compiler although it doesn't believe it. -+ - lib.optionalString - (targetPlatform.config == hostPlatform.config && (!lib.systems.equals targetPlatform hostPlatform)) - '' - substituteInPlace configure --replace is_cross_compiler=no is_cross_compiler=yes - '' ++ lib.optionalString (targetPlatform.config == hostPlatform.config && !hostIsTarget) '' + substituteInPlace configure --replace is_cross_compiler=no is_cross_compiler=yes +'' # Normally (for host != target case) --without-headers automatically # enables 'inhibit_libc=true' in gcc's gcc/configure.ac. But case of @@ -71,11 +70,7 @@ lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' # We explicitly inhibit libc headers use in this case as well. + lib.optionalString - ( - (!lib.systems.equals targetPlatform hostPlatform) - && withoutTargetLibc - && targetPlatform.config == hostPlatform.config - ) + (!hostIsTarget && withoutTargetLibc && targetPlatform.config == hostPlatform.config) '' export inhibit_libc=true '' @@ -93,6 +88,6 @@ lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' done '' -+ lib.optionalString ( - (!lib.systems.equals targetPlatform hostPlatform) && withoutTargetLibc && enableShared -) (import ./libgcc-buildstuff.nix { inherit lib stdenv; }) ++ lib.optionalString (!hostIsTarget && withoutTargetLibc && enableShared) ( + import ./libgcc-buildstuff.nix { inherit lib stdenv; } +) diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index fa2c3c2f978e..615cd2b3b19a 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -35,8 +35,14 @@ zlib ? null, libucontext ? null, gnat-bootstrap ? null, + # Allows only computing system equality once across every file responsible for + # building gcc. Not part of the public API + _systemInfo ? { + buildIsHost = lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform; + hostIsTarget = lib.systems.equals stdenv.hostPlatform stdenv.targetPlatform; + }, enableMultilib ? false, - enablePlugin ? (lib.systems.equals stdenv.hostPlatform stdenv.buildPlatform), # Whether to support user-supplied plug-ins + enablePlugin ? _systemInfo.buildIsHost, # Whether to support user-supplied plug-ins name ? "gcc", libcCross ? null, threadsCross ? { }, # for MinGW @@ -59,9 +65,6 @@ let inherit (lib) callPackageWith - filter - getBin - maintainers makeLibraryPath makeSearchPathOutput mapAttrs @@ -70,17 +73,15 @@ let optionals optionalString pipe - platforms - versionAtLeast versions ; + inherit (_systemInfo) buildIsHost hostIsTarget; + gccVersions = import ./versions.nix; version = gccVersions.fromMajorMinor majorMinorVersion; majorVersion = versions.major version; - atLeast14 = versionAtLeast version "14"; - is14 = majorVersion == "14"; is13 = majorVersion == "13"; # releases have a form: MAJOR.MINOR.MICRO, like 14.2.1 @@ -98,21 +99,16 @@ let disableBootstrap = !stdenv.hostPlatform.isDarwin && !profiledCompiler; inherit (stdenv) buildPlatform hostPlatform targetPlatform; - targetConfig = - if (!lib.systems.equals targetPlatform hostPlatform) then targetPlatform.config else null; + targetConfig = if (!hostIsTarget) then targetPlatform.config else null; patches = callFile ./patches { }; # Cross-gcc settings (build == host != target) - crossMingw = (!lib.systems.equals targetPlatform hostPlatform) && targetPlatform.isMinGW; + crossMingw = (!hostIsTarget) && targetPlatform.isMinGW; stageNameAddon = optionalString withoutTargetLibc "-nolibc"; - crossNameAddon = optionalString ( - !lib.systems.equals targetPlatform hostPlatform - ) "${targetPlatform.config}${stageNameAddon}-"; + crossNameAddon = optionalString (!hostIsTarget) "${targetPlatform.config}${stageNameAddon}-"; - targetPrefix = lib.optionalString ( - !lib.systems.equals stdenv.targetPlatform stdenv.hostPlatform - ) "${stdenv.targetPlatform.config}-"; + targetPrefix = lib.optionalString (!hostIsTarget) "${stdenv.targetPlatform.config}-"; callFile = callPackageWith { # lets @@ -184,6 +180,8 @@ let which zlib ; + + inherit buildIsHost hostIsTarget; }; in @@ -269,7 +267,7 @@ pipe substituteInPlace libgfortran/configure \ --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname" '' - + (optionalString ((!lib.systems.equals targetPlatform hostPlatform) || stdenv.cc.libc != null) + + (optionalString ((!hostIsTarget) || stdenv.cc.libc != null) # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. ( @@ -339,11 +337,7 @@ pipe let target = optionalString profiledCompiler "profiled" - + optionalString ( - (lib.systems.equals targetPlatform hostPlatform) - && (lib.systems.equals hostPlatform buildPlatform) - && !disableBootstrap - ) "bootstrap"; + + optionalString (hostIsTarget && buildIsHost && !disableBootstrap) "bootstrap"; in optional (target != "") target; @@ -373,13 +367,11 @@ pipe # compiler (after the specs for the cross-gcc are created). Having # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks. - CPATH = optionals (lib.systems.equals targetPlatform hostPlatform) ( + CPATH = optionals hostIsTarget ( makeSearchPathOutput "dev" "include" ([ ] ++ optional (zlib != null) zlib) ); - LIBRARY_PATH = optionals (lib.systems.equals targetPlatform hostPlatform) ( - makeLibraryPath (optional (zlib != null) zlib) - ); + LIBRARY_PATH = optionals hostIsTarget (makeLibraryPath (optional (zlib != null) zlib)); NIX_LDFLAGS = optionalString hostPlatform.isSunOS "-lm"; @@ -441,10 +433,18 @@ pipe langJit targetPlatform hostPlatform + hostIsTarget withoutTargetLibc enableShared libcCross ; }) - (callPackage ./common/checksum.nix { inherit langC langCC; }) + (callPackage ./common/checksum.nix { + inherit + langC + langCC + buildIsHost + hostIsTarget + ; + }) ] diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix index 2e412802742e..0c4117bae3db 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -23,6 +23,8 @@ fetchurl, withoutTargetLibc, threadsCross, + buildIsHost, + hostIsTarget, }: let @@ -36,10 +38,7 @@ let # aarch64-darwin, as it breaks building a foreign one: # https://github.com/iains/gcc-12-branch/issues/18 canApplyIainsDarwinPatches = - stdenv.hostPlatform.isDarwin - && stdenv.hostPlatform.isAarch64 - && (lib.systems.equals buildPlatform hostPlatform) - && (lib.systems.equals hostPlatform targetPlatform); + stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 && buildIsHost && hostIsTarget; inherit (lib) optionals optional; in diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index 5f4ac7b84645..6dd3651bfa30 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -40,7 +40,6 @@ let flip getName hasSuffix - head isBool max optional @@ -48,13 +47,9 @@ let optionals optionalString removePrefix - splitString stringLength ; - getOptionalAttrs = - names: attrs: lib.getAttrs (lib.intersectLists names (lib.attrNames attrs)) attrs; - leftPadName = name: against: let @@ -271,7 +266,7 @@ lib.extendMkDerivation { if (isPythonModule drv) && (isMismatchedPython drv) then throwMismatch attrName drv else drv; in - attrName: inputs: map (checkDrv attrName) inputs; + attrName: map (checkDrv attrName); isBootstrapInstallPackage = isBootstrapInstallPackage' (finalAttrs.pname or null); @@ -373,16 +368,16 @@ lib.extendMkDerivation { buildInputs = validatePythonMatches "buildInputs" (buildInputs ++ pythonPath); - propagatedBuildInputs = validatePythonMatches "propagatedBuildInputs" ( - propagatedBuildInputs - ++ getFinalPassthru "dependencies" + propagatedBuildInputs = + validatePythonMatches "propagatedBuildInputs" ( + propagatedBuildInputs ++ getFinalPassthru "dependencies" + ) ++ [ # we propagate python even for packages transformed with 'toPythonApplication' # this pollutes the PATH but avoids rebuilds # see https://github.com/NixOS/nixpkgs/issues/170887 for more context python - ] - ); + ]; inherit strictDeps; @@ -463,13 +458,11 @@ lib.extendMkDerivation { attrs.${name} == [ ] ) "${lib.getName finalAttrs}: ${name} must be unspecified, null or a non-empty list." attrs.${name} ) - ( - getOptionalAttrs [ - "enabledTestMarks" - "enabledTestPaths" - "enabledTests" - ] attrs - ); + { + ${if attrs ? enabledTestMarks then "enabledTestMarks" else null} = attrs.enabledTestMarks; + ${if attrs ? enabledTestPaths then "enabledTestPaths" else null} = attrs.enabledTestPaths; + ${if attrs ? enabledTests then "enabledTests" else null} = attrs.enabledTests; + }; # This derivation transformation function must be independent to `attrs` # for fixed-point arguments support in the future. diff --git a/pkgs/development/interpreters/python/wrapper.nix b/pkgs/development/interpreters/python/wrapper.nix index 914e4b354c49..2f901232c1ec 100644 --- a/pkgs/development/interpreters/python/wrapper.nix +++ b/pkgs/development/interpreters/python/wrapper.nix @@ -23,7 +23,7 @@ let env = let - paths = requiredPythonModules (extraLibs ++ [ python ]) ++ [ + paths = requiredPythonModules extraLibs ++ [ (runCommand "bin" { } '' mkdir -p $out/bin '') diff --git a/pkgs/development/python-modules/aubio-ledfx/default.nix b/pkgs/development/python-modules/aubio-ledfx/default.nix new file mode 100644 index 000000000000..91a0842961f1 --- /dev/null +++ b/pkgs/development/python-modules/aubio-ledfx/default.nix @@ -0,0 +1,59 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + ffmpeg-headless, + libsamplerate, + libsndfile, + meson-python, + numpy, + pkg-config, + pytestCheckHook, + rubberband, + setuptools, + stdenv, +}: + +buildPythonPackage (finalAttrs: { + pname = "aubio-ledfx"; + version = "0.4.11"; + pyproject = true; + + src = fetchFromGitHub { + owner = "LedFx"; + repo = "aubio-ledfx"; + tag = "v${finalAttrs.version}"; + hash = "sha256-ec6QiTj1AOza+ggJPl3EULNDB/rrpCDZW0HaSywy/4E="; + }; + + build-system = [ + meson-python + setuptools + ]; + + dependencies = [ numpy ]; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ + libsamplerate + libsndfile + ] + ++ lib.optionals stdenv.targetPlatform.isLinux [ + ffmpeg-headless + ] + ++ lib.optionals (!stdenv.targetPlatform.isLinux) [ + rubberband + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "aubio" ]; + + meta = { + description = "Collection of tools for music analysis"; + homepage = "https://github.com/LedFx/aubio-ledfx"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ SuperSandro2000 ]; + }; +}) diff --git a/pkgs/development/python-modules/aubio/default.nix b/pkgs/development/python-modules/aubio/default.nix deleted file mode 100644 index 13fac161b8bf..000000000000 --- a/pkgs/development/python-modules/aubio/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - fetchpatch, - setuptools, - numpy, - pytestCheckHook, - stdenv, - darwin, -}: - -buildPythonPackage rec { - pname = "aubio"; - version = "0.4.9"; - pyproject = true; - - src = fetchFromGitHub { - owner = "aubio"; - repo = "aubio"; - rev = version; - hash = "sha256-RvzhB1kQNP0IbAygwH2RBi/kSyuFPAHgsiCATPeMHTo="; - }; - - patches = [ - (fetchpatch { - # fix "incompatible function pointer types initializing 'PyUFuncGenericFunction'" - name = "const-function-signature.patch"; - url = "https://github.com/aubio/aubio/commit/95ff046c698156f21e2ca0d1d8a02c23ab76969f.patch"; - hash = "sha256-qKcIPjpcZUizSN/t96WOiOn+IlsrlC0+g7gW77KejH0="; - }) - ]; - - build-system = [ setuptools ]; - - dependencies = [ numpy ]; - - nativeCheckInputs = [ pytestCheckHook ]; - - pythonImportsCheck = [ "aubio" ]; - - disabledTests = [ - # https://github.com/aubio/aubio/issues/413 - "test_assign_cvec_phas_slice" - ]; - - meta = { - description = "Library for audio and music analysis"; - homepage = "https://aubio.org"; - changelog = "https://github.com/aubio/aubio/blob/${version}/ChangeLog"; - license = lib.licenses.gpl3Plus; - maintainers = [ ]; - }; -} diff --git a/pkgs/development/python-modules/audio-hotplug/default.nix b/pkgs/development/python-modules/audio-hotplug/default.nix new file mode 100644 index 000000000000..efe5a48a3659 --- /dev/null +++ b/pkgs/development/python-modules/audio-hotplug/default.nix @@ -0,0 +1,49 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pyobjc-framework-CoreAudio, + pytest-asyncio, + pytestCheckHook, + pyudev, + stdenv, + uv-build, +}: + +buildPythonPackage (finalAttrs: { + pname = "audio-hotplug"; + version = "0.1.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "LedFx"; + repo = "audio-hotplug"; + tag = "v${finalAttrs.version}"; + hash = "sha256-Xq81AfJ5E8lAk1JohD7/RlEDVRrbi/ScX80nMiRd+dY="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "uv_build>=0.9.13,<0.10.0" "uv_build" + ''; + + build-system = [ uv-build ]; + + dependencies = + lib.optionals stdenv.hostPlatform.isLinux [ pyudev ] + ++ lib.optional stdenv.hostPlatform.isDarwin pyobjc-framework-CoreAudio; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "audio_hotplug" ]; + + meta = { + description = "Wrapper for Auburns' FastNoise Lite noise generation library"; + homepage = "https://github.com/tizilogic/PyFastNoiseLite"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ SuperSandro2000 ]; + }; +}) diff --git a/pkgs/development/python-modules/burner-redis/default.nix b/pkgs/development/python-modules/burner-redis/default.nix index c8ffe4e2c8dc..3e28ba6bb424 100644 --- a/pkgs/development/python-modules/burner-redis/default.nix +++ b/pkgs/development/python-modules/burner-redis/default.nix @@ -11,19 +11,19 @@ buildPythonPackage (finalAttrs: { pname = "burner-redis"; - version = "0.1.6"; + version = "0.1.7"; pyproject = true; src = fetchFromGitHub { owner = "prefectlabs"; repo = "burner-redis"; tag = "v${finalAttrs.version}"; - hash = "sha256-soXwXxo8vVGEEM5iDNFa86zlPA+e74b+AS9diUoOdME="; + hash = "sha256-Ybi8F0imJKUQiF0Gfy/WGcAqfQSPoT1tAvOXDnI5Z7M="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) pname version src; - hash = "sha256-0qdmcoRje7OkHnGhO8CaR/g38yL9K8Jc+1KjfW4xPTQ="; + hash = "sha256-laD/FhYxXCOZOvs0e7ad80vUgX4eoHpLQu6dx/glkEM="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/clevercsv/default.nix b/pkgs/development/python-modules/clevercsv/default.nix index 9640dc267b22..4fe573c00257 100644 --- a/pkgs/development/python-modules/clevercsv/default.nix +++ b/pkgs/development/python-modules/clevercsv/default.nix @@ -24,14 +24,14 @@ buildPythonPackage rec { pname = "clevercsv"; - version = "0.8.4"; + version = "0.8.5"; pyproject = true; src = fetchFromGitHub { owner = "alan-turing-institute"; repo = "CleverCSV"; tag = "v${version}"; - hash = "sha256-yp102f0WHu9wdVpXBIXn4lP7fi1UOQdA7M11hyVyRyM="; + hash = "sha256-XbRydL/4EzsKKlxtMnuv5HLB0VAThRAjH0IDCfRFFTc="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/flux-led/default.nix b/pkgs/development/python-modules/flux-led/default.nix index 154da949a276..f759be3ac9f8 100644 --- a/pkgs/development/python-modules/flux-led/default.nix +++ b/pkgs/development/python-modules/flux-led/default.nix @@ -33,6 +33,8 @@ buildPythonPackage rec { webcolors ]; + __darwinAllowLocalNetworking = true; + nativeCheckInputs = [ pytest-asyncio pytestCheckHook @@ -46,7 +48,6 @@ buildPythonPackage rec { changelog = "https://github.com/Danielhiversen/flux_led/releases/tag/${version}"; license = lib.licenses.lgpl3Plus; maintainers = [ ]; - platforms = lib.platforms.linux; mainProgram = "flux_led"; }; } diff --git a/pkgs/development/python-modules/lifx-async/default.nix b/pkgs/development/python-modules/lifx-async/default.nix new file mode 100644 index 000000000000..7a0d8cef2351 --- /dev/null +++ b/pkgs/development/python-modules/lifx-async/default.nix @@ -0,0 +1,51 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + lifx-emulator-core, + pytest-asyncio, + pytest-benchmark, + pytest-cov-stub, + pytest-retry, + pytest-timeout, + pytest-xdist, + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "lifx-async"; + version = "5.4.8"; + pyproject = true; + + src = fetchFromGitHub { + owner = "Djelibeybi"; + repo = "lifx-async"; + tag = "v${finalAttrs.version}"; + hash = "sha256-392gHHekZ+rfZzR21ISUqdFiLGFoQSkJeyn3oRSs3+g="; + }; + + build-system = [ hatchling ]; + + __darwinAllowLocalNetworking = true; + + nativeCheckInputs = [ + lifx-emulator-core + pytest-asyncio + pytest-benchmark + pytest-cov-stub + pytest-retry + pytest-timeout + pytest-xdist + pytestCheckHook + ]; + + pythonImportsCheck = [ "lifx" ]; + + meta = { + description = "Modern, type-safe, async Python library for controlling LIFX lights"; + homepage = "https://github.com/Djelibeybi/lifx-async/"; + license = lib.licenses.upl; + maintainers = with lib.maintainers; [ SuperSandro2000 ]; + }; +}) diff --git a/pkgs/development/python-modules/lifx-emulator-core/default.nix b/pkgs/development/python-modules/lifx-emulator-core/default.nix new file mode 100644 index 000000000000..7079f9770ca1 --- /dev/null +++ b/pkgs/development/python-modules/lifx-emulator-core/default.nix @@ -0,0 +1,50 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + pydantic, + pytest-asyncio, + pytestCheckHook, + pyyaml, + writableTmpDirAsHomeHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "lifx-emulator-core"; + version = "3.6.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "Djelibeybi"; + repo = "lifx-emulator"; + tag = "core-v${finalAttrs.version}"; + hash = "sha256-bZ+u/OKFDYV0kQLeVQPDyLKC9KCTJydbl0xnuOsrh+0="; + }; + + sourceRoot = "${finalAttrs.src.name}/packages/lifx-emulator-core"; + + build-system = [ hatchling ]; + + dependencies = [ + pydantic + pyyaml + ]; + + __darwinAllowLocalNetworking = true; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + writableTmpDirAsHomeHook + ]; + + pythonImportsCheck = [ "lifx_emulator" ]; + + meta = { + description = "Core Python library for emulating LIFX devices using the LAN protocol"; + homepage = "https://github.com/Djelibeybi/lifx-emulator/tree/main/packages/lifx-emulator-core"; + license = lib.licenses.upl; + maintainers = with lib.maintainers; [ SuperSandro2000 ]; + }; +}) diff --git a/pkgs/development/python-modules/pyfastnoiselite/default.nix b/pkgs/development/python-modules/pyfastnoiselite/default.nix new file mode 100644 index 000000000000..04d49c62a0f6 --- /dev/null +++ b/pkgs/development/python-modules/pyfastnoiselite/default.nix @@ -0,0 +1,37 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + numpy, + setuptools, +}: + +buildPythonPackage (finalAttrs: { + pname = "pyfastnoiselite"; + version = "0.0.7"; + pyproject = true; + + src = fetchFromGitHub { + owner = "tizilogic"; + repo = "PyFastNoiseLite"; + tag = "v${finalAttrs.version}"; + fetchSubmodules = true; + hash = "sha256-Dyi7FeNnlX3EA8qSylapvZJ4/02ayQC5EBtRY6KBJRA="; + }; + + build-system = [ setuptools ]; + + dependencies = [ numpy ]; + + # has no tests + doCheck = false; + + pythonImportsCheck = [ "pyfastnoiselite" ]; + + meta = { + description = "Wrapper for Auburns' FastNoise Lite noise generation library"; + homepage = "https://github.com/tizilogic/PyFastNoiseLite"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ SuperSandro2000 ]; + }; +}) diff --git a/pkgs/development/python-modules/pyflac/default.nix b/pkgs/development/python-modules/pyflac/default.nix new file mode 100644 index 000000000000..599fd0573f13 --- /dev/null +++ b/pkgs/development/python-modules/pyflac/default.nix @@ -0,0 +1,53 @@ +{ + lib, + buildPythonPackage, + cffi, + fetchFromGitHub, + numpy, + pytestCheckHook, + setuptools, + soundfile, + stdenv, + unixtools, +}: + +buildPythonPackage (finalAttrs: { + pname = "pyflac"; + version = "3.0.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "sonos"; + repo = "pyFLAC"; + tag = "v${finalAttrs.version}"; + hash = "sha256-PA9ARch1MwBhLlTIIM+pXHc10pg0PM/uEHfwQ5e5MNI="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + cffi + numpy + soundfile + ]; + + nativeCheckInputs = [ + pytestCheckHook + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + unixtools.procps # for sysctl + ]; + + preCheck = '' + rm -r pyflac + ''; + + pythonImportsCheck = [ "pyflac" ]; + + meta = { + description = "Wrapper for libFLAC"; + homepage = "https://github.com/sonos/pyFLAC/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ SuperSandro2000 ]; + }; +}) diff --git a/pkgs/development/python-modules/pyobjc-framework-CoreAudio/default.nix b/pkgs/development/python-modules/pyobjc-framework-CoreAudio/default.nix new file mode 100644 index 000000000000..13a914ffa56b --- /dev/null +++ b/pkgs/development/python-modules/pyobjc-framework-CoreAudio/default.nix @@ -0,0 +1,58 @@ +{ + buildPythonPackage, + setuptools, + darwin, + pyobjc-core, + pyobjc-framework-Cocoa, + lib, +}: + +buildPythonPackage rec { + pname = "pyobjc-framework-CoreAudio"; + pyproject = true; + + inherit (pyobjc-core) version src; + + sourceRoot = "${src.name}/pyobjc-framework-CoreAudio"; + + build-system = [ setuptools ]; + + buildInputs = [ darwin.libffi ]; + + nativeBuildInputs = [ + darwin.DarwinTools # sw_vers + ]; + + # See https://github.com/ronaldoussoren/pyobjc/pull/641. Unfortunately, we + # cannot just pull that diff with fetchpatch due to https://discourse.nixos.org/t/how-to-apply-patches-with-sourceroot/59727. + postPatch = '' + substituteInPlace pyobjc_setup.py \ + --replace-fail "-buildversion" "-buildVersion" \ + --replace-fail "-productversion" "-productVersion" \ + --replace-fail "/usr/bin/sw_vers" "sw_vers" \ + --replace-fail "/usr/bin/xcrun" "xcrun" + ''; + + dependencies = [ + pyobjc-core + pyobjc-framework-Cocoa + ]; + + env.NIX_CFLAGS_COMPILE = toString [ + "-I${darwin.libffi.dev}/include" + "-Wno-error=unused-command-line-argument" + ]; + + pythonImportsCheck = [ + "CoreAudio" + "PyObjCTools" + ]; + + meta = { + description = "Wrappers for the framework CoreAudio on macOS"; + homepage = "https://github.com/ronaldoussoren/pyobjc"; + license = lib.licenses.mit; + platforms = lib.platforms.darwin; + maintainers = [ ]; + }; +} diff --git a/pkgs/development/python-modules/samplerate-ledfx/default.nix b/pkgs/development/python-modules/samplerate-ledfx/default.nix new file mode 100644 index 000000000000..cd95073ca359 --- /dev/null +++ b/pkgs/development/python-modules/samplerate-ledfx/default.nix @@ -0,0 +1,63 @@ +{ + lib, + buildPythonPackage, + cmake, + fetchFromGitHub, + libsamplerate, + numpy, + pybind11, + pytest-asyncio, + pytestCheckHook, + pythonAtLeast, + setuptools, + setuptools-scm, +}: + +buildPythonPackage (finalAttrs: { + pname = "samplerate-ledfx"; + version = "0.2.6"; + pyproject = true; + + disabled = pythonAtLeast "3.14"; + + src = fetchFromGitHub { + owner = "LedFx"; + repo = "python-samplerate-ledfx"; + tag = "v${finalAttrs.version}"; + hash = "sha256-SLmaWSq/Ou23BfdWKlzE9gIfORgF9skUVEw1Tzpd5b4="; + }; + + # unvendor pybind11, libsamplerate + postPatch = '' + rm -r external + substituteInPlace CMakeLists.txt \ + --replace-fail "add_subdirectory(external)" "find_package(pybind11 REQUIRED)" + ''; + + build-system = [ + cmake + pybind11 + setuptools + setuptools-scm + ]; + + dontUseCmakeConfigure = true; + + buildInputs = [ libsamplerate ]; + + dependencies = [ numpy ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "samplerate" ]; + + meta = { + description = "Bindings for libsamplerate based on CFFI and NumPy"; + homepage = "https://github.com/LedFx/python-samplerate-ledfx"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ SuperSandro2000 ]; + }; +}) diff --git a/pkgs/kde/misc/klevernotes/default.nix b/pkgs/kde/misc/klevernotes/default.nix index 54b9e46ee44f..51c2718ed61b 100644 --- a/pkgs/kde/misc/klevernotes/default.nix +++ b/pkgs/kde/misc/klevernotes/default.nix @@ -9,11 +9,11 @@ }: mkKdeDerivation rec { pname = "klevernotes"; - version = "1.3.0"; + version = "1.3.1"; src = fetchurl { url = "mirror://kde/stable/klevernotes/${version}/klevernotes-${version}.tar.xz"; - hash = "sha256-UK0LwCmAh93TR3/n4IEyTfMKMFhoy7IuVCoI2mk13e0="; + hash = "sha256-34w59TT+vY6pJGW3HgPfNAS8hJzPRPMgC4oPKeUfytQ="; }; extraBuildInputs = [ diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 56123b35c59b..bf06b3138e97 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -94,6 +94,7 @@ mapAliases { async_stagger = throw "'async_stagger' has been renamed to/replaced by 'async-stagger'"; # Converted to throw 2025-10-29 asyncio-nats-client = throw "'asyncio-nats-client' has been renamed to/replaced by 'nats-py'"; # Converted to throw 2025-10-29 atsim_potentials = throw "'atsim_potentials' has been renamed to/replaced by 'atsim-potentials'"; # Converted to throw 2025-10-29 + aubio = throw "'aubio' only direct user LedFX switched to a fork named 'aubio-ledfx', hence the aubio package has been replaced."; # Added 2026-04-20 audio-metadata = throw "'audio-metadata' has been removed as it's unmaintained since 2020"; # Added 2026-03-12 autotrash = throw "'autotrash' has been renamed to/replaced by 'super.pkgs.autotrash'"; # Converted to throw 2025-10-29 av_13 = throw "'av_13' has been renamed to/replaced by 'av'"; # Added 2026-02-01 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e0535d48c1f6..faeacc4346d9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1226,10 +1226,12 @@ self: super: with self; { attrs-strict = callPackage ../development/python-modules/attrs-strict { }; - aubio = callPackage ../development/python-modules/aubio { }; + aubio-ledfx = callPackage ../development/python-modules/aubio-ledfx { }; audible = callPackage ../development/python-modules/audible { }; + audio-hotplug = callPackage ../development/python-modules/audio-hotplug { }; + audioop-lts = if pythonAtLeast "3.13" then callPackage ../development/python-modules/audioop-lts { } else null; @@ -9031,6 +9033,10 @@ self: super: with self; { lifelines = callPackage ../development/python-modules/lifelines { }; + lifx-async = callPackage ../development/python-modules/lifx-async { }; + + lifx-emulator-core = callPackage ../development/python-modules/lifx-emulator-core { }; + lightgbm = callPackage ../development/python-modules/lightgbm { }; lightify = callPackage ../development/python-modules/lightify { }; @@ -13904,6 +13910,8 @@ self: super: with self; { pyfakewebcam = callPackage ../development/python-modules/pyfakewebcam { }; + pyfastnoiselite = callPackage ../development/python-modules/pyfastnoiselite { }; + pyfatfs = callPackage ../development/python-modules/pyfatfs { }; pyfcm = callPackage ../development/python-modules/pyfcm { }; @@ -13920,6 +13928,8 @@ self: super: with self; { pyfireservicerota = callPackage ../development/python-modules/pyfireservicerota { }; + pyflac = callPackage ../development/python-modules/pyflac { }; + pyflakes = callPackage ../development/python-modules/pyflakes { }; pyflexit = callPackage ../development/python-modules/pyflexit { }; @@ -14588,6 +14598,10 @@ self: super: with self; { pyobjc-framework-Cocoa = callPackage ../development/python-modules/pyobjc-framework-Cocoa { }; + pyobjc-framework-CoreAudio = + callPackage ../development/python-modules/pyobjc-framework-CoreAudio + { }; + pyobjc-framework-CoreBluetooth = callPackage ../development/python-modules/pyobjc-framework-CoreBluetooth { }; @@ -17378,6 +17392,10 @@ self: super: with self; { samplerate = callPackage ../development/python-modules/samplerate { inherit (pkgs) libsamplerate; }; + samplerate-ledfx = callPackage ../development/python-modules/samplerate-ledfx { + inherit (pkgs) libsamplerate; + }; + samsungctl = callPackage ../development/python-modules/samsungctl { }; samsungtvws = callPackage ../development/python-modules/samsungtvws { };