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

termite: factor wrapper out into its own file #43691

Merged
merged 1 commit into from Aug 1, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Jul 17, 2018

Motivation for this change

Until now it's impossible to override the attrs of the actual build
instruction for the termite package like this:

termite.overrideAttrs (_: {
  # ...
})

This issue occurs since the termite/default.nix expressions returns
the symlinkJoin expression when I override termite (e.g. to provide a
config file).

I recently patched termite and wanted to apply this patch to my local
termite installation in my system config which is impossible this, so
splitting the wrapper and the build instruction into their own files
makes this way easier to maintian.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@Ma27 Ma27 changed the title termtie: factor wrapper out into its own file termite: factor wrapper out into its own file Jul 17, 2018
@mnacamura
Copy link
Contributor

File name wrapper.nix for the unwrapped one might be confusing?

@Ma27
Copy link
Member Author

Ma27 commented Jul 18, 2018

you're actually right, the wrapped version should be in wrapped.nix %)

Until now it's impossible to override the attrs of the actual build
instruction for the `termite` package like this:

```
termite.overrideAttrs (_: {
  # ...
})
```

This issue occurs since the `termite/default.nix` expressions returns
the `symlinkJoin` expression when I override termite (e.g. to provide a
config file).

I recently patched termite and wanted to apply this patch to my local
termite installation in my system config which is impossible this, so
splitting the wrapper and the build instruction into their own files
makes this way easier to maintian.
@Ma27
Copy link
Member Author

Ma27 commented Jul 18, 2018

good catch @mnacamura! I fixed it in the latest commit 1f55aaa

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: termite

Partial log (click to expand)

Cannot nix-instantiate `termite' because:
GC Warning: Failed to expand heap by 10737418240 bytes
Can't start up: not enough memory

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: termite

Partial log (click to expand)

gzipping man pages under /nix/store/c9wx84v10yfylkxywpynck304c2qq7k6-termite-13/share/man/
strip is /nix/store/7iyn7gn33i7xxjgmwf25k20246y6nd9d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/c9wx84v10yfylkxywpynck304c2qq7k6-termite-13/bin
patching script interpreter paths in /nix/store/c9wx84v10yfylkxywpynck304c2qq7k6-termite-13
checking for references to /build in /nix/store/c9wx84v10yfylkxywpynck304c2qq7k6-termite-13...
shrinking RPATHs of ELF executables and libraries in /nix/store/ra030q7a8kbb04kgla8ibanvicrqnjld-termite-13-terminfo
strip is /nix/store/7iyn7gn33i7xxjgmwf25k20246y6nd9d-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/ra030q7a8kbb04kgla8ibanvicrqnjld-termite-13-terminfo
checking for references to /build in /nix/store/ra030q7a8kbb04kgla8ibanvicrqnjld-termite-13-terminfo...
/nix/store/c9wx84v10yfylkxywpynck304c2qq7k6-termite-13

@xeji
Copy link
Contributor

xeji commented Aug 1, 2018

@GrahamcOfBorg build termite

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: termite

Partial log (click to expand)

gzipping man pages under /nix/store/irlbkfdj7n5ds80ikbfkjwy0gpl40lv0-termite-13/share/man/
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/irlbkfdj7n5ds80ikbfkjwy0gpl40lv0-termite-13/bin
patching script interpreter paths in /nix/store/irlbkfdj7n5ds80ikbfkjwy0gpl40lv0-termite-13
checking for references to /build in /nix/store/irlbkfdj7n5ds80ikbfkjwy0gpl40lv0-termite-13...
shrinking RPATHs of ELF executables and libraries in /nix/store/pggr757wmv37491kpqj3i6j0n560w9i8-termite-13-terminfo
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/pggr757wmv37491kpqj3i6j0n560w9i8-termite-13-terminfo
checking for references to /build in /nix/store/pggr757wmv37491kpqj3i6j0n560w9i8-termite-13-terminfo...
/nix/store/irlbkfdj7n5ds80ikbfkjwy0gpl40lv0-termite-13

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: termite

Partial log (click to expand)

gzipping man pages under /nix/store/6dv5hf5gcsgj1i5kdb9k9klqwwmra561-termite-13/share/man/
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/6dv5hf5gcsgj1i5kdb9k9klqwwmra561-termite-13/bin
patching script interpreter paths in /nix/store/6dv5hf5gcsgj1i5kdb9k9klqwwmra561-termite-13
checking for references to /build in /nix/store/6dv5hf5gcsgj1i5kdb9k9klqwwmra561-termite-13...
shrinking RPATHs of ELF executables and libraries in /nix/store/a2d52mxzrcyqa7dd5wz6kyw4dr21mz66-termite-13-terminfo
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/a2d52mxzrcyqa7dd5wz6kyw4dr21mz66-termite-13-terminfo
checking for references to /build in /nix/store/a2d52mxzrcyqa7dd5wz6kyw4dr21mz66-termite-13-terminfo...
/nix/store/6dv5hf5gcsgj1i5kdb9k9klqwwmra561-termite-13

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: termite

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
Wrapping program /nix/store/lr1in190m7h4g1mwv5gskzis9vbkbx0x-termite-13/bin/termite
gzipping man pages under /nix/store/lr1in190m7h4g1mwv5gskzis9vbkbx0x-termite-13/share/man/
strip is /nix/store/qfxcr8c4fg7lkybrny9n2sb77bmippdx-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/lr1in190m7h4g1mwv5gskzis9vbkbx0x-termite-13/bin
patching script interpreter paths in /nix/store/lr1in190m7h4g1mwv5gskzis9vbkbx0x-termite-13
strip is /nix/store/qfxcr8c4fg7lkybrny9n2sb77bmippdx-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/56fqk34sbjj3a1fk0bm5kya0qrxyv4hd-termite-13-terminfo
/nix/store/lr1in190m7h4g1mwv5gskzis9vbkbx0x-termite-13

@xeji xeji merged commit 134c5cc into NixOS:master Aug 1, 2018
@Ma27 Ma27 deleted the refactor-termite-build branch August 1, 2018 14:19
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.

None yet

4 participants