go/twitterchiver: init
This commit is contained in:
parent
ededad92d0
commit
dd3c58548d
9 changed files with 43 additions and 2 deletions
|
@ -9,6 +9,11 @@ let
|
|||
prefixAttrs = prefix: lib.mapAttrsToList (name: value: { name = "${prefix}-${name}"; path = value; });
|
||||
ciMachines = prefixAttrs "machine" depot.ops.nixos;
|
||||
ciPackages = prefixAttrs "pkg" depot.nix.pkgs;
|
||||
in
|
||||
pkgs.linkFarm "ci" (ciMachines ++ ciPackages)
|
||||
|
||||
ciOther = prefixAttrs "other" {
|
||||
twitterchiver = depot.go.twitterchiver;
|
||||
twitterchiverDocker = depot.go.twitterchiver.dockerImage;
|
||||
};
|
||||
in
|
||||
pkgs.linkFarm "ci" (ciMachines ++ ciPackages ++ ciOther)
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ in fix (self:
|
|||
ops = import ./ops ch;
|
||||
nix = import ./nix ch;
|
||||
web = import ./web ch;
|
||||
go = import ./go ch;
|
||||
|
||||
lib = self.third_party.nixpkgs.lib;
|
||||
|
||||
|
|
7
go/default.nix
Normal file
7
go/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
args: {
|
||||
twitterchiver = import ./twitterchiver args;
|
||||
}
|
|
@ -1,3 +1,6 @@
|
|||
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FROM golang:1.13-buster as build
|
||||
|
||||
RUN mkdir /go/src/app
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
-- SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
||||
--
|
||||
-- SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CREATE TABLE tweets (
|
||||
id BIGINT NOT NULL,
|
||||
text TEXT NOT NULL,
|
||||
|
|
12
go/twitterchiver/default.nix
Normal file
12
go/twitterchiver/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
{ depot, ... }: depot.third_party.buildGo.program {
|
||||
name = "twitterchiver";
|
||||
srcs = [ ./archiver/archiver.go ];
|
||||
deps = [
|
||||
depot.third_party.gopkgs."github.com".dghubble.oauth1
|
||||
depot.third_party.gopkgs."github.com".jackc.pgx.v4
|
||||
];
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
module github.com/lukegb/twitterchiver
|
||||
|
||||
go 1.14
|
||||
|
|
2
go/twitterchiver/go.sum.license
Normal file
2
go/twitterchiver/go.sum.license
Normal file
|
@ -0,0 +1,2 @@
|
|||
SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
||||
SPDX-License-Identifier: Apache-2.0
|
Loading…
Reference in a new issue