nixpkgs/pkgs/by-name/ce/celeste/librclone-path.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

32 lines
1.2 KiB
Diff

diff --git a/librclone-sys/build.rs b/librclone-sys/build.rs
index 10e45bc..7d04c08 100644
--- a/librclone-sys/build.rs
+++ b/librclone-sys/build.rs
@@ -16,15 +16,8 @@ fn main() {
println!("cargo:rerun-if-changed=go.mod");
println!("cargo:rerun-if-changed=go.sum");
- Command::new("go")
- .args(["build", "--buildmode=c-archive", "-o"])
- .arg(&format!("{}/librclone.a", out_dir))
- .arg("github.com/rclone/rclone/librclone")
- .status()
- .expect("`go build` failed. Is `go` installed and latest version?");
-
- println!("cargo:rustc-link-search=native={}", out_dir);
- println!("cargo:rustc-link-lib=static=rclone");
+ println!("cargo:rustc-link-search=native={}", "@librclone@/lib");
+ println!("cargo:rustc-link-lib=dylib=rclone");
if target_triple.ends_with("darwin") {
println!("cargo:rustc-link-lib=framework=CoreFoundation");
@@ -32,7 +25,7 @@ fn main() {
}
let bindings = bindgen::Builder::default()
- .header(format!("{}/librclone.h", out_dir))
+ .header(format!("{}/librclone.h", "@librclone@/include"))
.allowlist_function("RcloneRPC")
.allowlist_function("RcloneInitialize")
.allowlist_function("RcloneFinalize")