From 5275d7a226498cd3ec6d6d02fa00b605e8695e85 Mon Sep 17 00:00:00 2001 From: Asmir A Date: Sat, 28 Oct 2023 23:45:13 +0200 Subject: [PATCH] packages: add zapzap flake --- packages/zapzap/.nixd.json | 1 + packages/zapzap/flake.lock | 27 +++++++++++++++++++++++++++ packages/zapzap/flake.nix | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 120000 packages/zapzap/.nixd.json create mode 100644 packages/zapzap/flake.lock create mode 100644 packages/zapzap/flake.nix diff --git a/packages/zapzap/.nixd.json b/packages/zapzap/.nixd.json new file mode 120000 index 0000000..0a1dd46 --- /dev/null +++ b/packages/zapzap/.nixd.json @@ -0,0 +1 @@ +../../.nixd.json \ No newline at end of file diff --git a/packages/zapzap/flake.lock b/packages/zapzap/flake.lock new file mode 100644 index 0000000..721b11a --- /dev/null +++ b/packages/zapzap/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1698336494, + "narHash": "sha256-sO72WDBKyijYD1GcKPlGsycKbMBiTJMBCnmOxLAs880=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "808c0d8c53c7ae50f82aca8e7df263225cf235bf", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/packages/zapzap/flake.nix b/packages/zapzap/flake.nix new file mode 100644 index 0000000..01016bc --- /dev/null +++ b/packages/zapzap/flake.nix @@ -0,0 +1,38 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + outputs = inputs @ { + self, + nixpkgs, + }: let + supportedSystems = ["x86_64-linux" "aarch64-linux"]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system}); + in { + packages = forAllSystems (system: rec { + zapzap = pkgs.${system}.python3Packages.buildPythonPackage { + name = "zapzap"; + src = pkgs.${system}.fetchFromGitHub { + owner = "zapzap-linux"; + repo = "zapzap"; + rev = "5de4a4015128c164af3c964ecbe5b6358d98b521"; + hash = "sha256-bd3YcITK4lraOu7D/xZfnibilAZQZWqazVVtUwqJ4wc="; + }; + dontWrapQtApps = true; + propagatedBuildInputs = with pkgs.${system}.python3Packages; [pyqt6-webengine qt6.qtwayland qt6.qtsvg]; + nativeBuildInputs = with pkgs.${system}; [qt6.wrapQtAppsHook makeWrapper]; + env = { + HOME = "/tmp"; + }; + preFixup = '' + makeWrapperArgs+=( + # Force the app to use QT_PLUGIN_PATH values from wrapper + --unset QT_PLUGIN_PATH + "''${qtWrapperArgs[@]}" + ) + ''; + }; + default = zapzap; + }); + }; +}