libevdevc: fix cross compilation, format with nixfmt (#360169)

This commit is contained in:
Aleksana 2024-12-03 13:15:28 +08:00 committed by GitHub
commit be8d39928e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,9 @@
{ lib, stdenv, fetchFromGitHub, coreutils, pkg-config, glib, jsoncpp }:
{
lib,
stdenv,
fetchFromGitHub,
buildPackages,
}:
stdenv.mkDerivation rec {
pname = "libevdevc";
@ -12,12 +17,15 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace common.mk \
--replace /bin/echo ${coreutils}/bin/echo
--replace-fail /bin/echo ${buildPackages.coreutils}/bin/echo
substituteInPlace include/module.mk \
--replace /usr/include /include
--replace-fail /usr/include /include
'';
makeFlags = [ "DESTDIR=$(out)" "LIBDIR=/lib" ];
makeFlags = [
"DESTDIR=$(out)"
"LIBDIR=/lib"
];
# causes redefinition of _FORTIFY_SOURCE
hardeningDisable = [ "fortify3" ];