From 38955360ce726864d63d2c6da4fcd5b514a7c52e Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Mon, 21 Aug 2023 20:25:12 -0400 Subject: [PATCH] parrot: init at 1.6.0 --- pkgs/applications/audio/parrot/default.nix | 50 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 54 insertions(+) create mode 100644 pkgs/applications/audio/parrot/default.nix diff --git a/pkgs/applications/audio/parrot/default.nix b/pkgs/applications/audio/parrot/default.nix new file mode 100644 index 000000000000..04153c54d9ba --- /dev/null +++ b/pkgs/applications/audio/parrot/default.nix @@ -0,0 +1,50 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, cmake +, ffmpeg +, libopus +, makeBinaryWrapper +, nix-update-script +, openssl +, pkg-config +, stdenv +, yt-dlp +, Security +}: +let + version = "1.6.0"; +in +rustPlatform.buildRustPackage { + pname = "parrot"; + inherit version; + + src = fetchFromGitHub { + owner = "aquelemiguel"; + repo = "parrot"; + rev = "v${version}"; + hash = "sha256-f6YAdsq2ecsOCvk+A8wsUu+ywQnW//gCAkVLF0HTn8c="; + }; + + cargoHash = "sha256-e4NHgwoNkZ0//rugHrP0gU3pntaMeBJsV/YSzJfD8r4="; + + nativeBuildInputs = [ cmake makeBinaryWrapper pkg-config ]; + + buildInputs = [ libopus openssl ] + ++ lib.optionals stdenv.isDarwin [ Security ]; + + postInstall = '' + wrapProgram $out/bin/parrot \ + --prefix PATH : ${lib.makeBinPath [ ffmpeg yt-dlp ]} + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "A hassle-free Discord music bot"; + homepage = "https://github.com/aquelemiguel/parrot"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ gerg-l ]; + mainProgram = "parrot"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bba95ef0ea61..673652666355 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11663,6 +11663,10 @@ with pkgs; autoreconfHook = buildPackages.autoreconfHook269; }; + parrot = callPackage ../applications/audio/parrot { + inherit (darwin.apple_sdk.frameworks) Security; + }; + patchutils = callPackage ../tools/text/patchutils { }; patchutils_0_3_3 = callPackage ../tools/text/patchutils/0.3.3.nix { };