2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildGoModule,
|
|
|
|
lib,
|
|
|
|
stdenv
|
|
|
|
}:
|
|
|
|
let
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "kratos";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.1.0";
|
2024-05-15 15:35:15 +00:00
|
|
|
in
|
|
|
|
buildGoModule {
|
|
|
|
inherit pname version;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ory";
|
|
|
|
repo = "kratos";
|
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-zrII2lpffZkwFauPAilh1QaqRKvpj1mlHZA7in1ljYg=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
vendorHash = "sha256-TSB7jCPOVwub+ZQaaUSmsz/R4HAfmnWb0wTf2w4aeuk=";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-08-06 21:57:35 +00:00
|
|
|
tags = [ "sqlite" ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
# Pass versioning information via ldflags
|
|
|
|
ldflags = [
|
|
|
|
"-X github.com/ory/kratos/driver/config.Version=${version}"
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
# Patch shebangs
|
|
|
|
files=(
|
|
|
|
test/e2e/run.sh
|
|
|
|
script/testenv.sh
|
|
|
|
script/test-envs.sh
|
2022-03-30 09:31:56 +00:00
|
|
|
script/debug-entrypoint.sh
|
2021-05-20 23:08:51 +00:00
|
|
|
)
|
|
|
|
patchShebangs "''${files[@]}"
|
|
|
|
|
|
|
|
# patchShebangs doesn't work for this Makefile, do it manually
|
2024-05-15 15:35:15 +00:00
|
|
|
substituteInPlace Makefile --replace-fail '/usr/bin/env bash' '${stdenv.shell}'
|
2021-05-20 23:08:51 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
meta = {
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "kratos";
|
2024-05-15 15:35:15 +00:00
|
|
|
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 ];
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
}
|