2020-10-27 12:52:41 +01:00
|
|
|
{ lib, stdenv, fetchurl, electron_10, makeDesktopItem, makeWrapper, nodePackages, autoPatchelfHook}:
|
2020-01-20 21:07:30 +01:00
|
|
|
|
2020-05-22 18:25:35 +02:00
|
|
|
let
|
2020-10-27 12:52:41 +01:00
|
|
|
electron = electron_10;
|
2020-05-22 18:25:35 +02:00
|
|
|
in
|
2020-01-20 21:07:30 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "teleprompter";
|
2020-10-27 12:52:41 +01:00
|
|
|
version = "2.4.0";
|
2020-01-20 21:07:30 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-10-27 12:52:41 +01:00
|
|
|
url = "https://github.com/ImaginarySense/Imaginary-Teleprompter-Electron/releases/download/${lib.versions.majorMinor version}/imaginary-teleprompter-${version}.tar.gz";
|
|
|
|
sha256 = "bgdtK8l5d26avv1WUw9cfOgZrIL1q/a9890Ams4yidQ=";
|
2020-01-20 21:07:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper nodePackages.asar ];
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/opt/teleprompter $out/share/applications
|
|
|
|
asar e resources/app.asar $out/opt/teleprompter/resources/app.asar.unpacked
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
makeWrapper ${electron}/bin/electron $out/bin/teleprompter \
|
|
|
|
--add-flags "$out/opt/teleprompter/resources/app.asar.unpacked --without-update"
|
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "teleprompter";
|
|
|
|
exec = "teleprompter";
|
|
|
|
type = "Application";
|
|
|
|
desktopName = "Teleprompter";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The most complete, free, teleprompter app on the web";
|
2020-10-27 12:52:41 +01:00
|
|
|
license = [ licenses.gpl3Plus ];
|
2020-01-20 21:07:30 +01:00
|
|
|
homepage = "https://github.com/ImaginarySense/Teleprompter-Core";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ Scriptkiddi ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|