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

popcorntime: 0.3.7.2 -> 0.3.8-3 #8819

Closed

Conversation

bobvanderlinden
Copy link
Member

This upgrades popcorntime from 0.3.7.2 to 0.3.8-0. 0.3.8 was packaged differently, which required to build the package from source. It also needed nwjs 0.12, which is also added in this PR.

Many thanks to @MasseGuillaume who did the initial work for the upgrade. This should solve issue #8800.

@@ -5588,6 +5588,10 @@ let

node_webkit = node_webkit_0_9;

nwjs_0_12 = callPackage ../development/tools/node-webkit/nw12.nix {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe those package should be on the same file. They are really similar

  • node_webkit_0_9
  • node_webkit_0_11
  • nwjs_0_12

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, how do you have this in mind? Make a derivation?
Do note that nwjs has a different install phase than the others.

Edit: or are you saying they should be named the same? All node_webkit_* instead of nwjs_0_12.

Copy link
Member Author

Choose a reason for hiding this comment

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

@MasseGuillaume Could you explain in a bit more detail what you meant?

Copy link
Contributor

Choose a reason for hiding this comment

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

node_webkit_0_12 = callPackage ../development/tools/node-webkit/default.nix { v = "0.12" }
node_webkit_0_11 = callPackage ../development/tools/node-webkit/default.nix { v = "0.11" }
node_webkit_0_9 = callPackage ../development/tools/node-webkit/default.nix { v = "0.9" }

Copy link
Member Author

Choose a reason for hiding this comment

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

@MasseGuillaume The sources still differ in SHA256. The installPhase differs between 0.12 and 0.11/0.9. That said, nwjs-env, bits and part of installPhase could be generalized. I can do this in a separate PR.

@bobvanderlinden
Copy link
Member Author

Update: forgot to update the ia32 sha256 of nwjs. This should be fixed now.

@bjornfor
Copy link
Contributor

Merge conflict. Please rebase.

@bobvanderlinden
Copy link
Member Author

@MasseGuillaume Is fromCi still necessary when the package is build from source?

@MasseGuillaume
Copy link
Contributor

@bobvanderlinden nope

@bobvanderlinden
Copy link
Member Author

Hmm, there is some other issue on master atm.
Trying to build:

nix-build -A 'pkgs.nodePackages.by-version."ascli"."0.3.0"'

fails:

npm ERR! Linux 3.18.13
npm ERR! argv "/nix/store/fz6hvh4gqvlw81zaz593hm47i5wfmivn-nodejs-0.12.7/bin/node" "/nix/store/fz6hvh4gqvlw81zaz593hm47i5wfmivn-nodejs-0.12.7/bin/npm" "--registry" "http://www.example.com" "--nodedir=/nix/store/50khl4g71xx9fjpyycrzqhgzv73l9ah6-node-sources" "install" "/tmp/nix-build-nodejs-ascli-0.3.0.drv-1/package/../build-dir/package.tgz" "--fetch-retries" "0"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo

npm ERR! network getaddrinfo ENOTFOUND www.example.com
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/nix-build-nodejs-ascli-0.3.0.drv-1/build-dir/npm-debug.log

PopcornTime indirectly depends on ascli, so I get this same error when building popcorntime. I haven't figured out yet how to solve this.

@bjornfor
Copy link
Contributor

I'd like to merge this, but I have some concerns:

  • Ouch, that (hopefully generated!) node.nix file is almost 400 KiB!
  • The last commit updates node.nix, a file which is introduced in this PR. Please squash it (or do whatever is needed to have the most linear history (within PR) without breaking git bisect).

@bjornfor
Copy link
Contributor

https://git.popcorntime.io/popcorntime/desktop.git (with leaveDotGit=1) has a new hash now :-(

output path ‘/nix/store/7w6qkls7d32lr053yxwkg3lwa7z8r9am-desktop’ should have r:sha256 hash ‘0n12i4ra64r2p0n7v6wgsxf533v7m743ibj071rkildr647bhmz9’, instead has ‘0301bvx6wp7gwbj29xkb67fs3drv6w7zxmvkdrqn7cqhwjwif71f’

Would building without leaveDotGit be a good idea?

@bobvanderlinden
Copy link
Member Author

@bjornfor Yes, it is generated with npm2nix. It hasn't occurred to me that it was so big! :|

An alternative would be to include a shrinkwrap file (a file that includes all specific versions of the dependencies and hash node_modules in its entirety) and use npm install to install all packages. The downside of this method is, IF the hash changes (and it very well could), you'd have no idea which of the dependencies has changed and just have to recreate the hash.

Other than that, leaveDotGit was there for a reason, but I don't know whether it's still needed. I'll have to check when the build succeeds.

At the moment it seems the popcorntime devs have moved their opensubtitles repository, which results in faulty dependency in popcorntime-desktop (cannot find https://git.popcorntime.io/popcorntime/opensubtitles.git). I've opened an issue at popcorntime: https://git.popcorntime.io/popcorntime/desktop/issues/1447

@domenkozar
Copy link
Member

is this ready?

@bobvanderlinden
Copy link
Member Author

@domenkozar Short answer: no.

I've just updated node.nix and the packages to the latest version of Popcorntime (0.3.8-3). However, I still got trouble with npm. I've been tearing my hear out a number of times on this and similar issues.

In this case, versions of some sub-sub-dependency are ill-defined. For instance optjs has version 3.2.1-boom (https://github.com/dcodeIO/opt.js/blob/master/package.json#L4), which isn't a valid semver version. I'm not sure whether this actually is the problem, but it seems closest.

That's all for a source-based package. I also tried 0.3.8-3 as a binary package and comes very close to working, so we might not need all the hair-tearing mentioned above.
With the binary-based package (found here: https://github.com/bobvanderlinden/nixpkgs/tree/popcorntime-bin-0.3.8-3), the interface starts, but videos do not play yet. This probably has to do with libffmpegsumo.so being incompatible, but I'll give it another go tomorrow.

@bobvanderlinden bobvanderlinden changed the title popcorntime: 0.3.7.2 -> 0.3.8-0 popcorntime: 0.3.7.2 -> 0.3.8-3 Sep 5, 2015
@bobvanderlinden
Copy link
Member Author

Alright, finally got everything worked out. This doesn't build everything from source, like it would do when I started this PR, but it uses the distributed package from Popcorntime and combines that with nwjs from NixOS. This way, things work. 🎉

Also, Popcorntime depends on nwjs 0.12, so I've added that as a separate commit. Let me know if I should squash these 2 before it can be merged.

I've also removed the fromCi stuff, since that is not needed anymore.

@domenkozar Yes, it's ready now.

@bjornfor
Copy link
Contributor

bjornfor commented Sep 5, 2015

@bobvanderlinden: Sweet! Thanks!

@bjornfor
Copy link
Contributor

bjornfor commented Sep 5, 2015

Pushed to master (e6e3384).

@bjornfor
Copy link
Contributor

bjornfor commented Sep 5, 2015

And cherry-picked to release-15.09 (0903632). Closing.

@bjornfor bjornfor closed this Sep 5, 2015
@bobvanderlinden
Copy link
Member Author

@bjornfor Thanks for the quick merge

@bobvanderlinden bobvanderlinden deleted the popcorntime-0.3.8 branch September 5, 2015 14:08
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Sep 5, 2015

@bobvanderlinden Thanks for all the work you have done.
I have build popcorntime from your fork and tried it: everything seems to work except there's no audio playing in the 720p and 1080p versions of tv shows.
Could it be a missing codec?

@bobvanderlinden
Copy link
Member Author

@rnhmjoj Not a packaging issue. See #8800 (comment)

Try a recent episode. For instance Adventure Time S06E16 works flawlessly.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Sep 5, 2015

@bobvanderlinden Thank you again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants