From dae55bc2bd7af15c1287ea1f57b99448b86c0a77 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Fri, 30 Dec 2022 00:08:26 -0300 Subject: [PATCH] castxml: remove `inherit (.*)` reference on all-packages.nix According to the issue linked at the end, filling arguments for `callPackage` in all-packages.nix breaks splicing and makes the expressions incompatible with cross-compilation. This issue is more pronounced in the many `inherit (darwin)` calls. However, it is present in similar contexts too. The idea here is not the smartest: it just hides those inheritances from `all-packages.nix` and sends them to the `default.nix` expressions. Issue: https://github.com/NixOS/nixpkgs/issues/204303 --- pkgs/development/tools/castxml/default.nix | 27 ++++++++++++---------- pkgs/top-level/all-packages.nix | 5 +--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/development/tools/castxml/default.nix b/pkgs/development/tools/castxml/default.nix index d26ef76bb8c..69e48a28a2e 100644 --- a/pkgs/development/tools/castxml/default.nix +++ b/pkgs/development/tools/castxml/default.nix @@ -1,17 +1,20 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, libclang -, libffi -, libxml2 -, llvm -, sphinx -, zlib -, withManual ? true -, withHTML ? true +{ lib, + stdenv, + fetchFromGitHub, + cmake, + libffi, + libxml2, + zlib, + withManual ? true, + withHTML ? true, + llvmPackages, + python3, }: +let + inherit (llvmPackages) libclang llvm; + inherit (python3.pkgs) sphinx; +in stdenv.mkDerivation (finalAttrs: { pname = "castxml"; version = "0.5.1"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4ed086889be..fd3c5359671 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -357,10 +357,7 @@ with pkgs; castget = callPackage ../applications/networking/feedreaders/castget { }; - castxml = callPackage ../development/tools/castxml { - inherit (llvmPackages) libclang llvm; - inherit (python3.pkgs) sphinx; - }; + castxml = callPackage ../development/tools/castxml { }; catatonit = callPackage ../applications/virtualization/catatonit { };