Add nix package expression

This commit is contained in:
Simon Bruder 2021-01-05 12:30:16 +01:00
parent 658690b152
commit dec28b98f6
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 24 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/vendor/ /vendor/
/bangs.go /bangs.go
/result*

23
default.nix Normal file
View file

@ -0,0 +1,23 @@
{ pkgs ? import <nixpkgs> { } }:
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?)
}