about summary refs log tree commit diff
path: root/nix/templates/goapp/backend/default.nix
diff options
context:
space:
mode:
authorEmile <git@emile.space>2025-02-12 22:05:22 +0100
committerEmile <git@emile.space>2025-02-12 22:05:22 +0100
commit7152205c80f059d3649e1830fb4dfc46d1fc158f (patch)
treeb0d9a9aea760fabd61ee5cb06814d45cac5bb629 /nix/templates/goapp/backend/default.nix
parent4d08790c43b2d0720ef43b657a651a7c541d30d2 (diff)
template: the goapp docker package should now (in theory) build
It's quite a weird way to pull out the packge name from the attribute
set of defined packages, yet it kind of works.

I can't test it, as docker doesn't want to run Mach-O binaries, but
kicking this into hydra should result in some nice builds.
Diffstat (limited to 'nix/templates/goapp/backend/default.nix')
-rw-r--r--nix/templates/goapp/backend/default.nix15
1 files changed, 5 insertions, 10 deletions
diff --git a/nix/templates/goapp/backend/default.nix b/nix/templates/goapp/backend/default.nix
index 1a3aeeb..f4ed3a4 100644
--- a/nix/templates/goapp/backend/default.nix
+++ b/nix/templates/goapp/backend/default.nix
@@ -1,21 +1,16 @@
-{ pkgs, packagename, ... }:
+{ pkgs, name, ... }:
 
 let
   version = "0.0.1";
 in
 pkgs.buildGoModule {
-  name = "${packagename}-${version}";
-  pname = "${packagename}";
+  name = "${name}-${version}";
+  pname = "${name}";
   version = "${version}";
 
   src = ./.;
-  subPackages = [ "src" ];
-  vendorHash = "sha256-8wYERVt3PIsKkarkwPu8Zy/Sdx43P6g2lz2xRfvTZ2E=";
-
-  postInstall = ''
-    mkdir -p $out
-    mv $out/bin/src $out/bin/${packagename}
-  '';
+  subPackages = [ "" ];
+  vendorHash = "sha256-tIk8lmyuVETrOW7fA7K7uNNXAAtJAYSM4uH+xZaMWqc=";
 
   doCheck = true;
 }