Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 64c8f268df0d
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9179a3a406f7
Choose a head ref
  • 3 commits
  • 7 files changed
  • 1 contributor

Commits on Mar 12, 2019

  1. sway: Switch to 1.0

    This is the result of executing:
    git mv -f pkgs/applications/window-managers/sway/beta.nix pkgs/applications/window-managers/sway/default.nix
    git mv -f nixos/modules/programs/sway-beta.nix nixos/modules/programs/sway.nix
    
    And removing sway-beta from the following files:
    pkgs/top-level/all-packages.nix
    nixos/modules/module-list.nix
    primeos committed Mar 12, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    jluttine Jaakko Luttinen
    Copy the full SHA
    45004c6 View commit details

Commits on Mar 13, 2019

  1. 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
    primeos committed Mar 13, 2019
    4
    Copy the full SHA
    578fe3f View commit details
  2. Merge pull request #57414 from primeos/sway-1.0

    sway: Switch to 1.0
    primeos authored Mar 13, 2019
    Copy the full SHA
    9179a3a View commit details
1 change: 0 additions & 1 deletion nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -129,7 +129,6 @@
./programs/sysdig.nix
./programs/systemtap.nix
./programs/sway.nix
./programs/sway-beta.nix
./programs/thefuck.nix
./programs/tmux.nix
./programs/udevil.nix
91 changes: 0 additions & 91 deletions nixos/modules/programs/sway-beta.nix

This file was deleted.

