diff --git a/.gitignore b/.gitignore index 66143f9..0512bd3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /vendor/ /bangs.go +/result* diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..49154fc --- /dev/null +++ b/default.nix @@ -0,0 +1,23 @@ +{ pkgs ? import { } }: +let + gitignoreSrc = pkgs.fetchFromGitHub { + owner = "hercules-ci"; + repo = "gitignore"; + rev = "c4662e662462e7bf3c2a968483478a665d00e717"; + sha256 = "1npnx0h6bd0d7ql93ka7azhj40zgjp815fw2r6smg8ch9p7mzdlx"; + }; + inherit (import gitignoreSrc { inherit (pkgs) lib; }) gitignoreSource; +in +pkgs.buildGoModule { + name = "bang-evaluator"; + + src = gitignoreSource ./.; # FIXME: reproducibility + + subPackages = [ "." ]; + + vendorSha256 = "11r1l5lcdfm3wymrkbddl5khpjmr30jln31l40mfyyy9msnqayf3"; + + preBuild = ''go generate ./...''; + + doCheck = false; # no tests (yet?) +}