Merge pull request #136119 from ju1m/pipe-viewer

pipe-viewer: init at 0.1.4

Sandro 1d33c03e 46c29e25

Changed files
+120 -3
pkgs
applications
video
pipe-viewer
top-level
+86
pkgs/applications/video/pipe-viewer/default.nix
···
+
{ lib
+
, fetchFromGitHub
+
, perl
+
, buildPerlModule
+
, makeWrapper
+
, wrapGAppsHook
+
, withGtk3 ? false
+
, ffmpeg
+
, gtk3
+
, wget
+
, xdg-utils
+
, youtube-dl
+
, yt-dlp
+
, TestPod
+
, Gtk3
+
}:
+
let
+
perlEnv = perl.withPackages (ps: with ps; [
+
AnyURIEscape
+
DataDump
+
Encode
+
FilePath
+
GetoptLong
+
HTTPMessage
+
JSON
+
JSONXS
+
LWPProtocolHttps
+
LWPUserAgentCached
+
Memoize
+
PathTools
+
ScalarListUtils
+
TermReadLineGnu
+
TextParsewords
+
UnicodeLineBreak
+
] ++ lib.optionals withGtk3 [
+
FileShareDir
+
]);
+
in
+
buildPerlModule rec {
+
pname = "pipe-viewer";
+
version = "0.1.4";
+
+
src = fetchFromGitHub {
+
owner = "trizen";
+
repo = "pipe-viewer";
+
rev = version;
+
hash = "sha256-kDlZ3Cl8zvN/naGExh2yVW5yHwc1O04x4s22lNkbCzU=";
+
};
+
+
nativeBuildInputs = [ makeWrapper ]
+
++ lib.optionals withGtk3 [ wrapGAppsHook ];
+
+
buildInputs = [ perlEnv ]
+
# Can't be in perlEnv for wrapGAppsHook to work correctly
+
++ lib.optional withGtk3 Gtk3;
+
+
# Not supported by buildPerlModule
+
# and the Perl code fails anyway
+
# when Getopt::Long sets $gtk in Build.PL:
+
# Modification of a read-only value attempted at /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-perl5.34.0-Getopt-Long-2.52/lib/perl5/site_perl/5.34.0/Getopt/Long.pm line 585.
+
#buildFlags = lib.optional withGtk3 "--gtk3";
+
postPatch = lib.optionalString withGtk3 ''
+
substituteInPlace Build.PL --replace 'my $gtk ' 'my $gtk = 1;#'
+
'';
+
+
checkInputs = [
+
TestPod
+
];
+
+
dontWrapGApps = true;
+
postFixup = ''
+
wrapProgram "$out/bin/pipe-viewer" \
+
--prefix PATH : "${lib.makeBinPath [ ffmpeg wget youtube-dl yt-dlp ]}"
+
'' + lib.optionalString withGtk3 ''
+
wrapProgram "$out/bin/gtk-pipe-viewer" ''${gappsWrapperArgs[@]} \
+
--prefix PATH : "${lib.makeBinPath [ ffmpeg wget xdg-utils youtube-dl yt-dlp ]}"
+
'';
+
+
meta = with lib; {
+
homepage = "https://github.com/trizen/pipe-viewer";
+
description = "CLI+GUI YouTube Client";
+
license = licenses.artistic2;
+
maintainers = with maintainers; [ julm ];
+
platforms = platforms.all;
+
};
+
}
+4
pkgs/top-level/all-packages.nix
···
goffice = callPackage ../development/libraries/goffice { };
+
gtk-pipe-viewer = perlPackages.callPackage ../applications/video/pipe-viewer { withGtk3 = true; };
+
hydrus = python3Packages.callPackage ../applications/graphics/hydrus {
inherit miniupnpc_2 swftools;
inherit (qt5) wrapQtAppsHook;
···
ping = callPackage ../applications/networking/ping { };
piper = callPackage ../os-specific/linux/piper { };
+
+
pipe-viewer = perlPackages.callPackage ../applications/video/pipe-viewer {};
plank = callPackage ../applications/misc/plank { };
+30 -3
pkgs/top-level/perl-packages.nix
···
};
propagatedBuildInputs = [ TextGlob ];
meta = {
-
license = lib.licenses.free; # Same as Perl
+
license = with lib.licenses; [ artistic1 gpl1Plus ];
};
};
···
meta = {
maintainers = teams.deshaw.members;
description = "simple filename and pathname matching";
-
license = lib.licenses.free; # Same as Perl
+
license = with lib.licenses; [ artistic1 gpl1Plus ];
};
};
···
})];
propagatedBuildInputs = [ ClassAccessor ];
meta = {
-
license = lib.licenses.free; # Same as Perl
+
license = with lib.licenses; [ artistic1 gpl1Plus ];
description = "Pid File Manipulation";
maintainers = teams.deshaw.members;
};
···
description = "Legacy HTTP/1.0 support for LWP";
license = with lib.licenses; [ artistic1 gpl1Plus ];
+
};
+
+
LWPUserAgentCached = buildPerlPackage {
+
pname = "LWP-UserAgent-Cached";
+
version = "0.08";
+
src = fetchurl {
+
url = "mirror://cpan/authors/id/O/OL/OLEG/LWP-UserAgent-Cached-0.08.tar.gz";
+
hash = "sha256-Pc5atMeAQWVs54Vk92Az5b0ew4b1TS57MHQK5I7nh8M=";
+
};
+
propagatedBuildInputs = [ LWP ];
+
meta = {
+
description = "LWP::UserAgent with simple caching mechanism";
+
license = with lib.licenses; [ artistic1 gpl1Plus ];
+
};
LWPUserAgentDNSHosts = buildPerlModule {
···
homepage = "https://github.com/dagolden/Test-Number-Delta";
description = "Compare the difference between numbers against a given tolerance";
license = "apache";
+
};
+
};
+
+
TextParsewords = buildPerlPackage {
+
pname = "Text-Parsewords";
+
version = "3.30";
+
src = fetchurl {
+
url = "mirror://cpan/authors/id/C/CH/CHORNY/Text-ParseWords-3.30.tar.gz";
+
hash = "sha256-heAjgXndQ5l+WMZr1RYRGCvH1TNQUCmi2w0yMu2v9eg=";
+
};
+
meta = {
+
description = "Parse text into an array of tokens or array of arrays";
+
license = with lib.licenses; [ artistic1 gpl1Plus ];