Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 77 lines 2.0 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 python3Packages, 5 nix-update-script, 6}: 7 8python3Packages.buildPythonApplication rec { 9 pname = "pyprland"; 10 version = "2.4.6"; 11 format = "pyproject"; 12 13 disabled = python3Packages.pythonOlder "3.10"; 14 15 src = fetchFromGitHub { 16 owner = "hyprland-community"; 17 repo = "pyprland"; 18 tag = version; 19 hash = "sha256-OH+BTPw574FykVYWG6TIOpSPeYB39UxyMy/gzMDw0z4="; 20 }; 21 22 nativeBuildInputs = with python3Packages; [ poetry-core ]; 23 24 propagatedBuildInputs = with python3Packages; [ aiofiles ]; 25 pythonRelaxDeps = [ 26 "aiofiles" 27 ]; 28 29 postInstall = '' 30 # file has shebang but cant be run due to a relative import, has proper entrypoint in /bin 31 chmod -x $out/${python3Packages.python.sitePackages}/pyprland/command.py 32 ''; 33 34 # NOTE: this is required for the imports check below to work properly 35 HYPRLAND_INSTANCE_SIGNATURE = "dummy"; 36 37 pythonImportsCheck = [ 38 "pyprland" 39 "pyprland.adapters" 40 "pyprland.adapters.menus" 41 "pyprland.command" 42 "pyprland.common" 43 "pyprland.ipc" 44 "pyprland.plugins" 45 "pyprland.plugins.experimental" 46 "pyprland.plugins.expose" 47 "pyprland.plugins.fetch_client_menu" 48 "pyprland.plugins.interface" 49 "pyprland.plugins.layout_center" 50 "pyprland.plugins.lost_windows" 51 "pyprland.plugins.magnify" 52 "pyprland.plugins.monitors" 53 "pyprland.plugins.monitors_v0" 54 "pyprland.plugins.pyprland" 55 "pyprland.plugins.scratchpads" 56 "pyprland.plugins.shift_monitors" 57 "pyprland.plugins.shortcuts_menu" 58 "pyprland.plugins.system_notifier" 59 "pyprland.plugins.toggle_dpms" 60 "pyprland.plugins.toggle_special" 61 "pyprland.plugins.workspaces_follow_focus" 62 ]; 63 64 passthru.updateScript = nix-update-script { }; 65 66 meta = { 67 mainProgram = "pypr"; 68 description = "Hyperland plugin system"; 69 homepage = "https://github.com/hyprland-community/pyprland"; 70 license = lib.licenses.mit; 71 maintainers = with lib.maintainers; [ 72 iliayar 73 johnrtitor 74 ]; 75 platforms = lib.platforms.linux; 76 }; 77}