Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 fetchpatch, 6}: 7 8buildGoModule rec { 9 pname = "drive"; 10 version = "0.4.0"; 11 12 src = fetchFromGitHub { 13 owner = "odeke-em"; 14 repo = "drive"; 15 rev = "v${version}"; 16 hash = "sha256-mNOeOB0Tn5eqULFJZuE18PvLoHtnspv4AElmgEQKXcU="; 17 }; 18 19 vendorHash = "sha256-F/ikdr7UCVlNv2yiEemyB7eIkYi3mX+rJvSfX488RFc="; 20 21 patches = [ 22 # Add Go Modules support 23 (fetchpatch { 24 url = "https://github.com/odeke-em/drive/commit/0fb4bb2cf83a7293d9a33b00f8fc07e1c8dd8b7c.patch"; 25 hash = "sha256-4PxsgfufhTfmy/7N5QahIhmRa0rb2eUDXJ66pYb6jFg="; 26 }) 27 ]; 28 29 subPackages = [ "cmd/drive" ]; 30 31 ldflags = [ 32 "-s" 33 "-w" 34 ]; 35 36 meta = with lib; { 37 homepage = "https://github.com/odeke-em/drive"; 38 description = "Google Drive client for the commandline"; 39 license = licenses.asl20; 40 maintainers = [ ]; 41 mainProgram = "drive"; 42 }; 43}