Skip to content

Comments

libdeltachat: do not use __FILE__ as a path to headers location#268920

Merged
dotlambda merged 1 commit intoNixOS:masterfrom
trofi:libdeltachat-fix-path
Nov 21, 2023
Merged

libdeltachat: do not use __FILE__ as a path to headers location#268920
dotlambda merged 1 commit intoNixOS:masterfrom
trofi:libdeltachat-fix-path

Conversation

@trofi
Copy link
Contributor

@trofi trofi commented Nov 21, 2023

-fmacro-prefix-map= option can redirect path from the actual source location to the unrelated path (build-time vs debug-time).

The change expands __FILE__ in deltachat.h to the absolute location to stop relying on __FILE__ expansion.

The change fixes python3.pkgs.deltachat for me.

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.

Priorities

Add a 👍 reaction to pull requests you find important.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Why use $out once and ${placeholder "out"} the other time?
EDIT: I guess the latter just avoids quoting issues.

@trofi
Copy link
Contributor Author

trofi commented Nov 21, 2023

Why use $out once and ${placeholder "out"} the other time? EDIT: I guess the latter just avoids quoting issues.

Yeah, placeholder is slightly easier to put into '"..."'

`-fmacro-prefix-map=` option can redirect path from the actual source
location to the unrelated path (`build-time` vs `debug-time`).

The change expands `__FILE__` in `deltachat.h` to the absolute location
to stop relying on `__FILE__` expansion.

The change fixes `python3.pkgs.deltachat` for me.

Co-authored-by: Robert Schütz <github@dotlambda.de>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
@trofi trofi force-pushed the libdeltachat-fix-path branch from 9fe194e to 30bdf7a Compare November 21, 2023 10:28
@trofi
Copy link
Contributor Author

trofi commented Nov 21, 2023

Squashed all the applied suggestions into a single commit.

@ofborg ofborg bot requested a review from dotlambda November 21, 2023 12:07
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Nov 21, 2023
@dotlambda
Copy link
Member

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

1 package failed to build:
  • kdeltachat
8 packages built:
  • deltachat-cursed
  • deltachat-cursed.dist
  • deltachat-desktop
  • libdeltachat
  • python310Packages.deltachat
  • python310Packages.deltachat.dist
  • python311Packages.deltachat
  • python311Packages.deltachat.dist

@dotlambda dotlambda merged commit 506a458 into NixOS:master Nov 21, 2023
@trofi trofi deleted the libdeltachat-fix-path branch November 21, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants