-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
python3Packages.adblock: init at 0.4.0 #108271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add support for the updateScript
? This makes it easy to upgrade it in future.
I believe:
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
Should do the trick.
Most packages to not have this because it can be easily done with nix-update. updateScript's are usually needed for packages which are non trivial to update. |
Okay. However, I couldn't get it to work with the maintainer script without it being set. Am I missing something? |
I don' think that works with nix-update. I still don't think we should add the update passthru like this for every page. |
@ofborg eval |
Darwin patch diff --git a/pkgs/development/python-modules/adblock/default.nix b/pkgs/development/python-modules/adblock/default.nix
index 0414ea10cba..de6d72a61ec 100644
--- a/pkgs/development/python-modules/adblock/default.nix
+++ b/pkgs/development/python-modules/adblock/default.nix
@@ -1,4 +1,6 @@
-{ rustPlatform
+{ stdenv
+, lib
+, rustPlatform
, fetchFromGitHub
, pipInstallHook
, pythonImportsCheckHook
@@ -7,7 +9,8 @@
, openssl
, publicsuffix-list
, isPy27
-, lib
+, CoreFoundation
+, Security
}:
rustPlatform.buildRustPackage rec {
@@ -22,12 +25,15 @@ rustPlatform.buildRustPackage rec {
rev = version;
sha256 = "10d6ks2fyzbizq3kb69q478idj0h86k6ygjb6wl3zq3mf65ma4zg";
};
+ format = "pyproject";
cargoSha256 = "0di05j942rrm2crpdpp9czhh65fmidyrvdp2n3pipgnagy7nchc0";
- format = "pyproject";
nativeBuildInputs = [ pipInstallHook maturin pkg-config pythonImportsCheckHook ];
- buildInputs = [ openssl ];
+
+ buildInputs = [ openssl ]
+ ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ];
+
PSL_PATH = "${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat";
buildPhase = ''
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index ea7e7853a72..105cb721a88 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -167,7 +167,9 @@ in {
adb-shell = callPackage ../development/python-modules/adb-shell { };
- adblock = callPackage ../development/python-modules/adblock { };
+ adblock = callPackage ../development/python-modules/adblock {
+ inherit (pkgs.darwin.apple_sdk.frameworks) CoreFoundation Security;
+ };
addic7ed-cli = callPackage ../development/python-modules/addic7ed-cli { };
|
This packages python bindings to Brave's Rust adblock library. These will be used in the upcoming qutebrowser version 2.0.0 for more granular adblocking.
Applied |
Result of 3 packages built:
|
This packages python bindings to Brave's Rust adblock library. These
will be used in the upcoming qutebrowser version 2.0.0 for more granular
adblocking.
The functionality can be tested with qutebrowser 2.0.0-pre from #108272
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)