nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 pkg-config,
7 popt,
8 bluezSupport ? stdenv.hostPlatform.isLinux,
9 bluez,
10 readlineSupport ? true,
11 readline,
12 enableConduits ? true,
13 bison,
14 enableLibpng ? true,
15 libpng,
16 enableLibusb ? true,
17 libusb-compat-0_1,
18}:
19
20stdenv.mkDerivation {
21 pname = "pilot-link";
22 version = "0.13.0-unstable-2022-09-26";
23
24 src = fetchFromGitHub {
25 owner = "desrod";
26 repo = "pilot-link";
27 rev = "14338868111ce592c7ca7918a1f8a32ceecb7caf";
28 hash = "sha256-3b5T/QnRZawnjTgwvQKUbJTE/NiJ93eU2+qbRFuI13I";
29 };
30
31 # Resolve build issues on modern systems.
32 # https://github.com/desrod/pilot-link/issues/16
33 # https://aur.archlinux.org/packages/pilot-link-git
34 patches = [
35 ./configure-checks.patch
36 ./incompatible-pointer-type.patch
37 ]
38 ++ lib.optionals enableConduits [ ./format-string-literals.patch ]
39 ++ lib.optionals enableLibpng [ ./pilot-link-png14.patch ];
40
41 nativeBuildInputs = [
42 autoreconfHook
43 pkg-config
44 ]
45 ++ lib.optionals enableConduits [ bison ];
46
47 buildInputs = [
48 popt
49 ]
50 ++ lib.optionals bluezSupport [ bluez ]
51 ++ lib.optionals enableLibpng [ libpng ]
52 ++ lib.optionals enableLibusb [ libusb-compat-0_1 ]
53 ++ lib.optionals readlineSupport [ readline ];
54
55 configureFlags = [
56 "--with-libiconv"
57 ]
58 ++ lib.optionals enableConduits [ "--enable-conduits" ]
59 ++ lib.optionals enableLibpng [ "--enable-libpng" ]
60 ++ lib.optionals enableLibusb [ "--enable-libusb" ];
61
62 enableParallelBuilding = true;
63
64 meta = {
65 description = "Suite of tools for connecting to PalmOS handheld devices";
66 homepage = "https://github.com/desrod/pilot-link";
67 license = lib.licenses.gpl2;
68 maintainers = with lib.maintainers; [ PapayaJackal ];
69 };
70}