diff options
author | zendo <linzway@qq.com> | 2023-01-13 14:59:46 +0800 |
---|---|---|
committer | zendo <linzway@qq.com> | 2023-01-13 14:59:46 +0800 |
commit | 2ce5fca4ad0672efdc136bf0fdb4abc27fdb72bd (patch) | |
tree | 2756364e97238bd8a7dda680e282c63392fe751b /pkgs/applications/misc/ydict | |
parent | 354568dc0d6000ac850e40120b0f0062ef328009 (diff) |
ydict: add mpg123 to PATH
Diffstat (limited to 'pkgs/applications/misc/ydict')
-rw-r--r-- | pkgs/applications/misc/ydict/default.nix | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/pkgs/applications/misc/ydict/default.nix b/pkgs/applications/misc/ydict/default.nix index 9440c23681007..078d6abccf501 100644 --- a/pkgs/applications/misc/ydict/default.nix +++ b/pkgs/applications/misc/ydict/default.nix @@ -1,4 +1,9 @@ -{ lib, fetchFromGitHub, buildGoModule }: +{ lib +, fetchFromGitHub +, buildGoModule +, makeWrapper +, mpg123 +}: buildGoModule rec { pname = "ydict"; @@ -13,16 +18,26 @@ buildGoModule rec { vendorSha256 = "sha256-c5nQVQd4n978kFAAKcx5mX2Jz16ZOhS8iL/oxS1o5xs="; - ldflags = [ "-s" "-w" "-X=main.Version=${version}" ]; + ldflags = [ + "-s" + "-w" + "-X=main.Version=${version}" + ]; + + nativeBuildInputs = [ makeWrapper ]; + + preFixup = '' + wrapProgram $out/bin/${pname} \ + --prefix PATH ":" "${lib.makeBinPath [ mpg123 ]}"; + ''; # has no tests doCheck = false; meta = with lib; { - description = "A command-line Chinese dictionary"; + description = "Yet another command-line Youdao Chinese dictionary"; homepage = "https://github.com/TimothyYe/ydict"; license = licenses.mit; - platforms = platforms.linux; maintainers = with maintainers; [ zendo ]; }; } |