feat: add drone file
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
Garionion 2023-01-28 20:30:10 +01:00
parent 3afae91502
commit dbd5526b5c
Signed by: garionion
SSH key fingerprint: SHA256:6uQQGh4dHIdYnrR+qeLdgx5SDmbttGp2HusA73563QA
4 changed files with 67 additions and 0 deletions

12
.drone.yml Normal file
View file

@ -0,0 +1,12 @@
kind: pipeline
type: docker
name: default
steps:
- name: build
image: "nixos/nix"
environment:
USER: root
commands:
- nix-channel --update
- nix build

10
default.nix Normal file
View file

@ -0,0 +1,10 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell {
BuildInputs = [
gcc
];
nativeBuildInputs = [
go_1_19
];
}

13
flake.nix Normal file
View file

@ -0,0 +1,13 @@
{
description = "tcp-stream-proxy";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = nixpkgs.legacyPackages.${system}; in
{
devShell = import ./default.nix { inherit pkgs; };
defaultPackage = import ./package.nix { inherit pkgs;};
}
);
}

32
package.nix Normal file
View file

@ -0,0 +1,32 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
let
version = "0.0.1";
deps = [ ];
nativeDeps = [ ];
in
pkgs.buildGo119Module {
pname = "tcp-stream-proxy";
inherit version;
src = ./.;
buildInputs = [
stdenv glibc.static
] ++deps;
nativeBuildInputs = [
] ++nativeDeps;
tags = [ ];
ldflags = [
"-s" "-w"
"-linkmode external"
"-extldflags -static"
];
allowGoReference = false;
vendorSha256 = lib.fakeSha256;
#vendorSha256 = "sha256-RXX9t2DOOWvtaxX2bE3E/ioRb/07nLpSue6TsLDHATQ=";
meta = {
description = "A little Proxy which forwards TCP streams";
homepage = "https://git.entr0py.de/garionion/tcp-stream-proxy";
};
}