about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/somebar/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/somebar/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/somebar/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/somebar/default.nix b/nixpkgs/pkgs/applications/misc/somebar/default.nix
new file mode 100644
index 000000000000..6c595bc8dd66
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/somebar/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromSourcehut
+, meson
+, ninja
+, pkg-config
+, wayland
+, pango
+, wayland-protocols
+, wayland-scanner
+, conf ? null
+}:
+
+let
+  # There is a configuration in src/config.def.hpp, which we use by default
+  configFile = if lib.isDerivation conf || builtins.isPath conf then conf else "src/config.def.hpp";
+in
+
+stdenv.mkDerivation rec {
+  pname = "somebar";
+  version = "1.0.3";
+
+  src = fetchFromSourcehut {
+    owner = "~raphi";
+    repo = "somebar";
+    rev = version;
+    sha256 = "sha256-PBxCy1dZrOL1nmhVDQozvF0XL79uKMhhERGNpPPzaRU=";
+  };
+
+  nativeBuildInputs = [ meson ninja pkg-config wayland-scanner ];
+  buildInputs = [ pango wayland wayland-protocols ];
+
+  prePatch = ''
+    cp ${configFile} src/config.hpp
+  '';
+
+  meta = with lib; {
+    homepage = "https://git.sr.ht/~raphi/somebar";
+    description = "dwm-like bar for dwl";
+    license = licenses.mit;
+    maintainers = with maintainers; [ magnouvean ];
+    platforms = platforms.linux;
+  };
+}