Skip to content

eztrace: 1.1-11 -> 2.1.1, fix build, adopt, otf2: fix cross - #388855

Merged
LeSuisse merged 9 commits into
NixOS:masterfrom
xokdvium:eztrace
Apr 22, 2025
Merged

LeSuisse merged 9 commits into
NixOS:masterfrom
xokdvium:eztrace

Conversation

@xokdvium

Copy link
Copy Markdown
Contributor

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions Bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 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 Mar 11, 2025
Comment thread pkgs/by-name/ez/eztrace/package.nix Resolved
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Mar 11, 2025
@xokdvium
xokdvium requested a review from Sigmanificient March 11, 2025 07:43
@xokdvium xokdvium removed the 12.approvals: 1 This PR was reviewed and approved by one person. label Mar 11, 2025

@antonmosich antonmosich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 388855


x86_64-linux

✅ 6 packages built:
  • eztrace
  • eztrace.lib
  • eztrace.man
  • libotf2
  • libotf2.doc
  • libotf2.lib

Comment thread pkgs/by-name/ez/eztrace/package.nix Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
license = lib.licenses.cecill-b;
homepage = "https://eztrace.gitlab.io/eztrace/index.html";
license = lib.licenses.cecill-b;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Added meta.homepage

@0xda157

0xda157 commented Apr 18, 2025 •

Copy link
Copy Markdown
Contributor

eztrace is already being updated and cleaned up by #395939, but we should probably use this one.

@0xda157 0xda157 mentioned this pull request Apr 18, 2025
3 of 13 tasks
@xokdvium

xokdvium commented Apr 18, 2025 •

Copy link
Copy Markdown
Contributor Author

Huh, it seems libotf got packaged at some point after I submitted this patch. I will drop it then and cherry-pick some cross fixes I came up with here to otf2 derivation.

@xokdvium xokdvium changed the title libotf2: init at 3.1, eztrace: 1.1-11 -> 2.1.1, fix build, adopt eztrace: 1.1-11 -> 2.1.1, fix build, adopt, otf2: fix cross Apr 18, 2025
@ofborg ofborg Bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Apr 18, 2025
@nix-owners
nix-owners Bot requested a review from LeSuisse April 18, 2025 21:31
@xokdvium

Copy link
Copy Markdown
Contributor Author

@awwpotato, fyi it seems that nix-update-script doesn't do the right thing for eztrace. For me it downgrades from 2.1.1 -> 2.1. I'm not very familiar with how it works under the hood and I'm not sure how to fix that. Since you enabled that in #395939 maybe you have some ideas?

Comment thread pkgs/by-name/ez/eztrace/package.nix Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
homepage = "https://eztrace.gitlab.io/eztrace/index.html";
homepage = "https://eztrace.gitlab.io/eztrace/index.html";
downloadPage = "https://gitlab.com/eztrace/eztrace/";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not resolved

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thnx, missed this. Done

@0xda157

0xda157 commented Apr 18, 2025

Copy link
Copy Markdown
Contributor

fyi it seems that nix-update-script doesn't do the right thing for eztrace. For me it downgrades from 2.1.1 -> 2.1. I'm not very familiar with how it works under the hood and I'm not sure how to fix that. Since you enabled that in #395939 maybe you have some ideas?

It's because nix-update uses the latest release if one is found https://github.com/Mic92/nix-update/blob/d3a58c41034c788e7917ea09fe051acbe56dc5c4/nix_update/version/gitlab.py#L40. Someone should probably submit a feature request for always using the latest tag.

Comment thread pkgs/by-name/ez/eztrace/package.nix Outdated
Comment on lines 38 to 41

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
substituteInPlace cmake_modules/FindOTF2.cmake \
--replace-fail "find_program(OTF2_CONFIG otf2-config REQUIRED)" \
"find_program(OTF2_CONFIG "${lib.getExe' otf2 "otf2-config"}" REQUIRED)"
substituteInPlace cmake_modules/FindOTF2.cmake \
substituteInPlace cmake_modules/FindOTF2.cmake \
--replace-fail "find_program(OTF2_CONFIG otf2-config REQUIRED)" \
"find_program(OTF2_CONFIG "${lib.getExe' otf2 "otf2-config"}" REQUIRED)" \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed.

@xokdvium
xokdvium requested review from 0xda157 and antonmosich April 21, 2025 18:10
postInstall = ''
moveToOutput bin/eztrace_create_plugin "$dev"
'';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.updateScript = nix-update-script { };

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I might be misunderstanding something. What's the purpose of enabling nix-update-script, if it doesn't do the right thing here (#388855 (comment))?
Also the same goes for versionCheckHook. The version we are packaging 2.1.1 reports as being 2.1.0 (defined here), so the hook would have to be disabled either way. I suppose we could patch the sources to report the correct version, but that sort of defeats the purpose of the hook. Do you think that would be worthwhile?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, I might be misunderstanding something. What's the purpose of enabling nix-update-script, if it doesn't do the right thing here (#388855 (comment))?

Oops forgot about that issue.

Also the same goes for versionCheckHook. The version we are packaging 2.1.1 reports as being 2.1.0 (defined here), so the hook would have to be disabled either way. I suppose we could patch the sources to report the correct version, but that sort of defeats the purpose of the hook. Do you think that would be worthwhile?

I would patch the version because versionCheckHook also ensures that binary is installed correctly and runs, but you don't have to.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would patch the version because versionCheckHook also ensures that binary is installed correctly and runs,

Makes sense, done.

Upstream seemingly forgot to bump their patch version
for 2.1.1 and do a gitlab release as well.

Use `versionCheckHook` as a smoke test for
installation completeness.

@LeSuisse LeSuisse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Quick test looks good.

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 388855


x86_64-linux

✅ 7 packages built:
  • eztrace
  • eztrace.dev
  • eztrace.lib
  • eztrace.man
  • otf2
  • otf2.doc
  • otf2.lib

@LeSuisse
LeSuisse merged commit 7416ca5 into NixOS:master Apr 22, 2025
@LeSuisse LeSuisse mentioned this pull request Apr 22, 2025
3 of 13 tasks
@xokdvium
xokdvium deleted the eztrace branch April 22, 2025 08:02
@Sigmanificient Sigmanificient mentioned this pull request May 21, 2025
27 of 28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants