mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
moved functions to /lib inputs over imports turned each module file into a nixosModule moved registry and $NIX_PATH pinning to /modules/pinning.nix
49 lines
826 B
Nix
49 lines
826 B
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
openssl,
|
|
cmake,
|
|
libopus,
|
|
yt-dlp,
|
|
ffmpeg,
|
|
makeWrapper,
|
|
}:
|
|
# yt-dlp and ffmpeg required at runtime
|
|
let
|
|
src = fetchFromGitHub {
|
|
owner = "aquelemiguel";
|
|
repo = "parrot";
|
|
rev = "6b1df01bd9cce1c0d8446dea720c4a32ff935514";
|
|
hash = "sha256-f6YAdsq2ecsOCvk+A8wsUu+ywQnW//gCAkVLF0HTn8c=";
|
|
};
|
|
in
|
|
rustPlatform.buildRustPackage
|
|
{
|
|
pname = "parrot";
|
|
version = "1.6.0";
|
|
inherit src;
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
cmake
|
|
makeWrapper
|
|
];
|
|
|
|
buildInputs = [
|
|
libopus
|
|
openssl
|
|
];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/parrot \
|
|
--prefix PATH ${lib.makeBinPath [
|
|
yt-dlp
|
|
ffmpeg
|
|
]}'';
|
|
|
|
cargoLock.lockFile = src + /Cargo.lock;
|
|
|
|
RUSTC_BOOTSTRAP = 1;
|
|
}
|