Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 65 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
description = "Nixpkg for LibrePods";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
in {
packages.default = pkgs.stdenv.mkDerivation {
pname = "librepods";
version = "0.1.0";

src = ./linux;

nativeBuildInputs = with pkgs; [
cmake
pkg-config
qt6.wrapQtAppsHook
makeWrapper
];

buildInputs = with pkgs; [
qt6.qtbase
qt6.qtdeclarative
qt6.qtsvg
Comment on lines +32 to +33

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need these packages? For me it builds fine without them.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied qtdeclarative from here, dont know where qtsvg came from

qt6.qtconnectivity
qt6.qtmultimedia
qt6Packages.qtstyleplugin-kvantum

openssl

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. I don't have openssl installed on my system and it works without this line.

bluez
libpulseaudio
];

postInstall = ''
wrapProgram $out/bin/librepods \
--unset QT_STYLE_OVERRIDE
'';
Comment on lines +43 to +46

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which style are you unsetting here? I just don't know what the variable does.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed some weird QT styling bug for me


meta = with pkgs.lib; {
description = "A cross-platform app to manage AirPods on Linux and Android.";
homepage = "https://github.com/kavishdevar/librepods";
license = licenses.agpl3Only;
maintainers = [];
platforms = platforms.linux;
};
};

apps.default = flake-utils.lib.mkApp {
drv = self.packages.${system}.default;
};

devShells.default = pkgs.mkShell {
inputsFrom = [self.packages.${system}.default];
};
});
}