nixpkgs/pkgs/applications/misc/kratos/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.2 KiB
Nix
Raw Normal View History

{
fetchFromGitHub,
buildGoModule,
lib,
stdenv
}:
let
2021-05-04 15:14:04 +00:00
pname = "kratos";
2024-06-05 16:43:38 +00:00
version = "1.2.0";
in
buildGoModule {
inherit pname version;
2021-05-04 15:14:04 +00:00
src = fetchFromGitHub {
owner = "ory";
repo = "kratos";
rev = "v${version}";
2024-06-05 16:43:38 +00:00
hash = "sha256-KqF6DYrEsmPj2PtI2+5ztE0m9uBO1gpNlvdo+Aw6REA=";
2021-05-04 15:14:04 +00:00
};
2024-06-05 16:43:38 +00:00
vendorHash = "sha256-6gJf+8AKjV83MTF0rC8OxDwkwGx4CJg7SdfNgcja8QY=";
2021-05-04 15:14:04 +00:00
subPackages = [ "." ];
2021-08-05 21:52:29 +00:00
tags = [ "sqlite" ];
2021-05-04 15:14:04 +00:00
# Pass versioning information via ldflags
ldflags = [
"-X github.com/ory/kratos/driver/config.Version=${version}"
];
2021-05-04 15:14:04 +00:00
doCheck = false;
preBuild = ''
# Patch shebangs
files=(
test/e2e/run.sh
script/testenv.sh
script/test-envs.sh
script/debug-entrypoint.sh
2021-05-04 15:14:04 +00:00
)
patchShebangs "''${files[@]}"
# patchShebangs doesn't work for this Makefile, do it manually
substituteInPlace Makefile --replace-fail '/usr/bin/env bash' '${stdenv.shell}'
2021-05-04 15:14:04 +00:00
'';
meta = {
2024-02-11 02:19:15 +00:00
mainProgram = "kratos";
description = "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-04 15:14:04 +00:00
};
}