Initial Commit

This commit is contained in:
bluepython508
2023-11-28 22:02:17 +00:00
commit 170fff4851
10 changed files with 748 additions and 0 deletions

30
flake.nix Normal file
View File

@@ -0,0 +1,30 @@
{
description = "tsnet-proxy: proxy onto tsnet";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
gomod2nix.url = "github:nix-community/gomod2nix";
gomod2nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, gomod2nix, systems }: let
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f rec {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
goModPkgs = gomod2nix.legacyPackages.${system};
inherit (pkgs) callPackage;
});
in {
packages = eachSystem ({ goModPkgs, callPackage, ...}: {
default = callPackage ./. {
inherit (goModPkgs) buildGoApplication;
};
});
devShells = eachSystem ({goModPkgs, callPackage, ...}: {
default = callPackage ./shell.nix {
inherit (goModPkgs) mkGoEnv gomod2nix;
};
});
};
}