forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / kr / kratos / package.nix
blob42530cefa886915ff00624288e601bbc79fa16ff
2   fetchFromGitHub,
3   buildGoModule,
4   lib,
5   stdenv
6 }:
7 let
8   pname = "kratos";
9   version = "1.3.1";
11 buildGoModule {
12   inherit pname version;
14   src = fetchFromGitHub {
15     owner = "ory";
16     repo = "kratos";
17     rev = "v${version}";
18     hash = "sha256-FJrBwjWBYwoiy8rWXn+jaVc1b35So1Rb9SjkUlNwAqE=";
19   };
21   vendorHash = "sha256-zZwunp/433oIYI5ZA3Pznq9jfvIZE5ZUJKxboVef8g0=";
23   subPackages = [ "." ];
25   tags = [ "sqlite" ];
27   # Pass versioning information via ldflags
28   ldflags = [
29     "-X github.com/ory/kratos/driver/config.Version=${version}"
30   ];
32   doCheck = false;
34   preBuild = ''
35     # Patch shebangs
36     files=(
37        test/e2e/run.sh
38        script/testenv.sh
39        script/test-envs.sh
40        script/debug-entrypoint.sh
41     )
42     patchShebangs "''${files[@]}"
44     # patchShebangs doesn't work for this Makefile, do it manually
45     substituteInPlace Makefile --replace-fail '/usr/bin/env bash' '${stdenv.shell}'
46   '';
48   meta = {
49     mainProgram = "kratos";
50     description = "API-first Identity and User Management system that is built according to cloud architecture best practices";
51     homepage = "https://www.ory.sh/kratos/";
52     license = lib.licenses.asl20;
53     maintainers = with lib.maintainers; [ mrmebelman ];
54   };