Skip to content

meld: avoid -dev paths in runtime closure#265454

Merged
Atemu merged 1 commit intoNixOS:masterfrom
trofi:meld-leaner-closure
Nov 8, 2023
Merged

meld: avoid -dev paths in runtime closure#265454
Atemu merged 1 commit intoNixOS:masterfrom
trofi:meld-leaner-closure

Conversation

@trofi
Copy link
Contributor

@trofi trofi commented Nov 4, 2023

Use pythonPath instead of propagatedBuildInputs.

Closure before the change:

$ nix path-info -rsSh $(nix-build '<nixpkgs>' -A meld) | unnix | nl | tail -n1
185  /<<NIX>>/meld-3.22.0 5.2M  512.7M

After the change:

 $ nix path-info -rsSh $(nix-build -A meld) | unnix | nl | tail -n1
155  /<<NIX>>/meld-3.22.0 5.2M  480.8M

This way we avoid 30 depends and 32MB of closure. Those were the following packages:

/<<NIX>>/brotli-1.1.0
/<<NIX>>/brotli-1.1.0-dev
/<<NIX>>/bzip2-1.0.8-dev
/<<NIX>>/cairo-1.16.0-dev
/<<NIX>>/expat-2.5.0-dev
/<<NIX>>/fontconfig-2.14.2-bin
/<<NIX>>/fontconfig-2.14.2-dev
/<<NIX>>/freetype-2.13.2-dev
/<<NIX>>/gettext-0.21.1
/<<NIX>>/glib-2.76.4-bin
/<<NIX>>/glib-2.76.4-dev
/<<NIX>>/glibc-2.38-23-bin
/<<NIX>>/glibc-2.38-23-dev
/<<NIX>>/glibc-iconv-2.38
/<<NIX>>/libelf-0.8.13
/<<NIX>>/libffi-3.4.4-dev
/<<NIX>>/libGL-1.6.0-dev
/<<NIX>>/libglvnd-1.6.0-dev
/<<NIX>>/libpng-apng-1.6.40-dev
/<<NIX>>/libX11-1.8.7-dev
/<<NIX>>/libXau-1.0.11-dev
/<<NIX>>/libxcb-1.16-dev
/<<NIX>>/libXext-1.3.5-dev
/<<NIX>>/libXrender-0.9.11-dev
/<<NIX>>/linux-headers-6.5
/<<NIX>>/python3.11-pygobject-3.44.1-dev
/<<NIX>>/xcb-util-0.4.1
/<<NIX>>/xcb-util-0.4.1-dev
/<<NIX>>/xorgproto-2023.2
/<<NIX>>/zlib-1.3-dev

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@FliegendeWurst FliegendeWurst added the 6.topic: closure size The final size of a derivation, including its dependencies label Nov 4, 2023
@ofborg ofborg bot requested review from jtojnar and mimame November 4, 2023 14:04
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Nov 4, 2023
Comment on lines 48 to 51
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears to work without this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed buildInputs addition and left only pythonPath.

Use `pythonPath` instead of `propagatedBuildInputs`.

Closure before the change:

    $ nix path-info -rsSh $(nix-build '<nixpkgs>' -A meld) | unnix | nl | tail -n1
    185  /<<NIX>>/meld-3.22.0 5.2M  512.7M

After the change:

    $ nix path-info -rsSh $(nix-build -A meld) | unnix | nl | tail -n1
   155  /<<NIX>>/meld-3.22.0 5.2M  480.8M

This way we avoid 30 depends and 32MB of closure. Those were the
following packages:

    /<<NIX>>/brotli-1.1.0
    /<<NIX>>/brotli-1.1.0-dev
    /<<NIX>>/bzip2-1.0.8-dev
    /<<NIX>>/cairo-1.16.0-dev
    /<<NIX>>/expat-2.5.0-dev
    /<<NIX>>/fontconfig-2.14.2-bin
    /<<NIX>>/fontconfig-2.14.2-dev
    /<<NIX>>/freetype-2.13.2-dev
    /<<NIX>>/gettext-0.21.1
    /<<NIX>>/glib-2.76.4-bin
    /<<NIX>>/glib-2.76.4-dev
    /<<NIX>>/glibc-2.38-23-bin
    /<<NIX>>/glibc-2.38-23-dev
    /<<NIX>>/glibc-iconv-2.38
    /<<NIX>>/libelf-0.8.13
    /<<NIX>>/libffi-3.4.4-dev
    /<<NIX>>/libGL-1.6.0-dev
    /<<NIX>>/libglvnd-1.6.0-dev
    /<<NIX>>/libpng-apng-1.6.40-dev
    /<<NIX>>/libX11-1.8.7-dev
    /<<NIX>>/libXau-1.0.11-dev
    /<<NIX>>/libxcb-1.16-dev
    /<<NIX>>/libXext-1.3.5-dev
    /<<NIX>>/libXrender-0.9.11-dev
    /<<NIX>>/linux-headers-6.5
    /<<NIX>>/python3.11-pygobject-3.44.1-dev
    /<<NIX>>/xcb-util-0.4.1
    /<<NIX>>/xcb-util-0.4.1-dev
    /<<NIX>>/xorgproto-2023.2
    /<<NIX>>/zlib-1.3-dev
@trofi trofi force-pushed the meld-leaner-closure branch from 238a91a to 51a383c Compare November 4, 2023 14:39
@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one person. label Nov 4, 2023
@ofborg ofborg bot requested a review from jtojnar November 4, 2023 15:29
@delroth delroth added 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Nov 4, 2023
Copy link
Member

@Atemu Atemu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Result of nixpkgs-review pr 265454 run on x86_64-linux 1

4 packages built:
  • meld
  • rabbitvcs
  • rabbitvcs.cli
  • rabbitvcs.dist

Result of nixpkgs-review pr 265454 run on aarch64-darwin 1

1 package built:
  • meld

@Atemu Atemu merged commit c3b7ca3 into NixOS:master Nov 8, 2023
@trofi trofi deleted the meld-leaner-closure branch November 8, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: closure size The final size of a derivation, including its dependencies 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants