1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00
nixpkgs/pkgs/applications/window-managers/sway/default.nix
Michael Weiss 578fe3f5a0
nixos/sway: Improve the module and adapt it to NixOS
This commit contains the following changes:
- nixos/sway: Remove the beta references
- sway: Drop buildDocs
- nixos/sway: Improve the documentation
- sway,nixos/sway: Adapt Sway to NixOS
  - Copy the default configuration file to /etc/sway/config (Sway will
    still load the identical file from the Nix store but this makes it
    easier to copy the default configuration file).
  - This will also remove all references to the Nix store from the
    default configuration file as they will eventually be garbage
    collected which is a problem if the user copies it.
  - I've also decided to drop the default wallpaper (alternatively we
    could copy it to a fixed location).
- nixos/sway: Drop the package option
2019-03-13 11:37:11 +01:00

54 lines
1.5 KiB
Nix

{ stdenv, fetchFromGitHub, fetchpatch
, meson, ninja
, pkgconfig, scdoc
, wayland, libxkbcommon, pcre, json_c, dbus, libevdev
, pango, cairo, libinput, libcap, pam, gdk_pixbuf
, wlroots, wayland-protocols
}:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "sway";
version = "1.0";
src = fetchFromGitHub {
owner = "swaywm";
repo = "sway";
rev = version;
sha256 = "09cndc2nl39d3l7g5634xp0pxcz60pvc5277mfw89r22mh0j78rx";
};
patches = [
# Fix for a compiler warning that causes a build failure
# (see https://github.com/swaywm/sway/issues/3862):
(fetchpatch {
url = "https://github.com/swaywm/sway/commit/bcde298a719f60b9913133dbd2a169dedbc8dd7d.patch";
sha256 = "0r583nmqvq43ib93yv6flw8pj833v32lbs0q0xld56s3rnzvvdcp";
})
./sway-config-no-nix-store-references.patch
];
nativeBuildInputs = [ pkgconfig meson ninja scdoc ];
buildInputs = [
wayland libxkbcommon pcre json_c dbus libevdev
pango cairo libinput libcap pam gdk_pixbuf
wlroots wayland-protocols
];
enableParallelBuilding = true;
mesonFlags = [
"-Ddefault-wallpaper=false" "-Dxwayland=enabled" "-Dgdk-pixbuf=enabled"
"-Dtray=enabled" "-Dman-pages=enabled"
];
meta = with stdenv.lib; {
description = "i3-compatible tiling Wayland compositor";
homepage = https://swaywm.org;
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ primeos synthetica ];
};
}