summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2015-06-28 10:01:45 +0200
committerDomen Kožar <domen@dev.si>2015-06-28 10:01:45 +0200
commit3ff2dfb7fa9c9ad8c06eac6199aa8443fbd6f003 (patch)
tree74f9ce991c9f234e42ca5aebef0c86e2665554f1 /pkgs/applications/video
parent90d041b4b5e530b8c818cfa0d0395b7db2ff1d35 (diff)
parentbb10e48573ee9cd644fa7ecaf64ea5586b4ffc8d (diff)
downloadnixlib-3ff2dfb7fa9c9ad8c06eac6199aa8443fbd6f003.tar
nixlib-3ff2dfb7fa9c9ad8c06eac6199aa8443fbd6f003.tar.gz
nixlib-3ff2dfb7fa9c9ad8c06eac6199aa8443fbd6f003.tar.bz2
nixlib-3ff2dfb7fa9c9ad8c06eac6199aa8443fbd6f003.tar.lz
nixlib-3ff2dfb7fa9c9ad8c06eac6199aa8443fbd6f003.tar.xz
nixlib-3ff2dfb7fa9c9ad8c06eac6199aa8443fbd6f003.tar.zst
nixlib-3ff2dfb7fa9c9ad8c06eac6199aa8443fbd6f003.zip
Merge pull request #8423 from bobvanderlinden/popcorntime-bin
added popcorntime package
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/popcorntime/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/applications/video/popcorntime/default.nix b/pkgs/applications/video/popcorntime/default.nix
new file mode 100644
index 000000000000..0db56cc6fcd7
--- /dev/null
+++ b/pkgs/applications/video/popcorntime/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, runCommand, makeWrapper, node_webkit_0_9
+}:
+
+let
+  version = "0.3.7.2";
+
+  srcs = {
+    x86_64-linux = fetchurl {
+      url = "https://get.popcorntime.io/build/Popcorn-Time-${version}-Linux64.tar.xz";
+      sha256 = "0lm9k4fr73a9p00i3xj2ywa4wvjf9csadm0pcz8d6imwwq44sa8b";
+    };
+    i686-linux = fetchurl {
+      url = "https://get.popcorntime.io/build/Popcorn-Time-${version}-Linux32.tar.xz";
+      sha256 = "1dz1cp31qbwamm9pf8ydmzzhnb6d9z73bigdv3y74dgicz3dpr91";
+    };
+  };
+
+  popcorntimePackage = stdenv.mkDerivation rec {
+    name = "popcorntime-package-${version}";
+    src = srcs."${stdenv.system}";
+    sourceRoot = ".";
+    installPhase = ''
+      mkdir -p $out
+      cp -r *.so *.pak $out/
+      cat ${node_webkit_0_9}/bin/nw package.nw > $out/Popcorn-Time
+      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
+  ''