nixpkgs/pkgs/applications/video/popcorntime/default.nix

46 lines
1.3 KiB
Nix
Raw Normal View History

2016-03-16 21:54:00 +01:00
{ lib, stdenv, fetchurl, makeWrapper, nwjs, zip }:
2015-06-08 19:33:23 +02:00
let
2016-05-02 10:46:37 +02:00
arch = if stdenv.system == "x86_64-linux" then "l64"
else if stdenv.system == "i686-linux" then "l32"
2016-03-16 21:54:00 +01:00
else throw "Unsupported system ${stdenv.system}";
2016-03-16 21:54:00 +01:00
in stdenv.mkDerivation rec {
name = "popcorntime-${version}";
2016-05-02 10:46:37 +02:00
version = "0.4.0";
build = "2";
2015-09-05 00:09:34 +02:00
2016-03-16 21:54:00 +01:00
src = fetchurl {
2016-05-02 10:46:37 +02:00
url = "http://popcorntime.ag/download.php?file=popcorn-time-community-v${version}-${build}-${arch}.tar.xz";
2016-03-16 21:54:00 +01:00
sha256 =
2016-05-02 10:46:37 +02:00
if arch == "l64"
then "0a68d0a81d8e97c94afa0c75209056ee4b8486f400854c952bd3ad7251bd80c9"
else "b311c312a29d408a7c661a271d1f3a8fc83865d8a204cf026ee87e9ac173874d";
2016-03-16 21:54:00 +01:00
};
2015-09-05 00:09:34 +02:00
2016-03-16 21:54:00 +01:00
dontPatchELF = true;
2016-05-02 10:46:37 +02:00
sourceRoot = ".";
2016-03-16 21:54:00 +01:00
buildInputs = [ zip makeWrapper ];
2015-09-05 00:09:34 +02:00
2016-03-16 21:54:00 +01:00
buildPhase = ''
rm Popcorn-Time
cat ${nwjs}/bin/nw nw.pak > Popcorn-Time
chmod 555 Popcorn-Time
'';
2015-09-05 00:09:34 +02:00
2016-03-16 21:54:00 +01:00
installPhase = ''
mkdir -p $out/bin
cp -r * $out/
makeWrapper $out/Popcorn-Time $out/bin/popcorntime
'';
2015-09-05 00:09:34 +02:00
2016-03-16 21:54:00 +01:00
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 ];
broken = true;
2015-06-08 19:33:23 +02:00
};
2016-03-16 21:54:00 +01:00
}