webos: init novacom, novacomd, cmake-modules; add nixos service
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
{ stdenv, fetchFromGitHub, cmake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cmake-modules-webos-${version}";
|
||||
version = "19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "openwebos";
|
||||
repo = "cmake-modules-webos";
|
||||
rev = "submissions/${version}";
|
||||
sha256 = "1l4hpcmgc98kp9g1642sy111ki5qyk3q7j10xzkgmnvz8lqffnxp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace CMakeLists.txt --replace "CMAKE_ROOT}/Modules" "CMAKE_INSTALL_PREFIX}/lib/cmake"
|
||||
substituteInPlace webOS/webOS.cmake \
|
||||
--replace ' ''${CMAKE_ROOT}/Modules' " $out/lib/cmake" \
|
||||
--replace 'INSTALL_ROOT}/usr' 'INSTALL_ROOT}'
|
||||
|
||||
sed -i '/CMAKE_INSTALL_PREFIX/d' webOS/webOS.cmake
|
||||
'';
|
||||
|
||||
setupHook = ./cmake-setup-hook.sh;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "CMake modules needed to build Open WebOS components";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ dtzWill ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
_addWebOSCMakeFlags() {
|
||||
# Help find the webOS cmake module
|
||||
cmakeFlagsArray+=(-DCMAKE_MODULE_PATH=@out@/lib/cmake)
|
||||
|
||||
# fix installation path (doesn't use CMAKE_INSTALL_PREFIX)
|
||||
cmakeFlagsArray+=(-DWEBOS_INSTALL_ROOT=${!outputBin})
|
||||
}
|
||||
|
||||
preConfigureHooks+=(_addWebOSCMakeFlags)
|
||||
@@ -0,0 +1,27 @@
|
||||
{ stdenv, fetchFromGitHub, webos, cmake, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "novacom-${version}";
|
||||
version = "18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "openwebos";
|
||||
repo = "novacom";
|
||||
rev = "submissions/${version}";
|
||||
sha256 = "12s6g7l20kakyjlhqpli496miv2kfsdp17lcwhdrzdxvxl6hnf4n";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig webos.cmake-modules ];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm755 -t $out/bin ../scripts/novaterm
|
||||
substituteInPlace $out/bin/novaterm --replace "exec novacom" "exec $out/bin/novacom"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Utility for communicating with WebOS devices";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ dtzWill ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{ stdenv,
|
||||
fetchFromGitHub, fetchpatch,
|
||||
webos, cmake, pkgconfig,
|
||||
libusb }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "novacomd-${version}";
|
||||
version = "127";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "openwebos";
|
||||
repo = "novacomd";
|
||||
rev = "submissions/${version}";
|
||||
sha256 = "1gahc8bvvvs4d6svrsw24iw5r0mhy4a2ars3j2gz6mp6sh42bznl";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-Use-usb_bulk_-read-write-instead-of-homemade-handler.patch?h=palm-novacom-git";
|
||||
sha256 = "116r6p4l767fqxfvq03sy6v7vxja8pkxlrc5hqby351a40b5dkiv";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/feniksa/webos-overlay/40e2c113fc9426d50bdf37779da57ce4ff06ee6e/net-misc/novacomd/files/0011-Remove-verbose-output.patch";
|
||||
sha256 = "09lmv06ziwkfg19b1h3jsmkm6g1f0nxxq1717dircjx8m45ypjq9";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig webos.cmake-modules ];
|
||||
|
||||
buildInputs = [ libusb ];
|
||||
|
||||
cmakeFlags = [ "-DWEBOS_TARGET_MACHINE_IMPL=host" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Daemon for communicating with WebOS devices";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ dtzWill ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user