new: packages.lego: lego is back

This commit is contained in:
L-Nafaryus 2024-12-09 23:58:29 +05:00
parent f14818f071
commit ee3ea2b5e4
Signed by: L-Nafaryus
GPG Key ID: 553C97999B363D38
2 changed files with 47 additions and 0 deletions

View File

@ -81,6 +81,12 @@ in
builder = {pkgs, ...}: pkgs.callPackage;
};
lego = {
source = ./lego;
platforms = ["x86_64-linux"];
builder = {pkgs, ...}: pkgs.callPackage;
};
# Pass for cache
# ISSUE: attribute 'targetPlatforms' missing

41
packages/lego/default.nix Normal file
View File

@ -0,0 +1,41 @@
{
bonLib,
lib,
fetchFromGitHub,
buildGoModule,
nixosTests,
version ? "0bbf5ab59cda8beaedf5b1ce21a3d1bf0eb48fc5",
hash ? "sha256-j6AlA9+whDxvpbZBCnJinKTb0+bJrSqnMgCqmWWfLig=",
vendorHash ? "sha256-r9R+d5H5RjwzksbAlcFPyRtCGXSH1JBVfNHr5QiHA7Y=",
...
}:
buildGoModule rec {
pname = "lego";
inherit version;
src = fetchFromGitHub {
owner = "go-acme";
repo = "lego";
rev = version;
hash = hash;
};
inherit vendorHash;
doCheck = false;
subPackages = ["cmd/lego"];
ldflags = [
"-X main.version=${version}"
];
meta = with lib; {
description = "Let's Encrypt client and ACME library written in Go";
license = licenses.mit;
homepage = "https://go-acme.github.io/lego/";
maintainers = with bonLib.maintainers; [L-Nafaryus];
};
passthru.tests.lego = nixosTests.acme;
}