mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
nixos/stage-2: Build readonly-mountpoint with normal mkDerivation phases
This way the binary gets stripped & rpath-shrinked etc. as usual. We'd seem to get a runtime reference to gcc otherwise. TODO: Maybe we should be able to set e.g. 'dontUnpack = true;' to make this more pretty.
This commit is contained in:
parent
54dcadad6c
commit
cd3088455d
@ -7,11 +7,14 @@ let
|
||||
kernel = config.boot.kernelPackages.kernel;
|
||||
activateConfiguration = config.system.activationScripts.script;
|
||||
|
||||
readonlyMountpoint = pkgs.runCommand "readonly-mountpoint" {} ''
|
||||
mkdir -p $out/bin
|
||||
cc -O3 ${./readonly-mountpoint.c} -o $out/bin/readonly-mountpoint
|
||||
strip -s $out/bin/readonly-mountpoint
|
||||
'';
|
||||
readonlyMountpoint = pkgs.stdenv.mkDerivation {
|
||||
name = "readonly-mountpoint";
|
||||
unpackPhase = "true";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cc -O3 ${./readonly-mountpoint.c} -o $out/bin/readonly-mountpoint
|
||||
'';
|
||||
};
|
||||
|
||||
bootStage2 = pkgs.substituteAll {
|
||||
src = ./stage-2-init.sh;
|
||||
|
Loading…
Reference in New Issue
Block a user