[wip] nix_flakes support #14

Draft
mwojcik wants to merge 12 commits from mwojcik/wfvm:nix_flakes into master
2 changed files with 5 additions and 8 deletions
Showing only changes of commit dc36fd61d2 - Show all commits

8
flake.lock generated
View File

@ -2,17 +2,17 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1645010845,
"narHash": "sha256-hO9X4PvxkSLMQnGGB7tOrKPwufhLMiNQMNXNwzLqneo=",
"lastModified": 1593034146,
"narHash": "sha256-EypP7RyPq5Yv05VgsQoIkdn26KJUIgQCItHgVY1MMQE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2128d0aa28edef51fd8fef38b132ffc0155595df",
"rev": "f8248ab6d9e69ea9c07950d73d48807ec595e923",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-21.11",
"repo": "nixpkgs",
"rev": "f8248ab6d9e69ea9c07950d73d48807ec595e923",
"type": "github"
}
},

View File

@ -1,6 +1,6 @@
{
description = "A Nix library to create and manage virtual machines running Windows.";
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-21.11;
inputs.nixpkgs.url = github:NixOS/nixpkgs/f8248ab6d9e69ea9c07950d73d48807ec595e923;
outputs = { self, nixpkgs }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
@ -9,8 +9,6 @@
utils = (import wfvm/utils.nix { inherit pkgs; });
# layers
layers = (import wfvm/layers { inherit pkgs; }); # end of layers
# ============
# bundle
bundleInstaller = pkgs.runCommandNoCC "win-bundle-installer.exe" {} ''
@ -21,7 +19,6 @@
env HOME=$(mktemp -d) GOOS=windows GOARCH=amd64 ${pkgs.go}/bin/go build
mv bundle.exe $out
'';
# /bundle ===========
# makeWindowsImage
makeWindowsImage = attrs: ( import wfvm/win.nix { inherit pkgs bundleInstaller; } // attrs );