57 changes: 29 additions & 28 deletions nixos/modules/programs/sway.nix
Original file line number Diff line number Diff line change
@@ -16,9 +16,9 @@ let
if [ "$DBUS_SESSION_BUS_ADDRESS" ]; then
export DBUS_SESSION_BUS_ADDRESS
exec sway-setcap "$@"
exec ${swayPackage}/bin/sway "$@"
else
exec ${pkgs.dbus}/bin/dbus-run-session sway-setcap "$@"
exec ${pkgs.dbus}/bin/dbus-run-session ${swayPackage}/bin/sway "$@"
fi
'';
swayJoined = pkgs.symlinkJoin {
@@ -28,22 +28,24 @@ let
in {
options.programs.sway = {
enable = mkEnableOption ''
the tiling Wayland compositor Sway. After adding yourself to the "sway"
group you can manually launch Sway by executing "sway" from a terminal.
If you call "sway" with any parameters the extraSessionCommands won't be
executed and Sway won't be launched with dbus-launch'';
Sway, the i3-compatible tiling Wayland compositor. You can manually launch
Sway by executing "exec sway" on a TTY. Copy /etc/sway/config to
~/.config/sway/config to modify the default configuration. See
https://github.com/swaywm/sway/wiki and "man 5 sway" for more information.
Please have a look at the "extraSessionCommands" example for running
programs natively under Wayland'';

extraSessionCommands = mkOption {
type = types.lines;
default = "";
example = ''
# Define a keymap (US QWERTY is the default)
export XKB_DEFAULT_LAYOUT=de,us
export XKB_DEFAULT_VARIANT=nodeadkeys
export XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle,caps:escape
# Change the Keyboard repeat delay and rate
export WLC_REPEAT_DELAY=660
export WLC_REPEAT_RATE=25
export SDL_VIDEODRIVER=wayland
# needs qt5.qtwayland in systemPackages
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
'';
description = ''
Shell commands executed just before Sway is started.
@@ -53,14 +55,17 @@ in {
extraPackages = mkOption {
type = with types; listOf package;
default = with pkgs; [
i3status xwayland rxvt_unicode dmenu
swaylock swayidle
xwayland rxvt_unicode dmenu
];
defaultText = literalExample ''
with pkgs; [ i3status xwayland rxvt_unicode dmenu ];
with pkgs; [ swaylock swayidle xwayland rxvt_unicode dmenu ];
'';
example = literalExample ''
with pkgs; [
i3lock light termite
xwayland
i3status i3status-rust
termite rofi light
]
'';
description = ''
@@ -70,23 +75,19 @@ in {
};

config = mkIf cfg.enable {
environment.systemPackages = [ swayJoined ] ++ cfg.extraPackages;
security.wrappers.sway = {
program = "sway-setcap";
source = "${swayPackage}/bin/sway";
capabilities = "cap_sys_ptrace,cap_sys_tty_config=eip";
owner = "root";
group = "sway";
permissions = "u+rx,g+rx";
environment = {
systemPackages = [ swayJoined ] ++ cfg.extraPackages;
etc = {
"sway/config".source = "${swayPackage}/etc/sway/config";
#"sway/security.d".source = "${swayPackage}/etc/sway/security.d/";
#"sway/config.d".source = "${swayPackage}/etc/sway/config.d/";
};
};

users.groups.sway = {};
security.pam.services.swaylock = {};

hardware.opengl.enable = mkDefault true;
fonts.enableDefaultFonts = mkDefault true;
programs.dconf.enable = mkDefault true;
};

meta.maintainers = with lib.maintainers; [ gnidorah primeos ];
meta.maintainers = with lib.maintainers; [ gnidorah primeos colemickens ];
}
54 changes: 0 additions & 54 deletions pkgs/applications/window-managers/sway/beta.nix

This file was deleted.

49 changes: 31 additions & 18 deletions pkgs/applications/window-managers/sway/default.nix
Original file line number Diff line number Diff line change
@@ -1,40 +1,53 @@
{ stdenv, fetchFromGitHub
, cmake, pkgconfig, asciidoc, libxslt, docbook_xsl
, wayland, wlc, libxkbcommon, pcre, json_c, dbus
, pango, cairo, libinput, libcap, pam, gdk_pixbuf, libpthreadstubs
, libXdmcp
, buildDocs ? true
{ 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 = "sway-${version}";
version = "0.15.2";
name = "${pname}-${version}";
pname = "sway";
version = "1.0";

src = fetchFromGitHub {
owner = "swaywm";
repo = "sway";
rev = version;
sha256 = "1p9j5gv85lsgj4z28qja07dqyvqk41w6mlaflvvm9yxafx477g5n";
sha256 = "09cndc2nl39d3l7g5634xp0pxcz60pvc5277mfw89r22mh0j78rx";
};

nativeBuildInputs = [
cmake pkgconfig
] ++ stdenv.lib.optional buildDocs [ asciidoc libxslt docbook_xsl ];
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 wlc libxkbcommon pcre json_c dbus
pango cairo libinput libcap pam gdk_pixbuf libpthreadstubs
libXdmcp
wayland libxkbcommon pcre json_c dbus libevdev
pango cairo libinput libcap pam gdk_pixbuf
wlroots wayland-protocols
];

enableParallelBuilding = true;

cmakeFlags = "-DVERSION=${version} -DLD_LIBRARY_PATH=/run/opengl-driver/lib:/run/opengl-driver-32/lib";
mesonFlags = [
"-Ddefault-wallpaper=false" "-Dxwayland=enabled" "-Dgdk-pixbuf=enabled"
"-Dtray=enabled" "-Dman-pages=enabled"
];

meta = with stdenv.lib; {
description = "i3-compatible window manager for Wayland";
description = "i3-compatible tiling Wayland compositor";
homepage = https://swaywm.org;
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ primeos ]; # Trying to keep it up-to-date.
maintainers = with maintainers; [ primeos synthetica ];
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/config.in b/config.in
--- a/config.in
+++ b/config.in
@@ -21,8 +21,8 @@ set $menu dmenu_path | dmenu | xargs swaymsg exec

### Output configuration
#
-# Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/)
-output * bg @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
+# Default wallpaper
+#output * bg ~/.config/sway/backgrounds/Sway_Wallpaper_Blue_1920x1080.png fill
#
# Example configuration:
#
@@ -213,5 +213,3 @@ bar {
inactive_workspace #32323200 #32323200 #5c5c5c
}
}
-
-include @sysconfdir@/sway/config.d/*

1 change: 0 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -17718,7 +17718,6 @@ in
orbment = callPackage ../applications/window-managers/orbment { };

sway = callPackage ../applications/window-managers/sway { };
sway-beta = callPackage ../applications/window-managers/sway/beta.nix { };
swayidle = callPackage ../applications/window-managers/sway/idle.nix { };
swaylock = callPackage ../applications/window-managers/sway/lock.nix { };