2018-11-18 20:58:03 +00:00
|
|
|
{ buildGoPackage, fetchFromGitHub, go-bindata, lib }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "morph";
|
2019-09-10 16:06:23 +01:00
|
|
|
version = "1.3.1";
|
2018-11-18 20:58:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dbcdk";
|
|
|
|
repo = "morph";
|
|
|
|
rev = "v${version}";
|
2019-09-10 16:06:23 +01:00
|
|
|
sha256 = "0nwl9n5b0lnil96573wa3hyr3vyvfiwvmpkla3pmwkpmriac4xrg";
|
2018-11-18 20:58:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
goPackagePath = "github.com/dbcdk/morph";
|
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
|
|
|
buildInputs = [ go-bindata ];
|
|
|
|
|
2019-02-21 12:55:46 +00:00
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X
|
|
|
|
main.version=${version}
|
|
|
|
'';
|
|
|
|
|
2018-11-18 20:58:03 +00:00
|
|
|
prePatch = ''
|
|
|
|
go-bindata -pkg assets -o assets/assets.go data/
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $lib
|
|
|
|
cp -v $src/data/*.nix $lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" "bin" "lib" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Morph is a NixOS host manager written in Golang.";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://github.com/dbcdk/morph";
|
|
|
|
maintainers = with maintainers; [adamt johanot];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|