foks: init at 0.1.7 (#424406)

This commit is contained in:
Masum Reza
2026-06-09 16:39:49 +00:00
committed by GitHub
2 changed files with 125 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
{
lib,
buildGoModule,
fetchFromGitHub,
foks,
pcsclite,
pkg-config,
stdenv,
buildPackages,
}:
let
templFoks = buildPackages.templ.overrideAttrs (old: {
pname = "templ-foks";
version = "0.3.833";
src = old.src.override {
hash = "sha256-4K1MpsM3OuamXRYOllDsxxgpMRseFGviC4RJzNA7Cu8=";
};
vendorHash = "sha256-OPADot7Lkn9IBjFCfbrqs3es3F6QnWNjSOHxONjG4MM=";
});
in
buildGoModule (finalAttrs: {
pname = "foks-server";
version = "0.1.7";
src = fetchFromGitHub {
owner = "foks-proj";
repo = "go-foks";
tag = "v${finalAttrs.version}";
hash = "sha256-UZ4BZ2/S44hnG+uLHtWR/qqQtr6tbbQbQOgIrN4ciT0=";
};
vendorHash = "sha256-+ysHa5KNhoxtoXPgOWC9ZDJKYqF+84s7oyxRib2S6a8=";
postPatch = ''
cd ./server/web/templates
templ generate
cd -
'';
postInstall = ''
ln -s $out/bin/{foks-server,git-remote-foks}
'';
subPackages = [ "server/foks-server" ];
excludedPackages = [ "server" ];
buildInputs = lib.optionals (stdenv.hostPlatform.isLinux) [ pcsclite ];
nativeBuildInputs = [
pkg-config
templFoks
foks
];
__structuredAttrs = true;
meta = {
description = "Federated key management and distribution system";
homepage = "https://foks.pub";
downloadPage = "https://github.com/foks-proj/go-foks";
changelog = "https://github.com/foks-proj/go-foks/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ poptart ];
mainProgram = "foks";
};
})
+62
View File
@@ -0,0 +1,62 @@
{
lib,
buildGoModule,
fetchFromGitHub,
pcsclite,
pkg-config,
stdenv,
templ,
buildPackages,
}:
let
templFoks = buildPackages.templ.overrideAttrs (old: {
pname = "templ-foks";
version = "0.3.833";
src = old.src.override {
hash = "sha256-4K1MpsM3OuamXRYOllDsxxgpMRseFGviC4RJzNA7Cu8=";
};
vendorHash = "sha256-OPADot7Lkn9IBjFCfbrqs3es3F6QnWNjSOHxONjG4MM=";
});
in
buildGoModule (finalAttrs: {
pname = "foks";
version = "0.1.7";
src = fetchFromGitHub {
owner = "foks-proj";
repo = "go-foks";
tag = "v${finalAttrs.version}";
hash = "sha256-UZ4BZ2/S44hnG+uLHtWR/qqQtr6tbbQbQOgIrN4ciT0=";
};
vendorHash = "sha256-+ysHa5KNhoxtoXPgOWC9ZDJKYqF+84s7oyxRib2S6a8=";
postPatch = ''
cd ./server/web/templates
${templFoks}/bin/templ generate
cd -
'';
postInstall = ''
ln -s $out/bin/{foks,git-remote-foks}
'';
subPackages = [ "client/foks" ];
excludedPackages = [ "server" ];
buildInputs = lib.optionals (stdenv.hostPlatform.isLinux) [ pcsclite ];
nativeBuildInputs = [
pkg-config
];
__structuredAttrs = true;
meta = {
description = "Federated key management and distribution system";
homepage = "https://foks.pub";
downloadPage = "https://github.com/foks-proj/go-foks";
changelog = "https://github.com/foks-proj/go-foks/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ poptart ];
mainProgram = "foks";
};
})