74 lines
1.3 KiB
Nix
74 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
pkg-config,
|
|
makeWrapper,
|
|
autoPatchelfHook,
|
|
dbus,
|
|
libpulseaudio,
|
|
wayland,
|
|
libxkbcommon,
|
|
libGL,
|
|
xorg,
|
|
expat,
|
|
fontconfig,
|
|
freetype,
|
|
namespace,
|
|
}:
|
|
let
|
|
inherit (lib.trivial) importJSON;
|
|
inherit (lib.${namespace}) selectVariant mkAllSources;
|
|
|
|
versionSpec = importJSON ./version.json;
|
|
selected = selectVariant versionSpec null null;
|
|
sources = mkAllSources selected;
|
|
in
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "librepods";
|
|
version = "0.1.0";
|
|
|
|
src = sources.librepods;
|
|
|
|
sourceRoot = "${src.name}/linux-rust";
|
|
|
|
cargoHash = "sha256-Ebqx+UU2tdygvqvDGjBSxbkmPnkR47/yL3sCVWo54CU=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
libpulseaudio
|
|
autoPatchelfHook
|
|
makeWrapper
|
|
];
|
|
|
|
buildInputs = [
|
|
dbus
|
|
libpulseaudio
|
|
wayland
|
|
expat
|
|
fontconfig
|
|
freetype
|
|
freetype.dev
|
|
libGL
|
|
pkg-config
|
|
xorg.libX11
|
|
xorg.libXcursor
|
|
xorg.libXi
|
|
xorg.libXrandr
|
|
wayland
|
|
libxkbcommon
|
|
];
|
|
|
|
postFixup = ''
|
|
wrapProgram $out/bin/librepods --suffix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Open source alternative for AirPods";
|
|
homepage = "https://github.com/kavishdevar/librepods";
|
|
license = licenses.gpl3;
|
|
maintainers = [ ];
|
|
mainProgram = "librepods";
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|