about summary refs log tree commit diff stats
path: root/pkgs/sources/yt/ytc.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/sources/yt/ytc.nix')
-rw-r--r--pkgs/sources/yt/ytc.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/sources/yt/ytc.nix b/pkgs/sources/yt/ytc.nix
new file mode 100644
index 00000000..dff5bcf8
--- /dev/null
+++ b/pkgs/sources/yt/ytc.nix
@@ -0,0 +1,29 @@
+{
+  lib,
+  rustPlatform,
+  ytcc,
+  yt-dlp,
+  mpv,
+  makeWrapper,
+}:
+rustPlatform.buildRustPackage {
+  pname = "ytc";
+  version = "0.1.0";
+
+  src = ./.;
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+  };
+
+  buildNoDefaultFeatures = true;
+  buildFeatures = ["ytc"];
+
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
+  postInstall = ''
+    wrapProgram $out/bin/ytc \
+      --set PATH ${lib.makeBinPath [mpv yt-dlp ytcc]}
+  '';
+}