-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathdefault.nix
More file actions
40 lines (32 loc) · 873 Bytes
/
default.nix
File metadata and controls
40 lines (32 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
nixpkgs ? import ./nixpkgs.nix,
pkgs ? import nixpkgs { },
version ? "dev",
}:
pkgs.buildGoModule rec {
name = "morph-unstable-${version}";
inherit version;
src = pkgs.nix-gitignore.gitignoreSource [ ] ./.;
ldflags = [
"-X main.version=${version}"
"-X main.assetRoot=${placeholder "lib"}"
];
nativeBuildInputs = [ pkgs.installShellFiles ];
vendorHash = "sha256-sRZWW/ai70hxn/Hn5PomVC9sB3bihTxOzCmdkyrXX8s=";
postInstall = ''
mkdir -p $lib
cp -v ./data/*.nix $lib
installShellCompletion --cmd morph \
--bash <($out/bin/morph --completion-script-bash) \
--zsh <($out/bin/morph --completion-script-zsh)
'';
outputs = [
"out"
"lib"
];
meta = {
homepage = "https://github.com/DBCDK/morph";
description = "Morph is a NixOS host manager written in Golang.";
mainProgram = "morph";
};
}