about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/drive/default.nix
blob: 4c7b5727fbac94e3034a164df122b9d2352f364f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:

buildGoModule rec {
  pname = "drive";
  version = "0.4.0";

  src = fetchFromGitHub {
    owner = "odeke-em";
    repo = "drive";
    rev = "v${version}";
    hash = "sha256-mNOeOB0Tn5eqULFJZuE18PvLoHtnspv4AElmgEQKXcU=";
  };

  vendorHash = "sha256-F/ikdr7UCVlNv2yiEemyB7eIkYi3mX+rJvSfX488RFc=";

  patches = [
    # Add Go Modules support
    (fetchpatch {
      url = "https://github.com/odeke-em/drive/commit/0fb4bb2cf83a7293d9a33b00f8fc07e1c8dd8b7c.patch";
      hash = "sha256-4PxsgfufhTfmy/7N5QahIhmRa0rb2eUDXJ66pYb6jFg=";
    })
  ];

  subPackages = [ "cmd/drive" ];

  ldflags = [ "-s" "-w" ];

  meta = with lib; {
    homepage = "https://github.com/odeke-em/drive";
    description = "Google Drive client for the commandline";
    license = licenses.asl20;
    maintainers = with maintainers; [ ];
  };
}