Add librepods package and update README for usage instructions
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-25.05.tar.gz, <YOUR_REPO_NAME>) (push) Successful in 3m25s
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz, <YOUR_REPO_NAME>) (push) Successful in 2m51s
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz, <YOUR_REPO_NAME>) (push) Successful in 2m56s
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-25.05.tar.gz, <YOUR_REPO_NAME>) (push) Successful in 3m25s
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz, <YOUR_REPO_NAME>) (push) Successful in 2m51s
Build and populate cache / tests (<YOUR_CACHIX_NAME>, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz, <YOUR_REPO_NAME>) (push) Successful in 2m56s
This commit is contained in:
@@ -1,37 +1,47 @@
|
||||
# nur-packages-template
|
||||
|
||||
**A template for [NUR](https://github.com/nix-community/NUR) repositories**
|
||||
|
||||
## Setup
|
||||
|
||||
1. Click on [Use this template](https://github.com/nix-community/nur-packages-template/generate) to start a repo based on this template. (Do _not_ fork it.)
|
||||
2. Add your packages to the [pkgs](./pkgs) directory and to
|
||||
[default.nix](./default.nix)
|
||||
* Remember to mark the broken packages as `broken = true;` in the `meta`
|
||||
attribute, or travis (and consequently caching) will fail!
|
||||
* Library functions, modules and overlays go in the respective directories
|
||||
3. Choose your CI: Depending on your preference you can use github actions (recommended) or [Travis ci](https://travis-ci.com).
|
||||
- Github actions: Change your NUR repo name and optionally add a cachix name in [.github/workflows/build.yml](./.github/workflows/build.yml) and change the cron timer
|
||||
to a random value as described in the file
|
||||
- Travis ci: Change your NUR repo name and optionally your cachix repo name in
|
||||
[.travis.yml](./.travis.yml). Than enable travis in your repo. You can add a cron job in the repository settings on travis to keep your cachix cache fresh
|
||||
5. Change your travis and cachix names on the README template section and delete
|
||||
the rest
|
||||
6. [Add yourself to NUR](https://github.com/nix-community/NUR#how-to-add-your-own-repository)
|
||||
|
||||
## README template
|
||||
|
||||
# nur-packages
|
||||
|
||||
**My personal [NUR](https://github.com/nix-community/NUR) repository**
|
||||
Personal [NUR](https://github.com/nix-community/NUR) repository.
|
||||
|
||||
<!-- Remove this if you don't use github actions -->
|
||||

|
||||
## Packages
|
||||
|
||||
<!--
|
||||
Uncomment this if you use travis:
|
||||
- **librepods**: LibrePods Linux app (Qt6) — AirPods controls and battery monitoring.
|
||||
- Upstream: `https://github.com/kavishdevar/librepods`
|
||||
|
||||
[](https://travis-ci.com/<YOUR_TRAVIS_USERNAME>/nur-packages)
|
||||
-->
|
||||
[](https://<YOUR_CACHIX_CACHE_NAME>.cachix.org)
|
||||
## Usage
|
||||
|
||||
See the official NUR installation docs: [NUR documentation – Installation](https://nur.nix-community.org/documentation/#installation).
|
||||
|
||||
### Usage (flakes)
|
||||
|
||||
If you want to use this repo directly as a flake input:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
my-nur.url = "github:<YOUR_GITHUB_USER>/nur-packages";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, my-nur, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ my-nur.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.${system}.default = pkgs.librepods;
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
### Usage (local build/test)
|
||||
|
||||
From this repository:
|
||||
|
||||
```bash
|
||||
nix build .#librepods
|
||||
./result/bin/librepods
|
||||
```
|
||||
|
||||
|
||||
+2
-1
@@ -14,7 +14,8 @@
|
||||
modules = import ./modules; # NixOS modules
|
||||
overlays = import ./overlays; # nixpkgs overlays
|
||||
|
||||
example-package = pkgs.callPackage ./pkgs/example-package { };
|
||||
# example-package = pkgs.callPackage ./pkgs/example-package { };
|
||||
librepods = pkgs.callPackage ./pkgs/librepods { };
|
||||
# some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { };
|
||||
# ...
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, qt6Packages
|
||||
, openssl
|
||||
, pulseaudio
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "librepods";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kavishdevar";
|
||||
repo = "librepods";
|
||||
rev = "linux-v${version}";
|
||||
hash = "sha256-ZvHbSSW0rfcsNUORZURe0oBHQbnqmS5XT9ffVMwjIMU=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/linux";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
qt6Packages.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
pulseaudio
|
||||
|
||||
qt6Packages.qtbase
|
||||
qt6Packages.qtconnectivity
|
||||
qt6Packages.qtdeclarative
|
||||
qt6Packages.qtwayland
|
||||
qt6Packages.qttools
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "AirPods liberated from Apple's ecosystem (LibrePods Linux app)";
|
||||
homepage = "https://github.com/kavishdevar/librepods";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "librepods";
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user