quickemu-project / quickemu

Quickly create and run optimised Windows, macOS and Linux virtual machines
MIT License
9.82k stars 433 forks source link

fix: Fixes nix flakes by adding version to package.nix #1305

Closed mystery3525 closed 1 week ago

mystery3525 commented 1 week ago

Essentially, when you try and import the project directly with nix flakes, you receive a missing 'name' attribute error. This is because 'name' is supposed to be defined in stdenv.mkDerivation, but is not. I looked into it and found that name is actually <pname>-<version>, so I just added it.

Below are the before and after outputs of flake.nix using nix flake show:

Before:

image

After:

image

mystery3525 commented 1 week ago

I was looking at how we did versioning and thought that having to update the version in two different places is too much work, so I discovered a neat approach by facebook/hhvm where they dynamically pull the version from a file, and applied that here with readonly VERSION="...", so you shouldn't have to worry about updating the nix flake version.