1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00

spacenavd: fix darwin build

This commit is contained in:
Stéphan Kochen 2021-05-18 14:08:03 +02:00
parent 9f67421fe8
commit 70e199136e
2 changed files with 17 additions and 4 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, libX11 }:
{ stdenv, lib, fetchFromGitHub, fetchpatch, libX11, IOKit }:
stdenv.mkDerivation rec {
version = "0.8";
@ -11,9 +11,20 @@ stdenv.mkDerivation rec {
sha256 = "1zz0cm5cgvp9s5n4nzksl8rb11c7sw214bdafzra74smvqfjcjcf";
};
buildInputs = [ libX11 ];
patches = [
# Fixes Darwin: https://github.com/FreeSpacenav/spacenavd/pull/38
(fetchpatch {
url = "https://github.com/FreeSpacenav/spacenavd/commit/d6a25d5c3f49b9676d039775efc8bf854737c43c.patch";
sha256 = "02pdgcvaqc20qf9hi3r73nb9ds7yk2ps9nnxaj0x9p50xjnhfg5c";
})
];
configureFlags = [ "--disable-debug"];
buildInputs = [ libX11 ]
++ lib.optional stdenv.isDarwin IOKit;
configureFlags = [ "--disable-debug" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
meta = with lib; {
homepage = "http://spacenav.sourceforge.net/";

View file

@ -30792,7 +30792,9 @@ in
hasktags = haskellPackages.hasktags;
};
spacenavd = callPackage ../misc/drivers/spacenavd { };
spacenavd = callPackage ../misc/drivers/spacenavd {
inherit (darwin.apple_sdk.frameworks) IOKit;
};
spacenav-cube-example = callPackage ../applications/misc/spacenav-cube-example { };