Merge pull request #325703 from eclairevoyant/opensnitch-ui

opensnitch-ui: set updateScript, 1.6.5.1 -> 1.6.6
This commit is contained in:
Jonas Heinrich 2024-07-09 10:02:38 +02:00 committed by GitHub
commit bf99590fba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,27 +1,28 @@
{ python3Packages
{ python311Packages
, fetchFromGitHub
, nix-update-script
, qt5
, lib
}:
python3Packages.buildPythonApplication rec {
python311Packages.buildPythonApplication rec {
pname = "opensnitch-ui";
version = "1.6.5.1";
version = "1.6.6";
src = fetchFromGitHub {
owner = "evilsocket";
repo = "opensnitch";
rev = "refs/tags/v${version}";
hash = "sha256-IVrAAHzLS7A7cYhRk+IUx8/5TGKeqC7M/7iXOpPe2ZA=";
hash = "sha256-pJPpkXRp7cby6Mvc7IzxH9u6MY4PcrRPkimTw3je6iI=";
};
postPatch = ''
substituteInPlace ui/opensnitch/utils/__init__.py \
--replace /usr/lib/python3/dist-packages/data ${python3Packages.pyasn}/${python3Packages.python.sitePackages}/pyasn/data
--replace /usr/lib/python3/dist-packages/data ${python311Packages.pyasn}/${python311Packages.python.sitePackages}/pyasn/data
'';
nativeBuildInputs = [
python3Packages.pyqt5
python311Packages.pyqt5
qt5.wrapQtAppsHook
];
@ -29,7 +30,7 @@ python3Packages.buildPythonApplication rec {
qt5.qtwayland
];
propagatedBuildInputs = with python3Packages; [
propagatedBuildInputs = with python311Packages; [
grpcio-tools
notify2
pyasn
@ -56,7 +57,7 @@ python3Packages.buildPythonApplication rec {
'';
postInstall = ''
mv $out/${python3Packages.python.sitePackages}/usr/* $out/
mv $out/${python311Packages.python.sitePackages}/usr/* $out/
'';
dontWrapQtApps = true;
@ -65,6 +66,8 @@ python3Packages.buildPythonApplication rec {
# All tests are sandbox-incompatible and disabled for now
doCheck = false;
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Application firewall";
mainProgram = "opensnitch-ui";