Skip to content

sift: fix build for darwin #25844

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

Merged
merged 1 commit into from
May 17, 2017
Merged

sift: fix build for darwin #25844

merged 1 commit into from
May 17, 2017

Conversation

eqyiel
Copy link
Contributor

@eqyiel eqyiel commented May 17, 2017

Motivation for this change

This package can build on darwin but suffers from the same problem described here: #18131 (comment)

Before:

$ nix-build -I nixpkgs=. -E 'with import <nixpkgs> {}; callPackage pkgs/tools/text/sift {}'
these derivations will be built:
  /nix/store/7ggs2rii2jz7viwcfsgd56ibw9i7s2fj-sift-0.8.0.drv
building path(s) ‘/nix/store/p1g7jzj6rsdxb3xay7612ykqi7bpnp8j-sift-0.8.0’, ‘/nix/store/xzfa87j2gb1fhwypd3hblgm4b3gn3m4w-sift-0.8.0-bin’
unpacking sources
unpacking source archive /nix/store/5ngj6nj90hjjsxpz3ynnkyzw5kzzhxmj-sift-v0.8.0-src
source root is sift-v0.8.0-src
patching sources
configuring
grep: Invalid range end
unpacking source archive /nix/store/ggc90hhc25jpymh4hx45qq7nldnyh7hb-crypto-575fdbe
unpacking source archive /nix/store/gd7l7hfks2011r91xr01bzm475bsgbpi-go-flags-4bcbad3
unpacking source archive /nix/store/zg6y9v9gkxyjb72rq0zranxf1zbms722-go-nbreader-7cef48d
building
github.com/svent/sift/gitignore
github.com/svent/go-flags
golang.org/x/crypto/ssh/terminal
github.com/svent/go-nbreader
github.com/svent/sift
# github.com/svent/sift
ld: warning: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation, ignoring unexpected dylib file
installing
/private/var/folders/jt/qgrx8lp10ylbdlnb93t54r6c0000gn/T/nix-build-sift-0.8.0.drv-0/go /private/var/folders/jt/qgrx8lp10ylbdlnb93t54r6c0000gn/T/nix-build-sift-0.8.0.drv-0
/private/var/folders/jt/qgrx8lp10ylbdlnb93t54r6c0000gn/T/nix-build-sift-0.8.0.drv-0
post-installation fixup
stripping (with flags -S) in /nix/store/xzfa87j2gb1fhwypd3hblgm4b3gn3m4w-sift-0.8.0-bin/bin
patching script interpreter paths in /nix/store/xzfa87j2gb1fhwypd3hblgm4b3gn3m4w-sift-0.8.0-bin
patching script interpreter paths in /nix/store/p1g7jzj6rsdxb3xay7612ykqi7bpnp8j-sift-0.8.0
cycle detected in the references of ‘/nix/store/p1g7jzj6rsdxb3xay7612ykqi7bpnp8j-sift-0.8.0’
error: build of ‘/nix/store/7ggs2rii2jz7viwcfsgd56ibw9i7s2fj-sift-0.8.0.drv’ failed
nix-build -I nixpkgs=. -E   3.15s user 2.03s system 36% cpu 14.235 total

After:

$ nix-build -I nixpkgs=. -E 'with import <nixpkgs> {}; callPackage pkgs/tools/text/sift {}'
...
/nix/store/f8i8sqqs3k23pvviz7bb20l9356jzqbz-sift-0.8.0-bin
$ ./result-bin/bin/sift
Error: No pattern given. Try 'sift --help' for more information.

The problem in #16820 also seems to have gone away.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@mention-bot
Copy link

@eqyiel, thanks for your PR! By analyzing the history of the files in this pull request, we identified @carlsverre and @kamilchm to be potential reviewers.

@carlsverre
Copy link
Contributor

Nice! I just tested this diff on my Linux machine to sanity check that it doesn't change anything there. LGTM

@LnL7 LnL7 added the 6.topic: darwin Running or building packages on Darwin label May 17, 2017
@LnL7 LnL7 merged commit b8e80d9 into NixOS:master May 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants