-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefault.nix
More file actions
25 lines (21 loc) · 751 Bytes
/
Copy pathdefault.nix
File metadata and controls
25 lines (21 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
pkgs ? import <nixpkgs> { },
python3Packages ? pkgs.python3Packages,
qpkgs ? let
src = fetchTarball "https://github.com/Qyriad/nur-packages/archive/main.tar.gz";
in import src { inherit pkgs; },
}: let
inherit (qpkgs) lib;
log2compdb = python3Packages.callPackage ./package.nix { };
overrideCall = scope: scope.callPackage log2compdb.override { };
# nb: the parentheses here are unnecessary but it looks fucking weird.
notDisabled = p: !(p.meta.disabled or false);
byPythonVersion = lib.pipe qpkgs.pythonScopes [
(lib.mapAttrs (lib.const overrideCall))
(lib.filterAttrs (lib.const notDisabled))
];
in log2compdb.overrideAttrs (prev: {
passthru = prev.passthru or { } // {
inherit byPythonVersion;
};
})