depot/go/twitterchiver/default.nix

56 lines
2.1 KiB
Nix
Raw Normal View History

2020-10-04 00:07:59 +00:00
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
{ depot, ... }: {
archiver = depot.third_party.buildGo.program {
name = "archiver";
srcs = [ ./archiver/archiver.go ];
deps = [
depot.third_party.gopkgs."github.com".dghubble.oauth1
depot.third_party.gopkgs."github.com".jackc.pgx.v4
];
};
2020-10-18 00:02:46 +00:00
viewer = (depot.third_party.buildGo.program {
2020-10-18 00:02:46 +00:00
name = "viewer";
srcs = [ ./viewer/viewer.go ];
deps = [
depot.third_party.gopkgs."github.com".google.safehtml
depot.third_party.gopkgs."github.com".google.safehtml.template
depot.third_party.gopkgs."github.com".google.safehtml.uncheckedconversions
depot.third_party.gopkgs."github.com".gorilla.mux
depot.third_party.gopkgs."github.com".jackc.pgtype
depot.third_party.gopkgs."github.com".jackc.pgx.v4.pgxpool
depot.third_party.gopkgs."github.com".pomerium.sdk-go
depot.third_party.gopkgs."gocloud.dev".blob
depot.third_party.gopkgs."gocloud.dev".blob.s3blob
depot.third_party.gopkgs."gocloud.dev".gcerrors
2020-10-18 00:02:46 +00:00
];
dockerData = [ (
depot.pkgs.runCommand "source" {} ''
cp -R ${builtins.filterSource (path: type: (type == "directory" && depot.lib.hasSuffix "/templates" path) || (depot.lib.hasInfix "/templates/" path)) ./viewer} $out
''
) ];
}).overrideAttrs (oldAttrs: {
buildCommand = ''
${oldAttrs.buildCommand}
mkdir $out/share
cp -R ${builtins.filterSource (path: type: (type == "directory" && depot.lib.hasSuffix "/templates" path) || (depot.lib.hasInfix "/templates/" path)) ./viewer}/* $out/share
'';
});
relatedfetcher = depot.third_party.buildGo.program {
name = "relatedfetcher";
srcs = [ ./related_fetcher/fetcher.go ];
deps = [
depot.third_party.gopkgs."github.com".dghubble.oauth1
depot.third_party.gopkgs."github.com".jackc.pgtype
depot.third_party.gopkgs."github.com".jackc.pgx.v4.pgxpool
depot.third_party.gopkgs."gocloud.dev".blob
depot.third_party.gopkgs."gocloud.dev".blob.s3blob
depot.third_party.gopkgs."gocloud.dev".gcerrors
];
};
2020-10-04 00:07:59 +00:00
}