I think I figured out howto enable cross compiling between zen versions.

This commit is contained in:
Tom Alexander 2025-05-10 22:57:44 -04:00
parent 3e80452235
commit 22f9a0efcd
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
6 changed files with 12 additions and 4 deletions

View File

@ -31,6 +31,5 @@
# networking.interfaces.eno1.useDHCP = lib.mkDefault true; # networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@ -20,6 +20,14 @@
system = "x86_64-linux"; system = "x86_64-linux";
}; };
# Uncomment on of these to enable cross compiling:
# nixpkgs.buildPlatform = builtins.currentSystem;
# nixpkgs.buildPlatform = {
# gcc.arch = "znver4";
# gcc.tune = "znver4";
# system = "x86_64-linux";
# };
nixpkgs.overlays = [ nixpkgs.overlays = [
( (
final: prev: final: prev:

View File

@ -113,7 +113,7 @@ in
"doc" "doc"
"info" "info"
]; ];
buildInputs = [ final.makeWrapper ]; nativeBuildInputs = [ final.makeWrapper ];
postBuild = '' postBuild = ''
wrapProgram $out/bin/emacs --prefix PATH : ${ wrapProgram $out/bin/emacs --prefix PATH : ${
lib.makeBinPath [ lib.makeBinPath [

View File

@ -33,7 +33,7 @@ let
.overrideAttrs .overrideAttrs
(old: { (old: {
buildCommand = "${old.buildCommand}\n patchShebangs $out"; buildCommand = "${old.buildCommand}\n patchShebangs $out";
buildInputs = [ pkgs.makeWrapper ]; nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = '' postBuild = ''
wrapProgram $out/bin/decrypt_k8s_secret --prefix PATH : ${ wrapProgram $out/bin/decrypt_k8s_secret --prefix PATH : ${
lib.makeBinPath [ lib.makeBinPath [

View File

@ -131,7 +131,7 @@ in
++ [ ++ [
prev.rustup prev.rustup
]; ];
buildInputs = [ pkgs.makeWrapper ]; nativeBuildInputs = [ pkgs.makeWrapper ];
}; };
}) })
]; ];

View File

@ -22,6 +22,7 @@
(lib.mkIf config.me.graphical { (lib.mkIf config.me.graphical {
allowedUnfree = [ allowedUnfree = [
"vscode" "vscode"
"vscode-x86_64-unknown-linux-gnu-with-extensions"
"vscode-with-extensions" "vscode-with-extensions"
"vscode-extension-ms-vscode-remote-remote-ssh" "vscode-extension-ms-vscode-remote-remote-ssh"
]; ];