feat: add pd-mapper

This commit is contained in:
dump_stack() 2024-10-18 15:20:43 +00:00
parent 18aa1fc67e
commit a56669ed5e
Signed by: dump_stack
GPG Key ID: C9905BA72B5E02BB
5 changed files with 155 additions and 0 deletions

View File

@ -48,6 +48,38 @@
services.getty.autologinUser = lib.mkDefault "root"; services.getty.autologinUser = lib.mkDefault "root";
nixpkgs.overlays = [
(final: prev: {
qrtr = prev.callPackage ./pkgs/qrtr.nix {};
qmic = prev.callPackage ./pkgs/qmic.nix {};
rmtfs = prev.callPackage ./pkgs/rmtfs.nix { inherit (final) qrtr qmic; };
pd-mapper = final.callPackage ./pkgs/pd-mapper.nix { inherit (final) qrtr; };
})
];
systemd.services = {
pd-mapper = {
unitConfig = {
Requires = "qrtr-ns.service";
After = "qrtr-ns.service";
};
serviceConfig = {
Restart = "always";
ExecStart = "${pkgs.pd-mapper}/bin/pd-mapper";
};
wantedBy = [
"multi-user.target"
];
};
qrtr-ns = {
serviceConfig = {
ExecStart = "${pkgs.qrtr}/bin/qrtr-ns -v -f 1";
Restart = "always";
};
wantedBy = ["multi-user.target"];
};
};
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix.settings = { nix.settings = {

33
pkgs/pd-mapper.nix Normal file
View File

@ -0,0 +1,33 @@
{
stdenv,
lib,
fetchFromGitHub,
pkg-config,
qrtr,
lzma,
}:
stdenv.mkDerivation {
pname = "pd-mapper";
version = "2024-06-19";
src = fetchFromGitHub {
owner = "linux-msm";
repo = "pd-mapper";
rev = "e7c42e1522249593302a5b8920b9e7b42dc3f25e";
sha256 = "sha256-gTUpltbY5439IEEvnxnt8WOFUgfpQUJWr5f+OB12W8A=";
};
nativeBuildInputs = [ pkg-config lzma ];
buildInputs = [ qrtr ];
installFlags = [ "prefix=$(out)" ];
meta = with lib; {
description = "pd mapper";
homepage = "https://github.com/linux-msm/pd-mapper";
license = licenses.bsd3;
platforms = platforms.linux;
};
}

26
pkgs/qmic.nix Normal file
View File

@ -0,0 +1,26 @@
{
stdenv,
lib,
fetchFromGitHub
}:
stdenv.mkDerivation {
pname = "qmic";
version = "2022-07-18";
src = fetchFromGitHub {
owner = "linux-msm";
repo = "qmic";
rev = "4574736afce75aa5eec1e1069a19563410167c9f";
sha256 = "sha256-0/mIg98pN66ZaVsQ6KmZINuNfiKvdEHMsqDx0iciF8w=";
};
installFlags = [ "prefix=$(out)" ];
meta = with lib; {
description = "QMI IDL compiler";
homepage = "https://github.com/linux-msm/qmic";
license = licenses.bsd3;
platforms = platforms.aarch64;
};
}

33
pkgs/qrtr.nix Normal file
View File

@ -0,0 +1,33 @@
{
stdenv,
lib,
fetchFromGitHub,
meson,
cmake,
pkg-config,
systemd,
ninja,
}:
stdenv.mkDerivation {
pname = "qrtr";
version = "2024-05-21";
src = fetchFromGitHub {
owner = "linux-msm";
repo = "qrtr";
rev = "daf7f4cc326a5036dcce2bd7deaf2c32841b0336";
hash = "sha256-OGx5fxxtrNN9EJJxxH4MTDRFGsyu4LNo+ks46zbJqF0=";
};
nativeBuildInputs = [ meson cmake pkg-config systemd ninja ];
installFlags = [ "prefix=$(out)" ];
meta = with lib; {
description = "QMI IDL compiler";
homepage = "https://github.com/linux-msm/qrtr";
license = licenses.bsd3;
platforms = platforms.aarch64;
};
}

31
pkgs/rmtfs.nix Normal file
View File

@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchFromGitHub,
udev,
qrtr,
qmic
}:
stdenv.mkDerivation {
pname = "rmtfs";
version = "2024-03-18";
buildInputs = [ udev qrtr qmic ];
src = fetchFromGitHub {
owner = "linux-msm";
repo = "rmtfs";
rev = "33e1e40615efc59b17a515afe857c51b8b8c1ad1";
hash = "sha256-AxFuDmfLTcnnwm+nezwLc8yaHcX+pFkX5qSIO38T/BM=";
};
installFlags = [ "prefix=$(out)" ];
meta = with lib; {
description = "Qualcomm Remote Filesystem Service";
homepage = "https://github.com/linux-msm/rmtfs";
license = licenses.bsd3;
platforms = platforms.aarch64;
};
}