Skip to content

Commit

Permalink
Merge pull request NixOS#325703 from eclairevoyant/opensnitch-ui
Browse files Browse the repository at this point in the history
 opensnitch-ui: set updateScript, 1.6.5.1 -> 1.6.6
  • Loading branch information
onny authored Jul 9, 2024
2 parents 449800f + e35d56a commit bf99590
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions pkgs/by-name/op/opensnitch-ui/package.nix
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
{ 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
];

buildInputs = [
qt5.qtwayland
];

propagatedBuildInputs = with python3Packages; [
propagatedBuildInputs = with python311Packages; [
grpcio-tools
notify2
pyasn
Expand All @@ -56,7 +57,7 @@ python3Packages.buildPythonApplication rec {
'';

postInstall = ''
mv $out/${python3Packages.python.sitePackages}/usr/* $out/
mv $out/${python311Packages.python.sitePackages}/usr/* $out/
'';

dontWrapQtApps = true;
Expand All @@ -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";
Expand Down

0 comments on commit bf99590

Please sign in to comment.