nixos/pkgs/parrot.nix
Gerg-L f43d0b741c systems -> hosts
moved functions to /lib

inputs over imports

turned each module file into a nixosModule

moved registry and $NIX_PATH pinning to /modules/pinning.nix
2023-06-24 23:52:04 -04:00

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;
}