Skip to content

Comments

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

Merged
Ericson2314 merged 2 commits intoNixOS:stagingfrom
Strum355:http-parser-static
Nov 30, 2023
Merged

http-parser: fix copying outputs for static build#254516
Ericson2314 merged 2 commits intoNixOS:stagingfrom
Strum355:http-parser-static

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.

@ofborg ofborg bot requested a review from matthewbauer September 11, 2023 07:13
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Sep 11, 2023
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

@FliegendeWurst FliegendeWurst added 12.approvals: 1 This PR was reviewed and approved by one person. 6.topic: static Static builds (e.g. pkgsStatic) labels Nov 3, 2023
Ericson2314 and others added 2 commits November 29, 2023 23:35
Since 4056c43 a Make not Gyp build
system has been in use.
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
@github-actions
Copy link
Contributor

Successfully created backport PR for staging-23.05:

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

Successfully created backport PR for staging-23.11:

@github-actions
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

Labels

6.topic: static Static builds (e.g. pkgsStatic) 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants