biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / virtualization / appvm / default.nix
blobc71236d127b680d768b72eff50e0c5751dbd8ab9
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , nix
5 , virt-viewer
6 , makeWrapper }:
8 let
9   # Upstream patches fail with newer virt-viewer. These are own ports to the
10   # newest virt-viewer version, see:
11   # https://github.com/jollheef/appvm/issues/28
12   virt-manager-without-menu = virt-viewer.overrideAttrs(oldAttrs: {
13     patches = oldAttrs.patches ++ [
14       ./0001-Remove-menu-bar.patch
15       ./0002-Do-not-grab-keyboard-mouse.patch
16       ./0003-Use-name-of-appvm-applications-as-a-title.patch
17       ./0004-Use-title-application-name-as-subtitle.patch
18     ];
19   });
21 buildGoModule rec {
22   pname = "appvm";
23   version = "unstable-2021-12-20";
25   src = fetchFromGitHub {
26     owner = "jollheef";
27     repo = pname;
28     rev = "17f17be7846d872e7e26d5cb6759a52ea4113587";
29     sha256 = "sha256-FL5olOy1KufULyqI2dJeS0OnKzC3LfPWxnia2i4f4yY=";
30   };
32   vendorHash = "sha256-8eU+Mf5dxL/bAMMShXvj8I1Kdd4ysBTWvgYIXwLStPI=";
34   nativeBuildInputs = [ makeWrapper ];
36   postFixup = ''
37     wrapProgram $out/bin/appvm \
38       --prefix PATH : "${lib.makeBinPath [ nix virt-manager-without-menu ]}"
39   '';
41   meta = with lib; {
42     description = "Nix-based app VMs";
43     homepage = "https://code.dumpstack.io/tools/${pname}";
44     maintainers = with maintainers; [ dump_stack cab404 onny ];
45     license = licenses.gpl3;
46   };