Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildGoModule 3, fetchFromGitHub 4}: 5 6buildGoModule rec { 7 pname = "litefs"; 8 version = "0.4.0"; 9 10 src = fetchFromGitHub { 11 owner = "superfly"; 12 repo = pname; 13 rev = "v${version}"; 14 sha256 = "sha256-CmWtQzoY/xY/LZL2swhYtDzPvpVOvKlhUH3plDEHrGI="; 15 }; 16 17 vendorHash = "sha256-1I18ITgFPpUv0mPrt1biJmQV9qd9HB23zJmnDp5WzkA="; 18 19 subPackages = [ "cmd/litefs" ]; 20 21 # following https://github.com/superfly/litefs/blob/main/Dockerfile 22 ldflags = [ 23 "-s" 24 "-w" 25 "-X main.Version=${version}" 26 "-extldflags=-static" 27 ]; 28 29 tags = [ 30 "osusergo" 31 "netgo" 32 "sqlite_omit_load_extension" 33 ]; 34 35 doCheck = false; # fails 36 37 meta = with lib; { 38 description = "FUSE-based file system for replicating SQLite databases across a cluster of machines"; 39 homepage = "https://github.com/superfly/litefs"; 40 license = licenses.asl20; 41 maintainers = with maintainers; [ dit7ya ]; 42 }; 43}