init: flake env and go mod

This commit is contained in:
efim
2023-10-27 05:53:49 +00:00
commit d5ee805458
6 changed files with 97 additions and 0 deletions

25
flake.nix Normal file
View File

@@ -0,0 +1,25 @@
{
description = "Automoderation web app";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
pname = "some-automoderation";
version = "0.0.1";
in {
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.go
pkgs.semgrep
pkgs.gopls
];
shellHook = ''
export GOPATH=$PWD/.go
export PATH=$GOPATH/bin:$PATH
'';
};
}
);
}