mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-12-16 14:01:10 +01:00
Remove deprecated workaround for make
This commit is contained in:
parent
1629d13fd7
commit
b30833b210
3 changed files with 5 additions and 80 deletions
|
|
@ -6,6 +6,10 @@
|
||||||
|
|
||||||
* The `nix.package` can be used to set the system-wide nix package.
|
* The `nix.package` can be used to set the system-wide nix package.
|
||||||
|
|
||||||
|
## Removed Options
|
||||||
|
|
||||||
|
* The `system.workaround.make-posix-spawn.enable` has been removed.
|
||||||
|
|
||||||
## Release 21.05
|
## Release 21.05
|
||||||
|
|
||||||
### New Options
|
### New Options
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE.
|
# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||||
|
|
||||||
{ pkgs, isFlake }:
|
{ pkgs, isFlake }:
|
||||||
|
|
||||||
|
|
@ -17,6 +17,5 @@
|
||||||
./time.nix
|
./time.nix
|
||||||
./user.nix
|
./user.nix
|
||||||
./version.nix
|
./version.nix
|
||||||
./workaround-make.nix
|
|
||||||
(pkgs.path + "/nixos/modules/misc/assertions.nix")
|
(pkgs.path + "/nixos/modules/misc/assertions.nix")
|
||||||
] ++ pkgs.lib.optionals (!isFlake) [ ./nixpkgs.nix ]
|
] ++ pkgs.lib.optionals (!isFlake) [ ./nixpkgs.nix ]
|
||||||
|
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE.
|
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.system.workaround.make-posix-spawn;
|
|
||||||
|
|
||||||
gnumake-no-posix-spawn = pkgs.gnumake.overrideAttrs (old: {
|
|
||||||
configureFlags = old.configureFlags ++ [ "--disable-posix-spawn" ];
|
|
||||||
|
|
||||||
buildPhase = "${pkgs.gnumake42}/bin/make";
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out
|
|
||||||
${pkgs.gnumake42}/bin/make install
|
|
||||||
'';
|
|
||||||
|
|
||||||
# make a copy to facilitate repairs when it gets broken
|
|
||||||
# because of being bind-mounted onto the normal make
|
|
||||||
postFixup = ''
|
|
||||||
cp $out/bin/make $out/bin/overlaying-make
|
|
||||||
touch $out/SEE_system.workaround.make-posix-spawn.enable
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
in
|
|
||||||
{
|
|
||||||
|
|
||||||
###### interface
|
|
||||||
|
|
||||||
options = {
|
|
||||||
|
|
||||||
system.workaround.make-posix-spawn.enable = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
On some devices, GNU make 4.3 fails with 'Function not implemented',
|
|
||||||
and the workaround is to compile it with '--disable-posix-spawn'.
|
|
||||||
This option will shadow the original make in a really dirty way,
|
|
||||||
by overlaying broken gnumake with a fixed version on proot level.
|
|
||||||
Please only enable this for a limited time:
|
|
||||||
get stuck with a broken build; stop attempting to build something;
|
|
||||||
enable the option; nix-on-droid switch, relogin, build,
|
|
||||||
disable the option; nix-on-droid switch, relogin.
|
|
||||||
|
|
||||||
If you leave it on, Nix-store validation will fail,
|
|
||||||
repairs will break the working make,
|
|
||||||
updates will do bad things. You have been warned.
|
|
||||||
|
|
||||||
If you find yourself needing that hack, please report details at
|
|
||||||
https://github.com/t184256/nix-on-droid/issues/91
|
|
||||||
and consider building remotely as an alternative for such devices:
|
|
||||||
https://github.com/t184256/nix-on-droid/wiki/Remote-building
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
###### implementation
|
|
||||||
|
|
||||||
config = {
|
|
||||||
warnings = lib.optionals cfg.enable [
|
|
||||||
("system.workaround.make-posix-spawn.enable " +
|
|
||||||
"should no longer be needed on 21.05 " +
|
|
||||||
"and will be removed in 21.11 unless somebody objects")
|
|
||||||
];
|
|
||||||
|
|
||||||
build.extraProotOptions =
|
|
||||||
lib.optionals cfg.enable [
|
|
||||||
"-b"
|
|
||||||
(
|
|
||||||
"${config.build.installationDir}/"
|
|
||||||
+ "${gnumake-no-posix-spawn}/bin/overlaying-make"
|
|
||||||
+ ":${pkgs.gnumake}/bin/make"
|
|
||||||
)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue