about summary refs log tree commit diff stats
path: root/sys/nixpkgs
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-01-06 00:02:43 +0100
committerSoispha <soispha@vhack.eu>2024-01-06 00:06:22 +0100
commit2876a83d65cd31160439d6d4a94edb73b5b3951d (patch)
tree433f70ed3d34ea1b30b18c6b831cb02e2aafe6b7 /sys/nixpkgs
parentfeat(hm/pkgs/scr/ytcc/ytc): Rewrite in Rust (diff)
downloadnixos-config-2876a83d65cd31160439d6d4a94edb73b5b3951d.tar.gz
nixos-config-2876a83d65cd31160439d6d4a94edb73b5b3951d.zip
fix(sys/nixpkgs/pkgs/ytc): Wrap program
Diffstat (limited to '')
-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]}
+  '';
 }