mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
80 lines
1.4 KiB
Nix
80 lines
1.4 KiB
Nix
{ fetchFromGitHub
|
|
, lib, stdenv
|
|
, gobject-introspection
|
|
, meson
|
|
, ninja
|
|
, python3
|
|
, gtk3
|
|
, gdk-pixbuf
|
|
, wrapGAppsHook
|
|
, gettext
|
|
, polkit
|
|
, glib
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "warpinator";
|
|
version = "1.0.8";
|
|
|
|
format = "other";
|
|
doCheck = false;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "linuxmint";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "0n1b50j2w76qnhfj5yg5q2j7fgxr9gbmzpazmbml4q41h8ybcmxm";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
gobject-introspection
|
|
wrapGAppsHook
|
|
gettext
|
|
polkit # for its gettext
|
|
];
|
|
|
|
buildInputs = [
|
|
glib
|
|
gtk3
|
|
gdk-pixbuf
|
|
];
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
grpcio-tools
|
|
protobuf
|
|
pygobject3
|
|
setproctitle
|
|
xapp
|
|
zeroconf
|
|
grpcio
|
|
setuptools
|
|
cryptography
|
|
pynacl
|
|
netifaces
|
|
];
|
|
|
|
postPatch = ''
|
|
chmod +x install-scripts/*
|
|
patchShebangs .
|
|
|
|
find . -type f -exec sed -i \
|
|
-e s,/usr/libexec/warpinator,$out/libexec/warpinator,g \
|
|
{} +
|
|
'';
|
|
|
|
preFixup = ''
|
|
# these get loaded via import from bin, so don't need wrapping
|
|
chmod -x+X $out/libexec/warpinator/*.py
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/linuxmint/warpinator";
|
|
description = "Share files across the LAN";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.mkg20001 ];
|
|
};
|
|
}
|