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

jshon: 20160111.2 -> 20170302 + musl build #87109

Merged
merged 2 commits into from May 7, 2020
Merged

Conversation

B4dM4n
Copy link
Contributor

@B4dM4n B4dM4n commented May 6, 2020

Motivation for this change

Primary intend is fixing the musl build of jshon. The version update is only to simplify the package.

The removed patch is merged in keenerd/jshon@d919aea.

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"

    The only dependent package hyper-haskell is currently failing on master.

nix-review log
%  nix-review rev HEAD
2 packages updated:
hyper-haskell jshon (20160111.2 → 20170302)

$ nix build --no-link --keep-going --option build-use-sandbox relaxed -f /home/fabian/.cache/nixpkgs-review/rev-791d76e8c5d55965035e3ef6eb9df9708ee9f222-1/build.nix
builder for '/nix/store/l7ahwszpb1gwkb707qa2i77rd1rnlwgl-hyper-0.1.0.3.drv' failed with exit code 1; last 10 log lines:
  die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:1022:20 in Cabal-3.0.1.0:Distribution.Simple.Configure
  configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:475:12 in Cabal-3.0.1.0:Distribution.Simple.Configure
  configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:625:20 in Cabal-3.0.1.0:Distribution.Simple
  confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:65:5 in Cabal-3.0.1.0:Distribution.Simple.UserHooks
  configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:180:19 in Cabal-3.0.1.0:Distribution.Simple
  defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:116:27 in Cabal-3.0.1.0:Distribution.Simple
  defaultMain, called at Setup.hs:2:8 in main:Main
Setup: Encountered missing or private dependencies:
base >=4.6 && <4.13
cannot build derivation '/nix/store/wa7qa3fasv0zndl4nva9naq57k1p2pa6-hyper-extra-0.1.0.3.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/acvpha2gi56aakdfh9jgpb79c3bg9pav-hyper-haskell-server-0.2.1.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/8v9k7n7psklsb0gn266akxrdygrgym2m-ghc-8.8.3-with-packages.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/mv9mncjnrll72h6lmq8lw3g8slihmmss-hyper-haskell-server-with-packages-8.8.3.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/2dhvfzz38b3h11h5vxh5b6im8584zajp-hyper-haskell-0.1.0.2.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/0dnb0arnr6d5z9a24lp41yzypdisrb4x-env.drv': 1 dependencies couldn't be built
[0 built (1 failed)]
error: build of '/nix/store/0dnb0arnr6d5z9a24lp41yzypdisrb4x-env.drv' failed
1 package failed to build:
hyper-haskell

1 package built:
jshon
  • 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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@B4dM4n
Copy link
Contributor Author

B4dM4n commented May 6, 2020

I pushed a new version with the upstream patch.

While changing this I noticed that the "null termination" patch was never working, because patches and patchPhase where used at the same time.

buildInputs = [ jansson ];

patchPhase =
patches = lib.optional stdenv.hostPlatform.isMusl
Copy link
Member

Choose a reason for hiding this comment

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

Just unconditionally apply this. That way it is less likely to bitrot.
The patch should build cleanly with glibc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, the glibc build also succeeds with the patch.

I pushed a new version.

@Mic92
Copy link
Member

Mic92 commented May 7, 2020

Result of nixpkgs-review pr 87109 1

1 package failed to build:
- hyper-haskell
1 package built:
- jshon

@Mic92 Mic92 merged commit 05aa39e into NixOS:master May 7, 2020
@B4dM4n B4dM4n deleted the jshon-update branch May 7, 2020 09:05
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

2 participants