about summary refs log tree commit diff
path: root/pkgs/desktops/plasma-5/3rdparty
diff options
context:
space:
mode:
authorPasquale <p3dimaria@hotmail.it>2021-11-09 15:01:27 +0100
committerPasquale <p3dimaria@hotmail.it>2021-11-10 14:07:17 +0100
commited256b9c89cd625d35f75a183414a8865b335449 (patch)
treed17906ca8f11990fb4a4c68f1b85e83f593a9ff1 /pkgs/desktops/plasma-5/3rdparty
parent8605fbd737e526c40ff8f01219db42b5d0076e23 (diff)
bismuth:init at 2.1.0
Diffstat (limited to 'pkgs/desktops/plasma-5/3rdparty')
-rw-r--r--pkgs/desktops/plasma-5/3rdparty/addons/bismuth/0001-Avoid-usage-of-npx.patch37
-rw-r--r--pkgs/desktops/plasma-5/3rdparty/addons/bismuth/default.nix48
2 files changed, 85 insertions, 0 deletions
diff --git a/pkgs/desktops/plasma-5/3rdparty/addons/bismuth/0001-Avoid-usage-of-npx.patch b/pkgs/desktops/plasma-5/3rdparty/addons/bismuth/0001-Avoid-usage-of-npx.patch
new file mode 100644
index 0000000000000..34e06d77bd293
--- /dev/null
+++ b/pkgs/desktops/plasma-5/3rdparty/addons/bismuth/0001-Avoid-usage-of-npx.patch
@@ -0,0 +1,37 @@
+From c9aaff2461daba31a25ed20c0789ffd7c3561887 Mon Sep 17 00:00:00 2001
+From: Pasquale <p3dimaria@hotmail.it>
+Date: Tue, 9 Nov 2021 23:12:50 +0100
+Subject: [PATCH] Avoid usage of npx
+
+tsc is only used for checking type annotation
+that are stripped by esbuild
+
+---
+ src/kwinscript/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/kwinscript/CMakeLists.txt b/src/kwinscript/CMakeLists.txt
+index 6d85d5d..6f966a4 100644
+--- a/src/kwinscript/CMakeLists.txt
++++ b/src/kwinscript/CMakeLists.txt
+@@ -29,7 +29,7 @@ add_custom_target(
+
+ add_custom_command(
+   OUTPUT "bismuth/contents/code/index.mjs"
+-  COMMAND "npx" "esbuild"
++  COMMAND "esbuild"
+   "--bundle" "${CMAKE_CURRENT_SOURCE_DIR}/index.ts"
+   "--outfile=${CMAKE_CURRENT_BINARY_DIR}/bismuth/contents/code/index.mjs"
+   "--format=esm"
+@@ -40,7 +40,7 @@ add_custom_command(
+
+ add_custom_target(
+   LintViaTSC
+-  COMMAND "npx" "tsc" "--noEmit" "--incremental"
++  COMMAND "true"
+   COMMENT "👮 Checking sources using TS Compiler..."
+ )
+
+--
+2.33.1
+
diff --git a/pkgs/desktops/plasma-5/3rdparty/addons/bismuth/default.nix b/pkgs/desktops/plasma-5/3rdparty/addons/bismuth/default.nix
new file mode 100644
index 0000000000000..114eb31e69ceb
--- /dev/null
+++ b/pkgs/desktops/plasma-5/3rdparty/addons/bismuth/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, kcoreaddons
+, kwindowsystem
+, plasma-framework
+, systemsettings
+, cmake
+, extra-cmake-modules
+, esbuild
+}:
+
+mkDerivation rec {
+  pname = "bismuth";
+  version = "2.1.0";
+
+  src = fetchFromGitHub {
+    owner = "Bismuth-Forge";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-ICpGgFvVi7tiYbMCo3JWQmbA36rdWF4NFYTWIejhxr4=";
+  };
+
+  patches = [
+    ./0001-Avoid-usage-of-npx.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    esbuild
+  ];
+
+  buildInputs = [
+    kcoreaddons
+    kwindowsystem
+    plasma-framework
+    systemsettings
+  ];
+
+  meta = with lib; {
+    description = "A dynamic tiling extension for KWin";
+    license = licenses.mit;
+    maintainers = with maintainers; [ pasqui23 ];
+    homepage = "https://bismuth-forge.github.io/bismuth/";
+    inherit (kwindowsystem.meta) platforms;
+  };
+}