2017-05-20 17:21:25 +00:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, avahi, cups }:
|
2017-04-22 00:21:31 +00:00
|
|
|
|
|
|
|
# TODO: Add a service for gcp-cups-connector and perhaps some other
|
|
|
|
# kind of configuration for the same thing that gcp-connector-util
|
|
|
|
# provides.
|
|
|
|
|
2019-01-04 22:30:13 +00:00
|
|
|
# Mic92 has an example module:
|
|
|
|
# - https://github.com/Mic92/dotfiles/blob/ba2a01144cfdc71c829d872a3fc816c64663ad7f/nixos/vms/matchbox/modules/cloud-print-connector.nix
|
|
|
|
|
2017-04-22 00:21:31 +00:00
|
|
|
buildGoPackage rec {
|
|
|
|
name = "cloud-print-connector-unstable-${version}";
|
2019-01-04 22:30:13 +00:00
|
|
|
version = "1.16";
|
2017-04-22 00:21:31 +00:00
|
|
|
rev = "481ad139cc023a3ba65e769f08f277368fa8a5de";
|
|
|
|
|
|
|
|
goPackagePath = "github.com/google/cloud-print-connector";
|
|
|
|
|
2019-01-04 22:30:13 +00:00
|
|
|
subPackages = [
|
|
|
|
"gcp-connector-util"
|
|
|
|
"gcp-cups-connector"
|
|
|
|
];
|
|
|
|
|
2017-05-20 17:21:25 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "cloud-print-connector";
|
2019-01-04 22:30:13 +00:00
|
|
|
sha256 = "0z2xad4wsv962rc1rspghfcfkz4nj2j5l5cm7xyn6qmsag0m8y2x";
|
2017-05-20 17:21:25 +00:00
|
|
|
rev = "v${version}";
|
2017-04-22 00:21:31 +00:00
|
|
|
};
|
|
|
|
|
2019-01-04 22:30:13 +00:00
|
|
|
# To compute a new go2nix deps.go file,
|
|
|
|
# change to the gcp-connector-util directory and create a nix-shell with avahi and
|
|
|
|
# cups in it.
|
|
|
|
|
|
|
|
# manually mirrored from launchpad because cloning failed due insecure http protocol
|
|
|
|
# {
|
|
|
|
# goPackagePath = "launchpad.net/go-xdg/v0";
|
|
|
|
# fetch = {
|
|
|
|
# type = "git";
|
|
|
|
# url = "https://github.com/Mic92/go-xdg";
|
|
|
|
# rev = "b3fc6b3106d78701853b0caf62ebedae42769af2";
|
|
|
|
# sha256 = "0fd68kkxzxjanpgannpys962bxzqdf8c1qvzk687hv504a3dp76f";
|
|
|
|
# };
|
|
|
|
# }
|
2017-04-22 00:21:31 +00:00
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
2017-05-20 17:21:25 +00:00
|
|
|
buildInputs = [ avahi cups ];
|
|
|
|
|
2017-04-22 00:21:31 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-06 22:05:18 +00:00
|
|
|
description = "Share printers from your Windows, Linux, FreeBSD or macOS computer with ChromeOS and Android devices, using the Cloud Print Connector";
|
2017-04-22 00:21:31 +00:00
|
|
|
homepage = https://github.com/google/cloud-print-connector;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ hodapp ];
|
2017-08-06 22:05:18 +00:00
|
|
|
# TODO: Fix broken build on macOS. The GitHub presently lists the
|
2017-04-22 00:21:31 +00:00
|
|
|
# FreeBSD build as broken too, but this may change in the future.
|
|
|
|
platforms = platforms.linux;
|
2017-05-20 17:21:25 +00:00
|
|
|
};
|
2017-04-22 00:21:31 +00:00
|
|
|
}
|