This commit is contained in:
parent
3afae91502
commit
dbd5526b5c
4 changed files with 67 additions and 0 deletions
12
.drone.yml
Normal file
12
.drone.yml
Normal 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
10
default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
with pkgs;
|
||||
mkShell {
|
||||
BuildInputs = [
|
||||
gcc
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
go_1_19
|
||||
];
|
||||
}
|
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-RXX9t2DOOWvtaxX2bE3E/ioRb/07nLpSue6TsLDHATQ=";
|
||||
|
||||
meta = {
|
||||
description = "A little Proxy which forwards TCP streams";
|
||||
homepage = "https://git.entr0py.de/garionion/tcp-stream-proxy";
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue