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

This commit is contained in:
Garionion 2023-01-28 20:30:10 +01:00
parent 3afae91502
commit 8327d80c70
Signed by: garionion
SSH key fingerprint: SHA256:6uQQGh4dHIdYnrR+qeLdgx5SDmbttGp2HusA73563QA
5 changed files with 108 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 --extra-experimental-features nix-command build

10
default.nix Normal file
View file

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

41
flake.lock generated Normal file
View file

@ -0,0 +1,41 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1674899129,
"narHash": "sha256-6LGae8WbdCN4S9+o2wfYDJPpfxC2EnXEvoopVkguNtc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6b9c27b4c9c1c329b27a44ed1fa8935df79f9a8b",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

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";
};
}