mirror of
https://code.dumpstack.io/tools/appvm.git
synced 2024-11-26 14:13:01 +00:00
Add Nix package
This commit is contained in:
parent
40ef3fe50e
commit
7d6d524b67
2
Makefile
Normal file
2
Makefile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
all:
|
||||||
|
nix-build -E '((import <nixpkgs> {}).callPackage (import ./default.nix) { })' --option sandbox true --no-out-link
|
37
default.nix
Normal file
37
default.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, buildGoPackage
|
||||||
|
, fetchgit
|
||||||
|
, nix
|
||||||
|
, virt-viewer
|
||||||
|
, makeWrapper
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoPackage rec {
|
||||||
|
pname = "appvm";
|
||||||
|
version = "0.3";
|
||||||
|
|
||||||
|
buildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
goPackagePath = "code.dumpstack.io/tools/${pname}";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
rev = "refs/tags/v${version}";
|
||||||
|
url = "https://code.dumpstack.io/tools/${pname}.git";
|
||||||
|
sha256 = "1ji4g868xrv6kx6brdrqfv0ca12vjw0mcndffnnwpczh4yv81sd3";
|
||||||
|
};
|
||||||
|
|
||||||
|
goDeps = ./deps.nix;
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram $bin/bin/appvm \
|
||||||
|
--prefix PATH : "${lib.makeBinPath [ nix virt-viewer ]}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Nix-based app VMs";
|
||||||
|
homepage = "https://code.dumpstack.io/tools/${pname}";
|
||||||
|
maintainers = [ lib.maintainers.dump_stack ];
|
||||||
|
license = lib.licenses.gpl3;
|
||||||
|
};
|
||||||
|
}
|
75
deps.nix
Normal file
75
deps.nix
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
|
||||||
|
[
|
||||||
|
{
|
||||||
|
goPackagePath = "github.com/alecthomas/template";
|
||||||
|
fetch = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://github.com/alecthomas/template";
|
||||||
|
rev = "fb15b899a75114aa79cc930e33c46b577cc664b1";
|
||||||
|
sha256 = "1vlasv4dgycydh5wx6jdcvz40zdv90zz1h7836z7lhsi2ymvii26";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
goPackagePath = "github.com/alecthomas/units";
|
||||||
|
fetch = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://github.com/alecthomas/units";
|
||||||
|
rev = "f65c72e2690dc4b403c8bd637baf4611cd4c069b";
|
||||||
|
sha256 = "04jyqm7m3m01ppfy1f9xk4qvrwvs78q9zml6llyf2b3v5k6b2bbc";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
goPackagePath = "github.com/digitalocean/go-libvirt";
|
||||||
|
fetch = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://github.com/digitalocean/go-libvirt";
|
||||||
|
rev = "08f982c676c687208cd701abd4565d40c374d45f";
|
||||||
|
sha256 = "18wp5mnww95f36v26k0xywkmsi1p2k5lwbcdmn3j6a2krw1r5ki0";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
goPackagePath = "github.com/go-cmd/cmd";
|
||||||
|
fetch = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://github.com/go-cmd/cmd";
|
||||||
|
rev = "4816cdeadc82a57cf8891131b2f6797489f65dff";
|
||||||
|
sha256 = "0dnbvvcirivyig0j6ip1ybpnjqjiywbdv9srgm4783vhqj9q6g7y";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
goPackagePath = "github.com/jollheef/go-system";
|
||||||
|
fetch = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://github.com/jollheef/go-system";
|
||||||
|
rev = "6ed6b1d2b8dbf44afb949ebae53b57690e6952ec";
|
||||||
|
sha256 = "00i900bfq6d28sb9677w4ryyq1mq2z4sgwhjq9fi8ak18hc9hgbi";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
goPackagePath = "github.com/mattn/go-runewidth";
|
||||||
|
fetch = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://github.com/mattn/go-runewidth";
|
||||||
|
rev = "703b5e6b11ae25aeb2af9ebb5d5fdf8fa2575211";
|
||||||
|
sha256 = "0znpyz71gajx3g0j2zp63nhjj2c07g16885vxv4ykwnrfmzbgk4w";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
goPackagePath = "github.com/olekukonko/tablewriter";
|
||||||
|
fetch = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://github.com/olekukonko/tablewriter";
|
||||||
|
rev = "e6d60cf7ba1f42d86d54cdf5508611c4aafb3970";
|
||||||
|
sha256 = "0hh95glg7d2md185r03wn52j2r33jc4zil0qvcrs66ka7bdxi7vj";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
goPackagePath = "gopkg.in/alecthomas/kingpin.v2";
|
||||||
|
fetch = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://gopkg.in/alecthomas/kingpin.v2";
|
||||||
|
rev = "947dcec5ba9c011838740e680966fd7087a71d0d";
|
||||||
|
sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user