Skip to content

Instantly share code, notes, and snippets.

@bobby285271
Created February 19, 2023 12:06
Show Gist options
  • Save bobby285271/314205c4bdbb5afe0974b6129b3deeb0 to your computer and use it in GitHub Desktop.
Save bobby285271/314205c4bdbb5afe0974b6129b3deeb0 to your computer and use it in GitHub Desktop.
{ fetchFromGitHub
, lib
, gobject-introspection
, meson
, ninja
, python3
, stdenv
, gtk3
, gdk-pixbuf
, wrapGAppsHook
, gettext
, polkit
, glib
, gitUpdater
}:
let
pythonEnv = python3.withPackages (pp: with pp; [
grpcio-tools
protobuf
pygobject3
setproctitle
pp.xapp
zeroconf
grpcio
setuptools
cryptography
pynacl
netifaces
]);
in
stdenv.mkDerivation rec {
pname = "warpinator";
version = "1.4.5";
src = fetchFromGitHub {
owner = "linuxmint";
repo = pname;
rev = "5d72ef24736de724b539e3443a44110f0d0f3180";
hash = "sha256-TA3Pk1U7AuvcSkw/H3FgUJFT1LXb8OQ3aB9DFjB0Yis=";
};
nativeBuildInputs = [
meson
ninja
gobject-introspection
wrapGAppsHook
gettext
polkit # for its gettext
];
buildInputs = [
glib
gtk3
gdk-pixbuf
pythonEnv
];
mesonFlags = [
"-Dbundle-zeroconf=false"
];
postPatch = ''
chmod +x install-scripts/*
patchShebangs .
find . -type f -exec sed -i \
-e s,/usr/libexec/warpinator,$out/libexec/warpinator,g \
{} +
sed 's|"/bin/python3"|"${pythonEnv.interpreter}"|g' -i bin/warpinator.in
'';
preFixup = ''
# these get loaded via import from bin, so don't need wrapping
chmod -x+X $out/libexec/warpinator/*.py
'';
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;
maintainers = teams.cinnamon.members;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment