3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #141903 from ju1m/xinit

This commit is contained in:
Artturi 2021-10-20 20:28:19 +03:00 committed by GitHub
commit 4be96dbda0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -779,6 +779,7 @@ self: super:
stdenv = if isDarwin then clangStdenv else stdenv;
}).overrideAttrs (attrs: {
buildInputs = attrs.buildInputs ++ lib.optional isDarwin bootstrap_cmds;
depsBuildBuild = [ buildPackages.stdenv.cc ];
configureFlags = [
"--with-xserver=${self.xorgserver.out}/bin/X"
] ++ lib.optionals isDarwin [
@ -794,6 +795,10 @@ self: super:
sha256 = "18kb88i3s9nbq2jxl7l2hyj6p56c993hivk8mzxg811iqbbawkp7";
})
];
postPatch = ''
# Avoid replacement of word-looking cpp's builtin macros in Nix's cross-compiled paths
substituteInPlace Makefile.in --replace "PROGCPPDEFS =" "PROGCPPDEFS = -Dlinux=linux -Dunix=unix"
'';
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xauth ]
++ lib.optionals isDarwin [ self.libX11 self.xorgproto ];
postFixup = ''