
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
36 lines
881 B
Nix
36 lines
881 B
Nix
{ 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 = [ ];
|
|
mainProgram = "drive";
|
|
};
|
|
}
|