Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 66ef389efa1f
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 75e683d29d03
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Nov 20, 2020

  1. pythonPackages: add new 'seccomp' library

    As requested in #99553. Closes #99553.
    
    Libraries that install python modules as part of the build are
    problematic, because they either
    
      - only support a single python version, because the input for
        pythonPackages gets fixed in all-packages.nix, or
    
      - need to be rebuild the underlying C code for *every* python version
        resulting in libfoo-python37, libfoo-python38, and so on
    
    We would prefer to use the second approach because it works correctly
    for all versions of python. However, it creates duplicate copies of
    libseccomp.so and that can be expensive. Instead we 'deduplicate' the
    copies of libseccomp.so by
    
      - attaching a new $pythonsrc output to the libseccomp deriv, and
      - exposing a new 'seccomp' package in python-packages.nix using
        libseccomp as input, and
      - having a custom python.nix derivation that builds the cython
        extension using libseccomp to get the python source and the
        package version
    
    This means we build 1 copy of the seccomp python package, one for each
    version of python, but all of those packages refer to a single instance
    of the libseccomp C library, giving us the best of both worlds.
    
    NOTE: because this requires changing the postInstall of libseccomp, it
    requires a mass rebuild.
    
    Signed-off-by: Austin Seipp <aseipp@pobox.com>
    thoughtpolice authored and FRidh committed Nov 20, 2020
    Copy the full SHA
    75e683d View commit details
    Browse the repository at this point in the history