nixpkgs/pkgs/tools/package-management/morph/default.nix

45 lines
1.0 KiB
Nix
Raw Normal View History

2020-01-20 12:49:14 +00:00
{ buildGoPackage, fetchFromGitHub, go-bindata, openssh, makeWrapper, lib }:
buildGoPackage rec {
pname = "morph";
version = "1.5.0";
src = fetchFromGitHub {
owner = "dbcdk";
repo = "morph";
rev = "v${version}";
sha256 = "064ccvvq4yk17jy5jvi1nxfp5ajvnvn2k4zvh9v0n3ragcl3rd20";
};
goPackagePath = "github.com/dbcdk/morph";
goDeps = ./deps.nix;
2020-03-17 23:24:07 +00:00
nativeBuildInputs = [ makeWrapper go-bindata ];
2019-02-21 12:55:46 +00:00
buildFlagsArray = ''
-ldflags=
-X
main.version=${version}
'';
postPatch = ''
go-bindata -pkg assets -o assets/assets.go data/
'';
postInstall = ''
mkdir -p $lib
cp -v go/src/$goPackagePath/data/*.nix $lib
wrapProgram $out/bin/morph --prefix PATH : ${lib.makeBinPath [ openssh ]};
'';
outputs = [ "out" "lib" ];
meta = with lib; {
description = "A NixOS host manager written in Golang";
license = licenses.mit;
homepage = "https://github.com/dbcdk/morph";
maintainers = with maintainers; [adamt johanot];
platforms = platforms.unix;
};
}