1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 kpackage,
6 kwin,
7 nodejs,
8 typescript,
9}:
10
11stdenv.mkDerivation (finalAttrs: {
12 pname = "karousel";
13 version = "0.13";
14
15 src = fetchFromGitHub {
16 owner = "peterfajdiga";
17 repo = "karousel";
18 rev = "v${finalAttrs.version}";
19 hash = "sha256-kwj0G4px9Mmv2TdGJsRuj+29Qvg4ZfSYnxCDgf+54bg=";
20 };
21
22 postPatch = ''
23 patchShebangs run-ts.sh
24 substituteInPlace Makefile \
25 --replace-fail "build: lint tests" "build: tests"
26 '';
27
28 nativeBuildInputs = [
29 kpackage
30 nodejs
31 typescript
32 ];
33 buildInputs = [ kwin ];
34 dontWrapQtApps = true;
35
36 installPhase = ''
37 runHook preInstall
38
39 kpackagetool6 --type=KWin/Script --install=./package --packageroot=$out/share/kwin/scripts
40
41 runHook postInstall
42 '';
43
44 meta = {
45 description = "Scrollable tiling Kwin script";
46 homepage = "https://github.com/peterfajdiga/karousel";
47 license = lib.licenses.gpl3Only;
48 maintainers = with lib.maintainers; [ k900 ];
49 platforms = lib.platforms.all;
50 };
51})