about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorPavol Rusnak <pavol@rusnak.io>2024-05-13 12:08:26 +0200
committerGitHub <noreply@github.com>2024-05-13 12:08:26 +0200
commit03d7f4e156fa7a04ac3bc01f74bdad8cd2a18356 (patch)
tree6b0952499368df66c781b82c4a6c780de7b035c0 /pkgs/applications
parent766d1346b17e1aa97c31b2c691b948ef4fe16dfb (diff)
parent8786fdec30a030bb76f1c259917a3e670a404a61 (diff)
Merge pull request #310145 from MrMebelMan/fix/kratos
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/kratos/default.nix30
1 files changed, 21 insertions, 9 deletions
diff --git a/pkgs/applications/misc/kratos/default.nix b/pkgs/applications/misc/kratos/default.nix
index d5d12eb44676d..6bf06be9be7e8 100644
--- a/pkgs/applications/misc/kratos/default.nix
+++ b/pkgs/applications/misc/kratos/default.nix
@@ -1,8 +1,15 @@
-{ fetchFromGitHub, buildGoModule, lib, stdenv }:
-
-buildGoModule rec {
+{
+  fetchFromGitHub,
+  buildGoModule,
+  lib,
+  stdenv
+}:
+let
   pname = "kratos";
   version = "1.1.0";
+in
+buildGoModule {
+  inherit pname version;
 
   src = fetchFromGitHub {
     owner = "ory";
@@ -17,6 +24,11 @@ buildGoModule rec {
 
   tags = [ "sqlite" ];
 
+  # Pass versioning information via ldflags
+  ldflags = [
+    "-X github.com/ory/kratos/driver/config.Version=${version}"
+  ];
+
   doCheck = false;
 
   preBuild = ''
@@ -30,14 +42,14 @@ buildGoModule rec {
     patchShebangs "''${files[@]}"
 
     # patchShebangs doesn't work for this Makefile, do it manually
-    substituteInPlace Makefile --replace '/bin/bash' '${stdenv.shell}'
+    substituteInPlace Makefile --replace-fail '/usr/bin/env bash' '${stdenv.shell}'
   '';
 
-  meta = with lib; {
-    maintainers = with maintainers; [ mrmebelman ];
-    homepage = "https://www.ory.sh/kratos/";
-    license = licenses.asl20;
-    description = "An API-first Identity and User Management system that is built according to cloud architecture best practices";
+  meta = {
     mainProgram = "kratos";
+    description = "An API-first Identity and User Management system that is built according to cloud architecture best practices";
+    homepage = "https://www.ory.sh/kratos/";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ mrmebelman ];
   };
 }