Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http-parser: fix copying outputs for static build #254516

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

Strum355
Copy link
Contributor

Description of changes

Fixes derivation for http-parser in a static env to install the static archive to $out/lib, based on the following issue and non-upstreamed nix solution.

Currently, pkgsStatic.http-parser only results in a shared library in $out/lib:

$ nix build nixpkgs#legacyPackages.aarch64-linux.pkgsStatic.http-parser
$ ls -l ./result/lib
total 152
lrwxr-xr-x  1 root  nixbld     23  1 Jan  1970 libhttp_parser.so@ -> libhttp_parser.so.2.9.4
lrwxr-xr-x  1 root  nixbld     23  1 Jan  1970 libhttp_parser.so.2.9@ -> libhttp_parser.so.2.9.4
-r-xr-xr-x  1 root  nixbld  76584  1 Jan  1970 libhttp_parser.so.2.9.4*

After this change, we only have the static archive file:

$ nix build .#pkgsStatic.http-parser
$ ls -l ./result/lib
total 72
-r--r--r--  1 root  wheel  35448  1 Jan  1970 libhttp_parser.a

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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.

Copy link
Member

@FliegendeWurst FliegendeWurst left a comment

Choose a reason for hiding this comment

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

This PR should target staging since it rebuilds a lot of packages.
Patch itself LGTM.

@Strum355 Strum355 changed the base branch from master to staging November 3, 2023 13:25
@Strum355
Copy link
Contributor Author

Strum355 commented Nov 3, 2023

This PR should target staging since it rebuilds a lot of packages. Patch itself LGTM.

changed base, thx for the info 👍 @FliegendeWurst

Ericson2314 and others added 2 commits November 29, 2023 23:35
Since 4056c43 a Make not Gyp build
system has been in use.
Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

I coincidentally did this locally --- I combined with my version to fix conflicts but still give you credit

@Ericson2314
Copy link
Member

eval lib tests failure is unrelated.

@Ericson2314 Ericson2314 merged commit e4d8cfb into NixOS:staging Nov 30, 2023
8 of 10 checks passed
Copy link
Contributor

Successfully created backport PR for staging-23.05:

Copy link
Contributor

Git push to origin failed for staging-23.05 with exitcode 1

Copy link
Contributor

Successfully created backport PR for staging-23.11:

Copy link
Contributor

Git push to origin failed for staging-23.11 with exitcode 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants