From 037e759bba5a8837b1cf612c8836edff49fc8d6b Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Fri, 13 Dec 2024 10:12:47 +0100 Subject: [PATCH 1/2] flake: use the package spec in default.nix --- flake.nix | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/flake.nix b/flake.nix index cb6df1f..fbe8530 100644 --- a/flake.nix +++ b/flake.nix @@ -78,35 +78,7 @@ packages = rec { default = morph; - morph = pkgs.buildGoModule rec { - name = "morph-unstable-${version}"; - inherit version; - - src = pkgs.nix-gitignore.gitignoreSource [ ] ./.; - - ldflags = [ - "-X main.version=${version}" - "-X main.assetRoot=${placeholder "lib"}" - ]; - - vendorHash = "sha256-Mi0SdvmYao6rLt8+bFcUv2AjHkJTLP85zGka1/cCPzQ="; - - postInstall = '' - mkdir -p $lib - cp -v ./data/*.nix $lib - ''; - - outputs = [ - "out" - "lib" - ]; - - meta = { - homepage = "https://github.com/DBCDK/morph"; - description = "Morph is a NixOS host manager written in Golang."; - mainProgram = "morph"; - }; - }; + morph = pkgs.callPackage ./default.nix { inherit version; }; }; } ); From 41e3ddd9d0759a63b11993efd08e4cc938c8ec04 Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Fri, 13 Dec 2024 10:24:56 +0100 Subject: [PATCH 2/2] ./default.nix : actually set mainProgram in as it was in flake.nix --- default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/default.nix b/default.nix index 6a4ba88..b78ce50 100644 --- a/default.nix +++ b/default.nix @@ -30,5 +30,6 @@ pkgs.buildGoModule rec { meta = { homepage = "https://github.com/DBCDK/morph"; description = "Morph is a NixOS host manager written in Golang."; + mainProgram = "morph"; }; }