2015-06-25 19:05:52 +02:00
|
|
|
{ stdenv, fetchurl, runCommand, makeWrapper, node_webkit_0_9
|
2015-06-08 19:33:23 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
version = "0.3.7.2";
|
2015-06-19 23:18:05 +02:00
|
|
|
|
|
|
|
popcorntimePackage = stdenv.mkDerivation rec {
|
|
|
|
name = "popcorntime-package-${version}";
|
2015-07-04 20:32:45 +02:00
|
|
|
src =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
|
|
|
fetchurl {
|
|
|
|
url = "https://get.popcorntime.io/build/Popcorn-Time-${version}-Linux64.tar.xz";
|
|
|
|
sha256 = "0lm9k4fr73a9p00i3xj2ywa4wvjf9csadm0pcz8d6imwwq44sa8b";
|
|
|
|
}
|
|
|
|
else if stdenv.system == "i686-linux" then
|
|
|
|
fetchurl {
|
|
|
|
url = "https://get.popcorntime.io/build/Popcorn-Time-${version}-Linux32.tar.xz";
|
|
|
|
sha256 = "1dz1cp31qbwamm9pf8ydmzzhnb6d9z73bigdv3y74dgicz3dpr91";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
throw "Unsupported system ${stdenv.system}";
|
2015-06-08 19:33:23 +02:00
|
|
|
sourceRoot = ".";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r *.so *.pak $out/
|
2015-06-25 19:05:52 +02:00
|
|
|
cat ${node_webkit_0_9}/bin/nw package.nw > $out/Popcorn-Time
|
2015-06-08 19:33:23 +02:00
|
|
|
chmod 555 $out/Popcorn-Time
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
|
|
|
runCommand "popcorntime-${version}" {
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://popcorntime.io/;
|
|
|
|
description = "An application that streams movies and TV shows from torrents";
|
|
|
|
license = stdenv.lib.licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ bobvanderlinden ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper ${popcorntimePackage}/Popcorn-Time $out/bin/popcorntime
|
|
|
|
''
|