summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--flake.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000000..6b71eedc66
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,30 @@
+{
+	description = "QEMU with Focaccia plugins";
+
+	inputs = {
+		self.submodules = true;
+
+		nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+
+		flake-utils.url = "github:numtide/flake-utils";
+	};
+
+	outputs = {self, flake-utils, nixpkgs}: 
+	flake-utils.lib.eachDefaultSystem (system:
+	let
+		pkgs = import nixpkgs { inherit system; };
+	in {
+		packages.default = pkgs.qemu.overrideAttrs (old: {
+			pname = "qemu-local";
+			version = "git";
+			src = ./.;
+			patches = [];
+  			nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pkgs.git pkgs.cacert ];
+
+			SSL_CERT_FILE   = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
+			GIT_SSL_CAINFO  = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
+			NIX_SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
+		});
+	});
+}
+