mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
d31e7c5282
Diff: https://github.com/rclone/rclone/compare/v1.63.0...v1.63.1 Changelog: https://github.com/rclone/rclone/blob/v1.63.1/docs/content/changelog.md
36 lines
791 B
Nix
36 lines
791 B
Nix
{ lib
|
|
, stdenv
|
|
, buildGoModule
|
|
, rclone
|
|
}:
|
|
|
|
let
|
|
ext = stdenv.hostPlatform.extensions.sharedLibrary;
|
|
in buildGoModule rec {
|
|
pname = "librclone";
|
|
inherit (rclone) version src vendorHash;
|
|
|
|
patches = rclone.patches or [ ];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
cd librclone
|
|
go build --buildmode=c-shared -o librclone${ext} github.com/rclone/rclone/librclone
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dt $out/lib librclone${ext}
|
|
install -Dt $out/include librclone.h
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Rclone as a C library";
|
|
homepage = "https://github.com/rclone/rclone/tree/master/librclone";
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
inherit (rclone.meta) license platforms;
|
|
};
|
|
}
|