nixpkgs/pkgs/by-name/pi/picosnitch/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

47 lines
1.1 KiB
Nix

{ lib
, python3
, fetchPypi
, bcc
}:
python3.pkgs.buildPythonApplication rec {
pname = "picosnitch";
version = "1.0.3";
src = fetchPypi {
inherit pname version;
sha256 = "78285e91b5c4d8e07529a34a7c3fe606acb6f950ee3cc78bb6c346bc2195b68a";
};
propagatedBuildInputs = with python3.pkgs; [
setuptools
bcc
psutil
dbus-python
requests
pandas
plotly
dash
geoip2
];
postInstall = ''
substituteInPlace $out/${python3.sitePackages}/picosnitch.py --replace '/run/picosnitch.pid' '/run/picosnitch/picosnitch.pid'
'';
pythonImportsCheck = [ "picosnitch" ];
meta = with lib; {
description = "Monitor network traffic per executable with hashing";
mainProgram = "picosnitch";
homepage = "https://github.com/elesiuta/picosnitch";
changelog = "https://github.com/elesiuta/picosnitch/releases";
license = licenses.gpl3Plus;
maintainers = [ maintainers.elesiuta ];
platforms = platforms.linux;
knownVulnerabilities = [
"Allows an unprivileged user to write to arbitrary files as root; see https://github.com/elesiuta/picosnitch/issues/40"
];
};
}