Files
nix-config/packages/librepods/default.nix
mjallen18 70002a19e2 hmm
2026-04-07 18:39:42 -05:00

60 lines
1.0 KiB
Nix
Executable File

{
lib,
stdenv,
cmake,
pkg-config,
qt6,
openssl,
python3,
libpulseaudio,
namespace,
pkgs,
}:
let
inherit (lib.trivial) importJSON;
inherit (lib.${namespace}) selectVariant mkAllSources;
versionSpec = importJSON ./version.json;
selected = selectVariant versionSpec null null;
sources = mkAllSources pkgs selected;
in
stdenv.mkDerivation {
pname = "librepods";
version = "unstable";
src = sources.librepods;
sourceRoot = "source/linux";
nativeBuildInputs = [
cmake
pkg-config
qt6.wrapQtAppsHook
];
buildInputs = [
qt6.qtbase
qt6.qtdeclarative
qt6.qtconnectivity
qt6.qtmultimedia
openssl
libpulseaudio
python3
];
qtWrapperArgs = [
"--prefix QML2_IMPORT_PATH : ${qt6.qtdeclarative}/lib/qt6/qml"
"--prefix QT_PLUGIN_PATH : ${qt6.qtbase}/lib/qt6/plugins"
];
installPhase = ''
mkdir -p $out/bin
cp librepods $out/bin/
'';
meta = with lib; {
description = "Native Linux application for controlling Apple AirPods";
platforms = platforms.linux;
};
}