From 948605e68f5568b8aa26a0b0bc814cbbfb096d70 Mon Sep 17 00:00:00 2001 From: NullBite Date: Tue, 28 May 2024 01:43:47 -0400 Subject: [PATCH] Update yt-dlp --- flake.lock | 17 +++++++++++++++++ flake.nix | 2 ++ overlays/mitigations.nix | 6 ++++++ 3 files changed, 25 insertions(+) diff --git a/flake.lock b/flake.lock index d9008ae..2d8a9ee 100644 --- a/flake.lock +++ b/flake.lock @@ -618,6 +618,22 @@ "type": "github" } }, + "nixpkgs-yt-dlp-2024": { + "locked": { + "lastModified": 1716813593, + "narHash": "sha256-862V4NORGlvQ6g8Y5ZSBrtosqYep2lXGsywTcV6OvHw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "528db5fa94041f0b4909a855d8b9fb9b44fa4f5d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "528db5fa94041f0b4909a855d8b9fb9b44fa4f5d", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1716633019, @@ -664,6 +680,7 @@ "nixfiles-assets": "nixfiles-assets", "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", + "nixpkgs-yt-dlp-2024": "nixpkgs-yt-dlp-2024", "pkg-android-tools": "pkg-android-tools", "rust-overlay": "rust-overlay", "stylix": "stylix", diff --git a/flake.nix b/flake.nix index 8b4223e..1e0dc71 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,8 @@ # ^^^^^^^^^^^^^ this part is optional nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs-yt-dlp-2024.url = "github:NixOS/nixpkgs/528db5fa94041f0b4909a855d8b9fb9b44fa4f5d"; + # this seems to be a popular way to declare systems systems.url = "github:nix-systems/default"; diff --git a/overlays/mitigations.nix b/overlays/mitigations.nix index a4680a2..d15e79c 100644 --- a/overlays/mitigations.nix +++ b/overlays/mitigations.nix @@ -13,6 +13,12 @@ let in prev.gimp-with-plugins.override { inherit plugins; }; in { gimp-with-plugins = gimp-with-plugins-good; + + yt-dlp = let + pkgs-y = (import nixfiles.inputs.nixpkgs-yt-dlp-2024.outPath) { inherit (prev) system;}; + in if ((builtins.compareVersions "2024.5.27" prev.yt-dlp.version) == 1) + then (final.python3Packages.toPythonApplication pkgs-y.python3Packages.yt-dlp) + else prev.yt-dlp; } # # can't optionalAttrs for version checks because it breaks lazy eval and causes infinite recursion # // {