darwin.bsdmake: add to darwin-aliases.nix
Use portable bmake instead of Apple’s port of BSD Make.
This commit is contained in:
@@ -1,55 +0,0 @@
|
||||
{ lib, appleDerivation, makeWrapper }:
|
||||
|
||||
appleDerivation {
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace mk/bsd.prog.mk \
|
||||
--replace '-o ''${BINOWN} -g ''${BINGRP}' "" \
|
||||
--replace '-o ''${SCRIPTSOWN_''${.ALLSRC:T}}' "" \
|
||||
--replace '-g ''${SCRIPTSGRP_''${.ALLSRC:T}}' ""
|
||||
substituteInPlace mk/bsd.lib.mk --replace '-o ''${LIBOWN} -g ''${LIBGRP}' ""
|
||||
substituteInPlace mk/bsd.info.mk --replace '-o ''${INFOOWN} -g ''${INFOGRP}' ""
|
||||
substituteInPlace mk/bsd.doc.mk --replace '-o ''${BINOWN} -g ''${BINGRP}' ""
|
||||
substituteInPlace mk/bsd.man.mk --replace '-o ''${MANOWN} -g ''${MANGRP}' ""
|
||||
substituteInPlace mk/bsd.files.mk \
|
||||
--replace '-o ''${''${group}OWN_''${.ALLSRC:T}}' "" \
|
||||
--replace '-g ''${''${group}GRP_''${.ALLSRC:T}}' "" \
|
||||
--replace '-o ''${''${group}OWN} -g ''${''${group}GRP}' ""
|
||||
substituteInPlace mk/bsd.incs.mk \
|
||||
--replace '-o ''${''${group}OWN_''${.ALLSRC:T}}' "" \
|
||||
--replace '-g ''${''${group}GRP_''${.ALLSRC:T}}' "" \
|
||||
--replace '-o ''${''${group}OWN} -g ''${''${group}GRP}' ""
|
||||
|
||||
# Workaround for https://github.com/NixOS/nixpkgs/issues/103172
|
||||
# Prevents bsdmake from failing on systems that already had default limits
|
||||
# increased.
|
||||
substituteInPlace main.c \
|
||||
--replace 'err(2, "setrlimit");' 'warn("setrlimit");'
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
objs=()
|
||||
for file in $(find . -name '*.c'); do
|
||||
obj="$(basename "$file" .c).o"
|
||||
objs+=("$obj")
|
||||
$CC -c "$file" -o "$obj" -DDEFSHELLNAME='"sh"' -D__FBSDID=__RCSID -mdynamic-no-pic -g
|
||||
done
|
||||
$CC "''${objs[@]}" -o bsdmake
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -d 0644 $out/bin
|
||||
install -m 0755 bsdmake $out/bin
|
||||
install -d 0644 $out/share/mk
|
||||
install -m 0755 mk/* $out/share/mk
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
wrapProgram "$out/bin/bsdmake" --add-flags "-m $out/share/mk"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
@@ -261,7 +261,6 @@ developerToolsPackages_11_3_1 // macosPackages_11_0_1 // {
|
||||
inherit (self.adv_cmds) ps locale;
|
||||
architecture = applePackage "architecture" "osx-10.11.6" "sha256-cUKeMx6mOAxBSRHIdfzsrR65Qv86m7+20XvpKqVfwVI=" {};
|
||||
AvailabilityVersions = callPackage ./AvailabilityVersions/package.nix { };
|
||||
bsdmake = applePackage "bsdmake" "dev-tools-3.2.6" "sha256-CW8zP5QZMhWTGp+rhrm8oHE/vSLsRlv1VRAGe1OUDmI=" {};
|
||||
CarbonHeaders = applePackage "CarbonHeaders" "osx-10.6.2" "sha256-UNaHvxzYzEBnYYuoMLqWUVprZa6Wqn/3XleoSCco050=" {};
|
||||
CommonCrypto = applePackage "CommonCrypto" "osx-10.12.6" "sha256-FLgODBrfv+XsGaAjddncYAm/BIJJYw6LcwX/z7ncKFM=" {};
|
||||
configd = applePackage "configd" "osx-10.8.5" "sha256-6I3FWNjTgds5abEcZrD++s9b+P9a2+qUf8KFAb72DwI=" {
|
||||
|
||||
@@ -50,8 +50,10 @@ mapAliases ({
|
||||
### B ###
|
||||
|
||||
builder = throw "'darwin.builder' has been changed and renamed to 'darwin.linux-builder'. The default ssh port is now 31022. Please update your configuration or override the port back to 22. See https://nixos.org/manual/nixpkgs/unstable/#sec-darwin-builder"; # added 2023-07-06
|
||||
bsdmake = pkgs.bmake; # added 2024-10-03
|
||||
|
||||
### C ###
|
||||
|
||||
cctools = pkgs.cctools; # added 2024-07-17
|
||||
cctools-apple = pkgs.cctools; # added 2024-07-01
|
||||
cctools-llvm = pkgs.cctools; # added 2024-07-01
|
||||
@@ -64,7 +66,7 @@ mapAliases ({
|
||||
### L ###
|
||||
|
||||
libauto = throw "'darwin.libauto' has been removed, as it was broken and unmaintained"; # added 2024-05-10
|
||||
libiconv = pkgs.libiconv; # 2024-03-27
|
||||
libtapi = pkgs.libtapi; # 2024-08-16
|
||||
|
||||
### O ###
|
||||
|
||||
|
||||
Reference in New Issue
Block a user