Make it possible to get installed on Darwin

This commit is contained in:
Greg Hellings
2025-08-21 18:00:26 -05:00
parent 0fb8ffdbb7
commit 38ba89a060
2 changed files with 26 additions and 16 deletions
Generated
+3 -3
View File
@@ -108,11 +108,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1755577059, "lastModified": 1755736253,
"narHash": "sha256-5hYhxIpco8xR+IpP3uU56+4+Bw7mf7EMyxS/HqUYHQY=", "narHash": "sha256-jlIQRypNhB1PcB1BE+expE4xZeJxzoAGr1iUbHQta8s=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "97eb7ee0da337d385ab015a23e15022c865be75c", "rev": "596312aae91421d6923f18cecce934a7d3bfd6b8",
"type": "github" "type": "github"
}, },
"original": { "original": {
+17 -7
View File
@@ -56,6 +56,11 @@
_module.args.pkgs = import inputs.nixpkgs { _module.args.pkgs = import inputs.nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
overlays = [
(_f: p: {
OVMF = p.OVMF.overrideAttrs { meta.broken = false; };
})
];
}; };
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
@@ -63,10 +68,13 @@
shellHook = self'.checks.pre-commit.shellHook; shellHook = self'.checks.pre-commit.shellHook;
packages = packages =
(with pkgs; [ (
with pkgs;
[
packer packer
vagrant ]
]) ++ lib.optional (!pkgs.stdenv.isDarwin) vagrant
)
++ (with self'.packages; [ ++ (with self'.packages; [
cache cache
generate generate
@@ -77,7 +85,7 @@
# These commands will be shown in the motd that users read # These commands will be shown in the motd that users read
# upon entering the shell # upon entering the shell
env = { env = {
EFI_DIR = "${pkgs.OVMF.fd}/FV/"; EFI_DIR = if pkgs.stdenv.isDarwin then "" else "${pkgs.OVMF.fd}/FV/";
PACKER_CONFIG_DIR = "./packer_config"; PACKER_CONFIG_DIR = "./packer_config";
STORAGE_URL = "s3.thehellings.lan:9000"; STORAGE_URL = "s3.thehellings.lan:9000";
}; };
@@ -90,14 +98,16 @@
prefix: d: args: prefix: d: args:
pkgs.writeShellApplication { pkgs.writeShellApplication {
name = "${prefix}${name d}"; name = "${prefix}${name d}";
runtimeInputs = with pkgs; [ runtimeInputs =
with pkgs;
[
cdrtools cdrtools
findutils findutils
packer packer
qemu_full qemu_full
vagrant
xorriso xorriso
]; ]
++ lib.optional (!pkgs.stdenv.isDarwin) vagrant;
text = '' text = ''
# This is a workaround for a goofy behavior in CI # This is a workaround for a goofy behavior in CI
if [ -e "''${PACKER_CONFIG_DIR}" ]; then if [ -e "''${PACKER_CONFIG_DIR}" ]; then