Skip to content

Commit 8d609ed

Browse files
committed
fix: librepods package - rust
fixed package to be able to run. rev from kavishdevar/librepods#241
1 parent cd2967e commit 8d609ed

File tree

1 file changed

+42
-75
lines changed

1 file changed

+42
-75
lines changed

pkgs/librepods/default.nix

Lines changed: 42 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,70 @@
11
{
2-
stdenv,
3-
lib,
42
fetchFromGitHub,
3+
libpulseaudio,
4+
vulkan-loader,
55
rustPlatform,
6-
cmake,
6+
libxkbcommon,
7+
makeWrapper,
78
pkg-config,
8-
udev,
9+
wayland,
10+
libGL,
911
dbus,
10-
libpulseaudio,
11-
qt6,
12+
xorg,
13+
lib,
1214
}:
1315

1416
rustPlatform.buildRustPackage (finalAttrs: {
1517
pname = "librepods";
16-
version = "14.1.1";
18+
version = "0.2.0-linux-rust";
1719

1820
src = fetchFromGitHub {
1921
owner = "kavishdevar";
2022
repo = "librepods";
21-
rev = "a01e16792a73deb34c5bd0c4aa019c496642ee71";
22-
hash = "sha256-ZvHbSSW0rfcsNUORZURe0oBHQbnqmS5XT9ffVMwjIMU=";
23+
# tag = "v${finalAttrs.version}";
24+
rev = "4737cbfc2c1a4e227e42d095c49ab43bd8d7b64a";
25+
hash = "sha256-5vPCtjUiFSI/Ix5dbGmR3TGQsYIwWAUHMwx8yH6HXac=";
2326
};
2427

2528
sourceRoot = "source/linux-rust";
2629
cargoHash = "sha256-Ebqx+UU2tdygvqvDGjBSxbkmPnkR47/yL3sCVWo54CU=";
2730

28-
nativeBuildInputs = [ pkg-config ];
31+
nativeBuildInputs = [
32+
pkg-config
33+
makeWrapper
34+
];
2935

3036
buildInputs = [
3137
libpulseaudio
3238
dbus
39+
40+
# Iced-rs dependencies
41+
vulkan-loader
42+
libGL
43+
wayland
44+
libxkbcommon
45+
xorg.libXcursor
46+
xorg.libXrandr
47+
xorg.libXi
48+
xorg.libX11
3349
];
3450

51+
# Allows Iced access to the libraries it needs.
52+
postFixup = ''
53+
wrapProgram $out/bin/librepods \
54+
--suffix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs}
55+
'';
56+
3557
meta = {
36-
description = "";
37-
homepage = "";
38-
license = lib.licenses.unlicense;
58+
description = "AirPods liberated from Apple's ecosystem.";
59+
longDescription = ''
60+
LibrePods unlocks Apple's exclusive AirPods features on non-Apple devices. Get access to noise control modes, adaptive transparency, ear detection, hearing aid, customized transparency mode, battery status, and more - all the premium features you paid for but Apple locked to their ecosystem.
61+
'';
62+
homepage = "https://github.com/kavishdevar/librepods/tree/main";
63+
downloadPage = "https://github.com/kavishdevar/librepods/commit/${finalAttrs.src.rev}";
64+
# downloadPage = "https://github.com/kavishdevar/librepods/releases/tag/${finalAttrs.src.tag}";
65+
mainProgram = "librepods";
66+
license = lib.licenses.gpl3;
67+
# platforms = ;
3968
maintainers = [ ];
4069
};
4170
})
42-
43-
# stdenv.mkDerivation (finalAttrs: {
44-
# pname = "librepods";
45-
# version = "0.1.0";
46-
47-
# src = fetchFromGitHub {
48-
# owner = "kavishdevar";
49-
# repo = "librepods";
50-
# tag = "linux-v${finalAttrs.version}";
51-
# hash = "sha256-ZvHbSSW0rfcsNUORZURe0oBHQbnqmS5XT9ffVMwjIMU=";
52-
# };
53-
54-
# buildInputs = [
55-
# qt6.qtbase
56-
# qt6.qtmultimedia
57-
# qt6.qtconnectivity
58-
# ];
59-
60-
# nativeBuildInputs = [
61-
# qt6.wrapQtAppsHook
62-
# cmake
63-
# pkg-config
64-
# libpulseaudio
65-
# ];
66-
67-
# configurePhase = ''
68-
# runHook preConfigure
69-
70-
# cmake linux/CMakeLists.txt
71-
72-
# runHook postConfigure
73-
# '';
74-
75-
# installPhase = ''
76-
# runHook preInstall
77-
78-
# mkdir -p $out/bin $out/applications
79-
# cp librepods $out/bin
80-
# cp linux/assets/me.kavishdevar.librepods.desktop $out/applications/
81-
82-
# runHook postInstall
83-
# '';
84-
85-
# postInstall = ''
86-
# wrapProgram $out/bin/librepods \
87-
# --unset QT_STYLE_OVERRIDE
88-
# '';
89-
90-
# meta = {
91-
# description = "AirPods liberated from Apple's ecosystem.";
92-
# longDescription = ''
93-
# LibrePods unlocks Apple's exclusive AirPods features on non-Apple devices. Get access to noise control modes, adaptive transparency, ear detection, hearing aid, customized transparency mode, battery status, and more - all the premium features you paid for but Apple locked to their ecosystem.
94-
# '';
95-
# homepage = "https://github.com/kavishdevar/librepods/tree/main";
96-
# downloadPage = "https://github.com/kavishdevar/librepods/releases/tag/${finalAttrs.src.tag}";
97-
# mainProgram = "librepods";
98-
# license = lib.licenses.gpl3;
99-
# # platforms = ;
100-
# maintainers = with lib.maintainers; [ redlonghead ];
101-
# };
102-
103-
# })

0 commit comments

Comments
 (0)