Skip to content

haskell-generic-builder: pass pname and version as is#127658

Merged
maralorn merged 1 commit intoNixOS:haskell-updatesfrom
sternenseemann:haskell-generic-builder-pname-version
Jun 22, 2021
Merged

haskell-generic-builder: pass pname and version as is#127658
maralorn merged 1 commit intoNixOS:haskell-updatesfrom
sternenseemann:haskell-generic-builder-pname-version

Conversation

@sternenseemann
Copy link
Copy Markdown
Member

This is a full set rebuild, however it improves the name generation
for the static and cross case since the respective additional
components are now inserted between pname and version instead of after
name like before. This prevents builtins.parseDrvName from mistaking a
platform config string for a version component.

(Untested so far)

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 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.

This is a full set rebuild, however it improves the name generation
for the static and cross case since the respective additional
components are now inserted between pname and version instead of after
name like before. This prevents builtins.parseDrvName from mistaking a
platform config string for a version component.
@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Jun 21, 2021
@sternenseemann sternenseemann marked this pull request as ready for review June 21, 2021 17:07
@sternenseemann
Copy link
Copy Markdown
Member Author

Built /nix/store/lvs6rvvnlkid6g0wv7qxsr62nfndpvxc-cabal2nix-unstable-2021-06-12 to verify it's good.

Copy link
Copy Markdown
Member

@maralorn maralorn left a comment

Choose a reason for hiding this comment

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

LGTM. Will merge this after the haskell-updates merge.

@cdepillabout
Copy link
Copy Markdown
Member

cdepillabout commented Jun 22, 2021

@sternenseemann I'm just curious, but could you give an example of how this fixes a package? For example, when doing a static or cross build, what is an example of what a package name looked like before this change? What does it look like now with this change?

@sternenseemann
Copy link
Copy Markdown
Member Author

sternenseemann commented Jun 22, 2021

$ nix-instantiate -A pkgsStatic.haskellPackages.hello -A pkgsCross.aarch64-multiplatform.haskellPackages.hello
/nix/store/0nvxybp8av7gczd939hp8bh71x5f0vv2-hello-static-x86_64-unknown-linux-musl-1.0.0.2.drv
/nix/store/kj6cph9qwxigf446q5r8pcrrf1yrwscv-hello-aarch64-unknown-linux-gnu-1.0.0.2.drv

On master:

/nix/store/3dwhlcqi3qaczzs9q9vf23c9y10wps8y-hello-1.0.0.2-x86_64-unknown-linux-musl.drv
/nix/store/ff7g49qiyrc84ni7zsfjx903rbj0s781-hello-1.0.0.2-aarch64-unknown-linux-gnu.drv

@cdepillabout
Copy link
Copy Markdown
Member

@sternenseemann Ah, nice. This looks like a strict improvement!

@sternenseemann
Copy link
Copy Markdown
Member Author

See also #120762 for additional context.

@maralorn maralorn merged commit dba40df into NixOS:haskell-updates Jun 22, 2021
@sternenseemann sternenseemann deleted the haskell-generic-builder-pname-version branch June 22, 2021 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants