Merge pull request #123508 from stephank/fix-spacenavd-darwin

spacenavd: fix darwin build
This commit is contained in:
Jörg Thalheim 2021-05-19 06:55:44 +01:00 committed by GitHub
commit f4e14c1796
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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

@ -30807,7 +30807,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 { };