2020-10-04 00:07:59 +00:00
|
|
|
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2020-10-04 00:25:36 +00:00
|
|
|
{ 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
|
|
|
|
2021-03-31 23:33:44 +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
|
2021-03-30 20:59:18 +00:00
|
|
|
depot.third_party.gopkgs."github.com".pomerium.sdk-go
|
2021-03-31 21:19:57 +00:00
|
|
|
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
|
|
|
|
''
|
|
|
|
) ];
|
2021-03-31 23:33:44 +00:00
|
|
|
}).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
|
|
|
|
'';
|
|
|
|
});
|
2020-10-18 19:44:50 +00:00
|
|
|
|
|
|
|
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
|
2021-04-01 00:07:41 +00:00
|
|
|
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 19:44:50 +00:00
|
|
|
];
|
|
|
|
};
|
2020-10-04 00:07:59 +00:00
|
|
|
}
|