Unverified Commit d24da528 authored by Artturi's avatar Artturi Committed by GitHub
Browse files

Merge pull request #265764 from amjoseph-nixpkgs/pr/pythonForBuild

parents 878631d4 f0011fd1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ buildPythonPackage rec {

The `buildPythonPackage` mainly does four things:

* In the [`buildPhase`](#build-phase), it calls `${python.pythonForBuild.interpreter} setup.py bdist_wheel` to
* In the [`buildPhase`](#build-phase), it calls `${python.pythonOnBuildForHost.interpreter} setup.py bdist_wheel` to
  build a wheel binary zipfile.
* In the [`installPhase`](#ssec-install-phase), it installs the wheel file using `pip install *.whl`.
* In the [`postFixup`](#var-stdenv-postFixup) phase, the `wrapPythonPrograms` bash function is called to
@@ -1682,7 +1682,7 @@ of such package using the feature is `pkgs/tools/X11/xpra/default.nix`.
As workaround install it as an extra `preInstall` step:

```shell
${python.pythonForBuild.interpreter} setup.py install_data --install-dir=$out --root=$out
${python.pythonOnBuildForHost.interpreter} setup.py install_data --install-dir=$out --root=$out
sed -i '/ = data\_files/d' setup.py
```

+1 −1
Original line number Diff line number Diff line
@@ -268,7 +268,7 @@ in
            ''
              mkdir -p $out
              if [ -d $package/share/man ]; then
                find $package/share/man -type f | xargs ${pkgs.python3.pythonForBuild.interpreter} ${patchedGenerator}/create_manpage_completions.py --directory $out >/dev/null
                find $package/share/man -type f | xargs ${pkgs.python3.pythonOnBuildForHost.interpreter} ${patchedGenerator}/create_manpage_completions.py --directory $out >/dev/null
              fi
            '';
        in
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ stdenv.mkDerivation (finalAttrs: {
    export XDG_DATA_HOME=$out/share
    export XDG_UTILS_INSTALL_MODE="user"

    ${python3Packages.python.pythonForBuild.interpreter} setup.py install --root=$out \
    ${python3Packages.python.pythonOnBuildForHost.interpreter} setup.py install --root=$out \
      --prefix=$out \
      --libdir=$out/lib \
      --staging-root=$out \
+2 −2
Original line number Diff line number Diff line
@@ -113,8 +113,8 @@ python.pkgs.pythonPackages.buildPythonPackage rec {
    touch cookbook/static/themes/bootstrap.min.css.map
    touch cookbook/static/css/bootstrap-vue.min.css.map

    ${python.pythonForBuild.interpreter} manage.py collectstatic_js_reverse
    ${python.pythonForBuild.interpreter} manage.py collectstatic
    ${python.pythonOnBuildForHost.interpreter} manage.py collectstatic_js_reverse
    ${python.pythonOnBuildForHost.interpreter} manage.py collectstatic

    runHook postBuild
  '';
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
  ];

  nativeBuildInputs = [
    meson ninja pkg-config desktop-file-utils python3.pythonForBuild.pkgs.sphinx
    meson ninja pkg-config desktop-file-utils python3.pythonOnBuildForHost.pkgs.sphinx
    gettext wrapGAppsHook libxml2 appstream-glib
  ];

Loading