2023-04-29 16:46:19 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, lib
|
2020-09-25 04:45:31 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, python3
|
|
|
|
, gtk3
|
|
|
|
, gdk-pixbuf
|
2023-04-29 16:46:19 +00:00
|
|
|
, xapp
|
2020-09-25 04:45:31 +00:00
|
|
|
, wrapGAppsHook
|
|
|
|
, gettext
|
|
|
|
, polkit
|
|
|
|
, glib
|
2022-09-11 15:47:08 +00:00
|
|
|
, gitUpdater
|
2023-04-29 16:46:19 +00:00
|
|
|
, bubblewrap
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
let
|
|
|
|
pythonEnv = python3.withPackages (pp: with pp; [
|
|
|
|
grpcio-tools
|
|
|
|
protobuf
|
|
|
|
pygobject3
|
|
|
|
setproctitle
|
|
|
|
pp.xapp
|
|
|
|
zeroconf
|
|
|
|
grpcio
|
|
|
|
setuptools
|
|
|
|
cryptography
|
|
|
|
pynacl
|
|
|
|
netifaces
|
2024-01-02 11:29:13 +00:00
|
|
|
netaddr
|
|
|
|
ifaddr
|
|
|
|
qrcode
|
2023-04-29 16:46:19 +00:00
|
|
|
]);
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2020-09-25 04:45:31 +00:00
|
|
|
pname = "warpinator";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.8.2";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxmint";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-wBln4YqjZ8aI3D4Arwa7UgDKxNPSlC5fRZtjanTHl4Q=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
gettext
|
|
|
|
polkit # for its gettext
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
gdk-pixbuf
|
2023-04-29 16:46:19 +00:00
|
|
|
pythonEnv
|
2020-09-25 04:45:31 +00:00
|
|
|
xapp
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
mesonFlags = [
|
2024-01-02 11:29:13 +00:00
|
|
|
"-Dbundle-grpc=false"
|
2021-12-06 16:07:01 +00:00
|
|
|
"-Dbundle-zeroconf=false"
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
chmod +x install-scripts/*
|
|
|
|
patchShebangs .
|
|
|
|
|
|
|
|
find . -type f -exec sed -i \
|
|
|
|
-e s,/usr/libexec/warpinator,$out/libexec/warpinator,g \
|
|
|
|
{} +
|
2022-12-02 08:20:57 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
# We make bubblewrap mode always available since
|
|
|
|
# landlock mode is not supported in old kernels.
|
|
|
|
substituteInPlace src/warpinator-launch.py \
|
|
|
|
--replace '"/bin/python3"' '"${pythonEnv.interpreter}"' \
|
|
|
|
--replace "/bin/bwrap" "${bubblewrap}/bin/bwrap" \
|
|
|
|
--replace 'GLib.find_program_in_path("bwrap")' "True"
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
ignoredVersions = "^master.*";
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://github.com/linuxmint/warpinator";
|
|
|
|
description = "Share files across the LAN";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = teams.cinnamon.members;
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|