feat(pkgs): buildGoModule geteduroam

This commit is contained in:
madmin 2024-08-27 10:45:50 +02:00
parent 9415a96326
commit b92bb6c825
2 changed files with 52 additions and 0 deletions

View File

@ -5,4 +5,5 @@
#################### Packages with external source ####################
# name = pkgs.callPackage ./name { };
geteduroam = pkgs.callPackage ./geteduroam {};
}

View File

@ -0,0 +1,51 @@
# https://github.com/geteduroam/linux-app/releases/download/nightly/geteduroam-cli-linux-amd64
{
lib,
pkgs,
...
}:
let
pname = "geteduroam";
in
pkgs.buildGoModule rec {
inherit pname;
version = "0.3";
src = pkgs.fetchFromGitHub {
owner = "geteduroam";
repo = "linux-app";
rev = "${version}";
hash = "sha256-Cq0c/zwUym753ccMR1XwuzLkl+BIvng6AoA7eofULPk=";
};
#overrideModAttrs = old: {
# preConfigure = ''
# cd cmd/geteduroam-gui
# '';
#};
subPackages = ["cmd/geteduroam-cli" "cmd/geteduroam-gui"];
vendorHash = "sha256-ZwCJ/yayF31P3fuhk/qu3Wov861HDVGGNlkLwHTQo7Y=";#lib.fakeHash;
#doDist = false;
#ldflags = [
#"-s -w -X github.com/geteduroam/linux-app/cmd.version=${version}"
#"-extldflags '-static -L${pkgs.musl}/lib'"
#];
nativeBuildInputs = with pkgs; [musl libcap go gcc];
CGO_ENABLED = 0;
#installPhase = ''
# make build-gui
#'';
meta = with lib; {
homepage = "https://git.mattmor.in/nix-config";
license = licenses.mit;
description = "GetEduroam";
maintainers = with maintainers; [
madmin
];
};
}