This commit is contained in:
parent
3afae91502
commit
5d08d1602a
22
.drone.yml
Normal file
22
.drone.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: "nixos/nix"
|
||||
environment:
|
||||
USER: root
|
||||
commands:
|
||||
- nix --extra-experimental-features 'nix-command flakes' build
|
||||
|
||||
- name: upload
|
||||
image: "curlimages/curl"
|
||||
environment:
|
||||
TOKEN:
|
||||
from_secret: gitea
|
||||
commands:
|
||||
- curl --user garionion:$TOKEN --upload-file ./result/bin/tcp-proxy https://git.entr0py.de/api/packages/garionion/generic/tcp-stream-proxy/${DRONE_TAG}/tcp-proxy
|
||||
when:
|
||||
ref:
|
||||
- refs/tags/*
|
10
default.nix
Normal file
10
default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
with pkgs;
|
||||
mkShell {
|
||||
BuildInputs = [
|
||||
gcc
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
go_1_19
|
||||
];
|
||||
}
|
41
flake.lock
Normal file
41
flake.lock
Normal 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
13
flake.nix
Normal 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
32
package.nix
Normal 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-YFKyN+oV9MrjcvfehsGKgvAPvnHlOBGpSQpVdrOvUog=";
|
||||
|
||||
meta = {
|
||||
description = "A little Proxy which forwards TCP streams";
|
||||
homepage = "https://git.entr0py.de/garionion/tcp-stream-proxy";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue