popcorntime: 0.3.8-3 -> 0.3.9

This commit is contained in:
rnhmjoj 2016-03-16 21:54:00 +01:00
parent 065a758ef4
commit fa683ab455

View File

@ -1,53 +1,43 @@
{ lib, stdenv, fetchurl, runCommand, makeWrapper, nwjs, zip }: { lib, stdenv, fetchurl, makeWrapper, nwjs, zip }:
let let
version = "0.3.8-3"; arch = if stdenv.system == "x86_64-linux" then "64"
else if stdenv.system == "i686-linux" then "32"
else throw "Unsupported system ${stdenv.system}";
popcorntimePackage = stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "popcorntime-${version}"; name = "popcorntime-${version}";
src = if stdenv.system == "x86_64-linux" then version = "0.3.9";
fetchurl {
url = "http://get.popcorntime.io/build/Popcorn-Time-${version}-Linux-64.tar.xz";
sha256 = "0q8c6m9majgv5a6hjl1b2ndmq4xx05zbarsydhqkivhh9aymvxgm";
}
else if stdenv.system == "i686-linux" then
fetchurl {
url = "https://get.popcorntime.io/build/Popcorn-Time-${version}-Linux-32.tar.xz";
sha256 = "1dz1cp31qbwamm9pf8ydmzzhnb6d9z73bigdv3y74dgicz3dpr92";
}
else throw "Unsupported system ${stdenv.system}";
sourceRoot = "."; src = fetchurl {
url = "http://get.popcorntime.sh/build/Popcorn-Time-${version}-Linux-${arch}.tar.xz";
buildInputs = [ zip ]; sha256 =
if arch == "64"
buildPhase = '' then "0qaqdz45frgiy440jyz6hikhklx2yp08qp94z82r03dkbf4a2hvx"
rm Popcorn-Time install else "0y08a42pm681s97lkczdq5dblxl2jbr850hnl85hknl3ynag9kq4";
zip -r package.nw package.json src node_modules
cat ${nwjs}/bin/nw package.nw > Popcorn-Time
chmod 555 Popcorn-Time
'';
installPhase = ''
mkdir -p $out
cp -r * $out/
'';
dontPatchELF = true;
}; };
in
runCommand "popcorntime-${version}" { dontPatchELF = true;
buildInputs = [ makeWrapper ]; sourceRoot = "linux${arch}";
meta = with stdenv.lib; { buildInputs = [ zip makeWrapper ];
homepage = http://popcorntime.io/;
description = "An application that streams movies and TV shows from torrents"; buildPhase = ''
license = stdenv.lib.licenses.gpl3; rm Popcorn-Time
platforms = platforms.linux; cat ${nwjs}/bin/nw nw.pak > Popcorn-Time
maintainers = with maintainers; [ bobvanderlinden ]; chmod 555 Popcorn-Time
broken = true; # popcorntime.io is dead '';
};
} installPhase = ''
''
mkdir -p $out/bin mkdir -p $out/bin
makeWrapper ${popcorntimePackage}/Popcorn-Time $out/bin/popcorntime cp -r * $out/
'' makeWrapper $out/Popcorn-Time $out/bin/popcorntime
'';
meta = with stdenv.lib; {
homepage = https://popcorntime.sh/;
description = "An application that streams movies and TV shows from torrents";
license = stdenv.lib.licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ bobvanderlinden rnhmjoj ];
};
}