init: flake env and go mod
This commit is contained in:
25
flake.nix
Normal file
25
flake.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user