Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

splice.nix: make pkgs splicedPackages #349316

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Nov 1, 2024

  1. splice.nix: make pkgs splicedPackages when required

    This will make `pkgs` used in `callPackage`, and `pkgsCross.X.pkgs` have
    packages with `__spliced`.
    
    https://www.github.com/NixOS/nixpkgs/blob/3029741718f4c765fbc5ebf76bea3d6c8ff15fe5/pkgs/development/interpreters/python/passthrufun.nix#L37
    
    https://www.github.com/NixOS/nixpkgs/blob/d2bd9a39dec88eddd5c192abee69939e67f43d12/pkgs/top-level/python-packages.nix#L10720
    
    ```
    nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced
    error:
           … while evaluating the attribute 'aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced'
             at /home/artturin/nixgits/my-nixpkgs/.worktree/1/pkgs/development/python-modules/protobuf/4.nix:119:13:
              118|   passthru = {
              119|     inherit protobuf;
                 |             ^
              120|   };
    
           error: attribute '__spliced' missing
           at «string»:1:1:
                1| pkgsCross.aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced
                 | ^
    ```
    
    to
    
    ```
    nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced
    {
      buildBuild = «derivation /nix/store/s7da5mfvx4h1n86j78knaj9cprglxqz6-protobuf-25.4.drv»;
      buildHost = «derivation /nix/store/s7da5mfvx4h1n86j78knaj9cprglxqz6-protobuf-25.4.drv»;
      buildTarget = «repeated»;
      hostHost = «derivation /nix/store/mszvybzs4zxh43awyrjnybsfcb265n9r-protobuf-aarch64-unknown-linux-gnu-25.4.drv»;
      hostTarget = «repeated»;
    }
    ```
    Artturin committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    7c60f44 View commit details
    Browse the repository at this point in the history
  2. treewide: change = __splicedPackages and inherits

    Now that `pkgs` is `__splicedPackages` on cross we can remove these
    variables I set.
    Artturin committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    8614381 View commit details
    Browse the repository at this point in the history