diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 24e16c697d13..b7e726ed37e2 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -15806,6 +15806,17 @@ githubId = 124475; name = "Olli Helenius"; }; + ligerothetiger = { + email = "ligero@ligerothetiger.com"; + name = "LigeroTheTiger"; + github = "LigeroTheTiger"; + githubId = 42996211; + keys = [ + { + fingerprint = "5zLV9yqjL18GsG1qan0tGM5341niQNYnU/hiBCscn04"; + } + ]; + }; lightbulbjim = { email = "chris@killred.net"; github = "lightbulbjim"; diff --git a/pkgs/by-name/yo/youtubedr/package.nix b/pkgs/by-name/yo/youtubedr/package.nix new file mode 100644 index 000000000000..cdb3023f698f --- /dev/null +++ b/pkgs/by-name/yo/youtubedr/package.nix @@ -0,0 +1,70 @@ +{ + lib, + buildGoModule, + versionCheckHook, + fetchFromGitHub, +}: + +let + # Disabled because tests rely on network requests + disabledTests = [ + "TestTranscript" + "TestSimpleTest" + "TestGetPlaylist" + "TestGetBigPlaylist" + "TestDownload_SensitiveContent" + "TestGetVideo_MultiLanguage" + "TestParseVideo" + "TestParse_PublishDate" + "TestDownload_WhenPlayabilityStatusIsNotOK" + "TestDownload_Regular" + "TestYoutube_GetItagInfo" + "TestClient_httpGetBodyBytes" + "TestClient_httpGetBodyBytes" + "TestGetStream" + "TestGetVideoWithManifestURL" + "TestWebClientGetVideoWithoutManifestURL" + "TestGetVideoWithoutManifestURL" + "TestClient_httpGetBodyBytes" + "TestDownload_FirstStream" + ]; +in +buildGoModule (finalAttrs: { + pname = "youtubedr"; + version = "2.10.6"; + + src = fetchFromGitHub { + owner = "kkdai"; + repo = "youtube"; + tag = "v${finalAttrs.version}"; + hash = "sha256-rkkqLBH4P5DMrbfsZwVgBjnQG1/fHdjVL4mU6amYUxM="; + }; + + __structuredAttrs = true; + + vendorHash = "sha256-DIdDDS8U4UR3ZPmwqrhsOfejUJ4UHmwcr4JCpjkwOzs="; + + ldflags = [ + "-X main.version=${finalAttrs.version}" + ]; + + checkFlags = [ + "-skip=${lib.concatStringsSep "|" disabledTests}" + ]; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + + versionCheckProgramArg = "version"; + versionCheckKeepEnvironment = [ "HOME" ]; + doInstallCheck = true; + + meta = { + homepage = "https://github.com/kkdai/youtube"; + description = "YouTube video download CLI"; + mainProgram = "youtubedr"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.ligerothetiger ]; + }; +})