about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2021-03-03 23:17:58 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2021-05-07 17:07:47 -0300
commitc15766774bac8683fb15034bdfd3edaa06faa567 (patch)
treed9ce8ee19121f935286df5e5407a0bec12a0fd42
parentcc3609a59c16e4104c6cae987123885b57cd997c (diff)
cardboard: init at 0.0.0-unstable=2021-01-21
-rw-r--r--pkgs/applications/window-managers/cardboard/default.nix115
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 117 insertions, 0 deletions
diff --git a/pkgs/applications/window-managers/cardboard/default.nix b/pkgs/applications/window-managers/cardboard/default.nix
new file mode 100644
index 0000000000000..ec4f738877b8d
--- /dev/null
+++ b/pkgs/applications/window-managers/cardboard/default.nix
@@ -0,0 +1,115 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchurl
+, fetchgit
+, ffmpeg
+, libGL
+, libX11
+, libcap
+, libdrm
+, libinput
+, libpng
+, libxcb
+, libxkbcommon
+, mesa
+, meson
+, ninja
+, pixman
+, pkg-config
+, unzip
+, wayland
+, wayland-protocols
+, xcbutilerrors
+, xcbutilimage
+, xcbutilwm
+}:
+
+let
+  # cereal.wrap
+  cereal-wrap = fetchurl {
+    name = "cereal-1.3.0.tar.gz";
+    url = "https://github.com/USCiLab/cereal/archive/v1.3.0.tar.gz";
+    hash = "sha256-Mp6j4xMLAmwDpKzFDhaOfa/05uZhvGp9/sDXe1cIUdU=";
+  };
+  cereal-wrapdb = fetchurl {
+    name = "cereal-1.3.0-1-wrap.zip";
+    url = "https://wrapdb.mesonbuild.com/v1/projects/cereal/1.3.0/1/get_zip";
+    hash = "sha256-QYck5UT7fPLqtLDb1iOSX4Hnnns48Jj23Ae/LCfLSKY=";
+  };
+
+  # expected.wrap
+  expected-wrap = fetchgit {
+    name = "expected";
+    url = "https://gitlab.com/cardboardwm/expected";
+    rev = "0ee13cb2b058809aa9708c45ca18d494e72a759e";
+    sha256 = "sha256-gYr4/pjuLlr3k6Jcrg2/SzJLtbgyA+ZN2oMHkHXANDo=";
+  };
+
+  # wlroots.wrap
+  wlroots-wrap = fetchgit {
+    name = "wlroots";
+    url = "https://github.com/swaywm/wlroots";
+    rev = "0.12.0";
+    sha256 = "sha256-1rE3D+kQprjcjobc95/mQkUa5y1noY0MdoYJ/SpFQwY=";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "cardboard";
+  version = "0.0.0-unstable=2021-01-21";
+
+  src = fetchFromGitLab {
+    owner = "cardboardwm";
+    repo = pname;
+    rev = "f2ef2ff076ddbbd23994553b8eff131f9bd0207f";
+    hash = "sha256-43aqAWk4QoIP0BpRyPRDWFtVh/1UbrBoEeTDEF2gZX4=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    unzip
+  ];
+  buildInputs = [
+    ffmpeg
+    libGL
+    libX11
+    libcap
+    libdrm
+    libinput
+    libpng
+    libxcb
+    libxkbcommon
+    mesa
+    pixman
+    wayland
+    wayland-protocols
+    xcbutilerrors
+    xcbutilimage
+    xcbutilwm
+  ];
+
+  postPatch = ''
+    (cd subprojects
+     tar xvf ${cereal-wrap}
+     unzip ${cereal-wrapdb}
+     cp -r ${expected-wrap} ${expected-wrap.name}
+     cp -r ${wlroots-wrap} ${wlroots-wrap.name}
+    )
+  '';
+
+  # "Inherited" from Nixpkgs expression for wlroots
+  mesonFlags = [
+    "-Dwlroots:logind-provider=systemd"
+    "-Dwlroots:libseat=disabled"
+  ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/cardboardwm/cardboard";
+    description = "A scrollable, tiling Wayland compositor inspired on PaperWM";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a9f24ab1d5158..81e6bdba970f3 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -22365,6 +22365,8 @@ in
 
   caerbannog = callPackage ../applications/misc/caerbannog { };
 
+  cardboard = callPackage ../applications/window-managers/cardboard { };
+
   cage = callPackage ../applications/window-managers/cage { };
 
   calf = callPackage ../applications/audio/calf {