Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkgs/by-name/di/direwolf-unstable/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
direwolf,
nix-update-script,
hamlibSupport ? true,
gpsdSupport ? true,
gpsdSupport ? false,
extraScripts ? false,
}:

Expand Down
45 changes: 29 additions & 16 deletions pkgs/by-name/di/direwolf/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@
fetchpatch,
cmake,
alsa-lib,
avahi,
gpsd,
gpsdSupport ? false,
hamlib_4,
hamlib ? hamlib_4,
hamlibSupport ? true,
hidapi,
libcap,
libgpiod,
libusb1,
perl,
pkg-config,
portaudio,
python3,
sndio,
espeak,
udev,
udevCheckHook,
Expand All @@ -32,26 +39,32 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-CCJr3l4RxYZLrdCRwio64EzpDyErlV9JDOXD6TH8p9o=";
};

strictDeps = true;
nativeBuildInputs = [
cmake
pkg-config
udevCheckHook
];

strictDeps = true;

buildInputs =
lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
udev
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ portaudio ]
++ lib.optionals gpsdSupport [ gpsd ]
++ lib.optionals hamlibSupport [ hamlib ]
++ lib.optionals extraScripts [
python3
perl
espeak
];
buildInputs = [
hidapi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libusb1
portaudio

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the BSDs too IIUC. But my understanding is that it also works on linux, and if it isn't used it won't get linked anyway.

sndio

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
avahi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

udev
libcap
libgpiod

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gpiod seems optional? https://github.com/wb2osz/direwolf/blob/a231971a652bfb574a4bae9a5d875fbce53d2267/CMakeLists.txt#L347

Seems like it could be being a boolean and defaulted to false

]
++ lib.optionals gpsdSupport [ gpsd ]
++ lib.optionals hamlibSupport [ hamlib ]
++ lib.optionals extraScripts [
python3
perl
espeak
];
nativeInstallCheckInputs = [ versionCheckHook ];

preConfigure = lib.optionals (!extraScripts) ''
Expand Down
Loading