nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 webos,
6 cmake,
7 pkg-config,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "novacom";
12 version = "18";
13
14 src = fetchFromGitHub {
15 owner = "openwebos";
16 repo = "novacom";
17 rev = "submissions/${version}";
18 sha256 = "12s6g7l20kakyjlhqpli496miv2kfsdp17lcwhdrzdxvxl6hnf4n";
19 };
20
21 nativeBuildInputs = [
22 cmake
23 pkg-config
24 webos.cmake-modules
25 ];
26
27 postPatch = ''
28 substituteInPlace CMakeLists.txt \
29 --replace-fail "cmake_minimum_required(VERSION 2.8.7)" "cmake_minimum_required(VERSION 3.10)"
30 '';
31
32 postInstall = ''
33 install -Dm755 -t $out/bin ../scripts/novaterm
34 substituteInPlace $out/bin/novaterm --replace "exec novacom" "exec $out/bin/novacom"
35 '';
36
37 meta = {
38 description = "Utility for communicating with WebOS devices";
39 license = lib.licenses.asl20;
40 maintainers = [ ];
41 platforms = lib.platforms.linux;
42 };
43}