Files
nixpkgs/pkgs/by-name/wa/warpinator/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

104 lines
1.9 KiB
Nix

{
stdenv,
fetchFromGitHub,
lib,
gobject-introspection,
meson,
ninja,
python3,
gtk3,
gdk-pixbuf,
xapp,
wrapGAppsHook3,
gettext,
polkit,
glib,
gitUpdater,
bubblewrap,
}:
let
pythonEnv = python3.withPackages (
pp:
with pp;
[
grpcio-tools
protobuf
pygobject3
setproctitle
python-xapp
zeroconf
grpcio
setuptools
cryptography
pynacl
netifaces
netaddr
ifaddr
qrcode
]
++ qrcode.optional-dependencies.pil
);
in
stdenv.mkDerivation rec {
pname = "warpinator";
version = "1.8.10";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "warpinator";
rev = version;
hash = "sha256-OSZYjCnFIHmWCwVcWP1MLmezt5HL4Njf0WMyCRmPP58=";
};
nativeBuildInputs = [
meson
ninja
gobject-introspection
wrapGAppsHook3
gettext
polkit # for its gettext
];
buildInputs = [
glib
gtk3
gdk-pixbuf
pythonEnv
xapp
];
mesonFlags = [
"-Dbundle-grpc=false"
"-Dbundle-zeroconf=false"
];
postPatch = ''
chmod +x install-scripts/*
patchShebangs .
find . -type f -exec sed -i \
-e s,/usr/libexec/warpinator,$out/libexec/warpinator,g \
{} +
# We make bubblewrap mode always available since
# landlock mode is not supported in old kernels.
substituteInPlace src/warpinator-launch.py \
--replace-fail '"/usr/bin/python3"' '"${pythonEnv.interpreter}"' \
--replace-fail "/usr/bin/bwrap" "${bubblewrap}/bin/bwrap" \
--replace-fail 'GLib.find_program_in_path("bwrap")' "True"
'';
passthru.updateScript = gitUpdater {
ignoredVersions = "^master.*";
};
meta = with lib; {
homepage = "https://github.com/linuxmint/warpinator";
description = "Share files across the LAN";
license = licenses.gpl3Plus;
platforms = platforms.linux;
teams = [ teams.cinnamon ];
};
}