From 2876a83d65cd31160439d6d4a94edb73b5b3951d Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 6 Jan 2024 00:02:43 +0100 Subject: fix(sys/nixpkgs/pkgs/ytc): Wrap program --- sys/nixpkgs/pkgs/ytc/default.nix | 2 ++ sys/nixpkgs/pkgs/ytc/package.nix | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'sys/nixpkgs') 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]} + ''; } -- cgit 1.4.1