appvm/default.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

2020-01-08 20:52:29 +00:00
# { stdenv
# , lib
# , buildGoPackage
# , fetchgit
# , nix
# , virt-viewer
# , makeWrapper
# }:
let
pkgs = import <nixpkgs> {};
2020-01-22 00:33:20 +00:00
virt-manager-without-menu = pkgs.virt-viewer.overrideAttrs(x: {
patches = [ ./patches/0001-Remove-menu-bar.patch ];
});
2020-01-08 20:52:29 +00:00
in with pkgs;
2020-01-04 18:20:27 +00:00
buildGoPackage rec {
pname = "appvm";
2020-01-08 11:20:26 +00:00
#version = "0.3";
version = "master";
2020-01-04 18:20:27 +00:00
buildInputs = [ makeWrapper ];
goPackagePath = "code.dumpstack.io/tools/${pname}";
2020-01-08 11:20:26 +00:00
# src = fetchgit {
# rev = "refs/tags/v${version}";
# url = "https://code.dumpstack.io/tools/${pname}.git";
# sha256 = "1ji4g868xrv6kx6brdrqfv0ca12vjw0mcndffnnwpczh4yv81sd3";
src = builtins.fetchGit {
url = "https://code.dumpstack.io/tools/appvm.git";
ref = "master";
2020-01-04 18:20:27 +00:00
};
goDeps = ./deps.nix;
postFixup = ''
wrapProgram $bin/bin/appvm \
2020-01-22 00:33:20 +00:00
--prefix PATH : "${lib.makeBinPath [ nix virt-manager-without-menu ]}"
2020-01-04 18:20:27 +00:00
'';
meta = {
description = "Nix-based app VMs";
homepage = "https://code.dumpstack.io/tools/${pname}";
maintainers = [ lib.maintainers.dump_stack ];
license = lib.licenses.gpl3;
};
}