Initial Commit
This commit is contained in:
30
flake.nix
Normal file
30
flake.nix
Normal 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;
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user