about summary refs log tree commit diff stats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/nixpkgs/pkgs/ytc/default.nix2
-rw-r--r--sys/nixpkgs/pkgs/ytc/package.nix13
2 files changed, 11 insertions, 4 deletions
diff --git a/sys/nixpkgs/pkgs/ytc/default.nix b/sys/nixpkgs/pkgs/ytc/default.nix
index de247115..fa06e1ba 100644
--- a/sys/nixpkgs/pkgs/ytc/default.nix
+++ b/sys/nixpkgs/pkgs/ytc/default.nix
@@ -4,6 +4,8 @@
       ytc = import ./package.nix {
         inherit
           (prev)
+          lib
+          makeWrapper
           rustPlatform
           # dependencies
 
diff --git a/sys/nixpkgs/pkgs/ytc/package.nix b/sys/nixpkgs/pkgs/ytc/package.nix
index 8c02f073..5428ee18 100644
--- a/sys/nixpkgs/pkgs/ytc/package.nix
+++ b/sys/nixpkgs/pkgs/ytc/package.nix
@@ -1,8 +1,10 @@
 {
+  lib,
   rustPlatform,
   ytcc,
   yt-dlp,
   mpv,
+  makeWrapper,
 }:
 rustPlatform.buildRustPackage {
   pname = "ytc";
@@ -11,9 +13,12 @@ rustPlatform.buildRustPackage {
   src = ./.;
   cargoHash = "sha256-KogHeuKKYhhpfSg+ImPCO4RwxWMOhSBXa3OjwCBZxEE=";
 
-  buildInputs = [
-    ytcc
-    yt-dlp
-    mpv
+  nativeBuildInputs = [
+    makeWrapper
   ];
+
+  postInstall = ''
+    wrapProgram $out/bin/ytc \
+      --set PATH ${lib.makeBinPath [mpv yt-dlp ytcc]}
+  '';
 }