mirror of
https://github.com/tuxdotrs/trok.git
synced 2025-07-06 03:56:33 +05:30
feat: setup flake
This commit is contained in:
17
default.nix
Normal file
17
default.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildGoModule,
|
||||||
|
}:
|
||||||
|
buildGoModule {
|
||||||
|
pname = "trok";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
vendorHash = "sha256-P7UBLLMMOwCeiM7aAY6A8cyXqxwn7mDTNS2kJTALHPU=";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
maintainers = with lib.maintainers; [tuxdotrs];
|
||||||
|
mainProgram = "trok";
|
||||||
|
};
|
||||||
|
}
|
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1740547748,
|
||||||
|
"narHash": "sha256-Ly2fBL1LscV+KyCqPRufUBuiw+zmWrlJzpWOWbahplg=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "3a05eebede89661660945da1f151959900903b6a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
27
flake.nix
Normal file
27
flake.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
description = "Simple tunneler in Go that exposes local ports to the internet";
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
}: let
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
|
||||||
|
forAllSystems = function: nixpkgs.lib.genAttrs systems (system: function nixpkgs.legacyPackages.${system});
|
||||||
|
in {
|
||||||
|
packages = forAllSystems (pkgs: rec {
|
||||||
|
default = trok;
|
||||||
|
trok = pkgs.callPackage ./default.nix {};
|
||||||
|
});
|
||||||
|
|
||||||
|
devShells = forAllSystems (pkgs: {
|
||||||
|
default = pkgs.callPackage ./shell.nix {};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
1
result
Symbolic link
1
result
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/nix/store/gn03pkmsyjvqxb44vmb0m2anjlvgvp1c-trok-0.1.0
|
Reference in New Issue
Block a user