0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

rquickshare: clean up dependencies, don't use applyPatches (#407775)

This commit is contained in:
Aleksana 2025-05-23 20:28:07 +08:00 committed by GitHub
commit ead6646f4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,7 +3,6 @@
cargo-tauri,
cargo-tauri_1,
fetchFromGitHub,
applyPatches,
glib-networking,
libayatana-appindicator,
libsoup_2_4,
@ -11,7 +10,6 @@
nix-update,
nodejs,
openssl,
perl,
pkg-config,
pnpm_9,
protobuf,
@ -42,16 +40,15 @@ rustPlatform.buildRustPackage rec {
pname = "rquickshare" + (app-type-either "" "-legacy");
version = "0.11.5";
src = applyPatches {
src = fetchFromGitHub {
owner = "Martichou";
repo = "rquickshare";
tag = "v${version}";
hash = "sha256-DZdzk0wqKhVa51PgQf8UsAY6EbGKvRIGru71Z8rvrwA=";
};
patches = [ ./fix-pnpm-outdated-lockfile.patch ];
src = fetchFromGitHub {
owner = "Martichou";
repo = "rquickshare";
tag = "v${version}";
hash = "sha256-DZdzk0wqKhVa51PgQf8UsAY6EbGKvRIGru71Z8rvrwA=";
};
patches = [ ./fix-pnpm-outdated-lockfile.patch ];
# from https://github.com/NixOS/nixpkgs/blob/04e40bca2a68d7ca85f1c47f00598abb062a8b12/pkgs/by-name/ca/cargo-tauri/test-app.nix#L23-L26
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
@ -60,9 +57,13 @@ rustPlatform.buildRustPackage rec {
pnpmRoot = "app/${app-type}";
pnpmDeps = pnpm_9.fetchDeps {
inherit pname version src;
sourceRoot = "${src.name}/app/${app-type}";
inherit
pname
version
src
patches
;
postPatch = "cd ${pnpmRoot}";
hash = app-type-either "sha256-V46V/VPwCKEe3sAp8zK0UUU5YigqgYh1GIOorqIAiNE=" "sha256-8QRigYNtxirXidFFnTzA6rP0+L64M/iakPqe2lZKegs=";
};
@ -83,31 +84,30 @@ rustPlatform.buildRustPackage rec {
nodejs
pnpm_9.configHook
# Make sure we can find our libraries
perl
pkg-config
protobuf
]
++ lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
wrapGAppsHook4
];
buildInputs =
[ openssl ]
++ lib.optionals stdenv.hostPlatform.isLinux (
[
glib-networking
libayatana-appindicator
]
++ lib.optionals (app-type == "main") [
webkitgtk_4_1
libsoup_3
]
++ lib.optionals (app-type == "legacy") [
webkitgtk_4_0
libsoup_2_4
]
);
buildInputs = lib.optionals stdenv.hostPlatform.isLinux (
[
glib-networking
libayatana-appindicator
openssl
]
++ lib.optionals (app-type == "main") [
libsoup_3
webkitgtk_4_1
]
++ lib.optionals (app-type == "legacy") [
libsoup_2_4
webkitgtk_4_0
]
);
env.OPENSSL_NO_VENDOR = 1;
passthru =
# Don't set an update script for the legacy version