hyprspace/package.nix
2026-06-19 00:15:42 +02:00

49 lines
980 B
Nix

{
lib,
buildGoModule,
generateSchemasProgram,
}:
let
inherit (lib.fileset) toSource unions fileFilter;
pname = "hyprspace";
version = "0.14.1";
in
buildGoModule {
inherit pname version;
src = toSource {
root = ./.;
fileset = unions [
./go.mod
./go.sum
(fileFilter (file: file.hasExt "go") ./.)
];
};
env.CGO_ENABLED = "0";
vendorHash = "sha256-S3406DHFcRb8f2ZqaJwzpt7oE22ys4+NXcjlDeAHsRo=";
ldflags = [
"-s"
"-w"
"-X github.com/hyprspace/hyprspace/cli.appVersion=${version}"
];
postPatch = ''
( set -x; ${generateSchemasProgram} )
'';
meta = {
description = "A Lightweight VPN Built on top of Libp2p for Truly Distributed Networks.";
homepage = "https://github.com/hyprspace/hyprspace";
license = lib.licenses.asl20;
maintainers = with lib; [
notashelf
yusdacra
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
mainProgram = "hyprspace";
};
}