nixpkgs/pkgs/applications/video/go2tv/default.nix
Дамјан Георгиевски a4bdbb7073 go2tv: init at 1.13.0
Cast media files to UPnP/DLNA Media Renderers and Smart TVs.
https://github.com/alexballas/go2tv

provides 2 packages:
- go2tv the GUI version (based on go-gl/glfw)
- go2tv-lite just a cli version

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-11-21 00:29:41 +01:00

58 lines
1.2 KiB
Nix

{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, Carbon
, Cocoa
, Kernel
, UserNotifications
, xorg
, libglvnd
, pkg-config
, withGui ? true
}:
buildGoModule rec {
pname = "go2tv" + lib.optionalString (!withGui) "-lite";
version = "1.13.0";
src = fetchFromGitHub {
owner = "alexballas";
repo = "go2tv";
rev = "v${version}";
sha256 = "sha256-ZHKfBKOX3/kVR6Nc+jSmLgfmpihc6QMb6NvTFlsBr5E=";
};
vendorSha256 = "sha256-msXfXFWXyZeT6zrRPZkBV7PEyPqYkx+JlpTWUwgFavI=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXinerama
xorg.libXi
xorg.libXext
xorg.libXxf86vm
libglvnd
] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa Kernel UserNotifications ];
ldflags = [
"-s" "-w"
"-linkmode=external"
];
# conditionally build with GUI or not (go2tv or go2tv-lite sub-packages)
subPackages = [ "cmd/${pname}" ];
doCheck = false;
meta = with lib; {
description = "Cast media files to UPnP/DLNA Media Renderers and Smart TVs";
homepage = "https://github.com/alexballas/go2tv";
license = licenses.mit;
maintainers = with maintainers; [ gdamjan ];
};
}