From ab77e23be41445585bb5350695815af45531bfd2 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Sun, 3 Dec 2023 23:40:00 -0700 Subject: [PATCH] Added golang requirements for pubkey command --- metznet/golang.scm | 114 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 metznet/golang.scm diff --git a/metznet/golang.scm b/metznet/golang.scm new file mode 100644 index 0000000..139dc3a --- /dev/null +++ b/metznet/golang.scm @@ -0,0 +1,114 @@ +(define-module (metznet golang) + #:use-module (guix packages) + #:use-module (gnu packages golang) + #:use-module (guix build download) + #:use-module (guix git-download) + #:use-module ((guix licenses) + #:prefix license:) + #:use-module (guix build-system go) + + #:export (go-gopkg-in-asn1-ber-v1 metznet-pubkey)) + +(define-public go-github-com-azure-go-ntlmssp + (package + (name "go-github-com-azure-go-ntlmssp") + (version "0.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Azure/go-ntlmssp.git") + (commit "754e69321358ada85ce213a4ec971d3e4d1bfdf7"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0dg20fwylf5lpsc5fgnnzw7jxz0885bg97lla1b5wrlhjas6lidn")))) + (build-system go-build-system) + (native-inputs `(("go-golang-org-x-crypto" ,go-golang-org-x-crypto))) + (arguments + '(#:phases (modify-phases %standard-phases + (delete 'check)) + #:import-path "github.com/Azure/go-ntlmssp")) + (home-page "https://github.com/Azure/go-ntlmssp") + (synopsis + "Golang package that provides NTLM/Negotiate authentication over HTTP") + (description + "Protocol details from https://msdn.microsoft.com/en-us/library/cc236621.aspx Implementation hints from http://davenport.sourceforge.net/ntlm.html +This package only implements authentication, no key exchange or encryption. It only supports Unicode (UTF16LE) encoding of protocol strings, no OEM encoding. This package implements NTLMv2.") + (license license:expat))) + +(define-public go-github-com-go-asn1-ber + (package + (name "go-github-com-go-asn1-ber") + (version "1.5.5") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/go-asn1-ber/asn1-ber.git") + (commit "04301b4b1c5ff66221f8f8a394f814a9917d678a"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1k9yqv963jqwl3i14069pf62il2kjqhg096f6sq55s4qykklpz98")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/go-asn1-ber/asn1-ber")) + (home-page "https://github.com/go-asn1-ber/asn1-ber") + (synopsis + "ASN1 BER Encoding / Decoding Library for the GO programming language.") + (description + "Working: Very basic encoding / decoding needed for LDAP protocol") + (license license:expat))) + +(define-public go-github-com-go-ldap-ldap + (package + (name "go-github-com-go-ldap-ldap") + (version "3.4.6") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/go-ldap/ldap.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "019j58rhkqp3dnn3c9nj7bjc1h52fs7i0lml5gdwhwn837c0aahb")))) + (build-system go-build-system) + (propagated-inputs `(("go-github-com-azure-go-ntlmssp" ,go-github-com-azure-go-ntlmssp) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) + ("go-github-com-google-uuid" ,go-github-com-google-uuid) + ("go-github-com-go-asn1-ber" ,go-github-com-go-asn1-ber) + ("go-github-com-stretchr-testify" ,go-github-com-stretchr-testify))) + (arguments + '(#:phases (modify-phases %standard-phases + (delete 'check)) + #:import-path "github.com/go-ldap/ldap")) + (home-page "https://github.com/go-ldap/ldap") + (synopsis "Basic LDAP v3 functionality for the GO programming language.") + (description + "Basic LDAP v3 functionality for the GO programming language.") + (license license:expat))) + +(define-public metznet-pubkey + (package + (name "metznet-pubkey") + (version "1.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.metznet.ca/metznet/pubkey.git") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1074knwjakwzdlg10xbm0m6qzi4i3bbp452q9b7jm52gbalk3hzb")))) + (build-system go-build-system) + (arguments + `(#:import-path "git.metznet.ca/Metznet/pubkey")) + (native-inputs `(("go-github-com-go-ldap-ldap" ,go-github-com-go-ldap-ldap) + ("go-github-com-go-asn1-ber" ,go-github-com-go-asn1-ber))) + (synopsis "Get public key from ldap") + (description + "This package provides a command-line tool to get public keys from an ldap server") + (home-page "https://git.metznet.ca/metznet/pubkey.git") + (license license:bsd-3))) +