diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/window-managers')
92 files changed, 3696 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/window-managers/2bwm/default.nix b/nixpkgs/pkgs/applications/window-managers/2bwm/default.nix new file mode 100644 index 000000000000..cd1a3a4baf7a --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/2bwm/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, patches +, libxcb, xcbutilkeysyms, xcbutilwm +, libX11, xcbutil, xcbutilxrm }: + +stdenv.mkDerivation rec { + version = "0.3"; + pname = "2bwm"; + + src = fetchFromGitHub { + owner = "venam"; + repo = "2bwm"; + rev = "v${version}"; + sha256 = "1xwib612ahv4rg9yl5injck89dlpyp5475xqgag0ydfd0r4sfld7"; + }; + + # Allow users set their own list of patches + inherit patches; + + buildInputs = [ libxcb xcbutilkeysyms xcbutilwm libX11 xcbutil xcbutilxrm ]; + + installPhase = "make install DESTDIR=$out PREFIX=\"\""; + + meta = with stdenv.lib; { + homepage = https://github.com/venam/2bwm; + description = "A fast floating WM written over the XCB library and derived from mcwm"; + license = licenses.mit; + maintainers = [ maintainers.sternenseemann ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/afterstep/default.nix b/nixpkgs/pkgs/applications/window-managers/afterstep/default.nix new file mode 100644 index 000000000000..7e68de8393fd --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/afterstep/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchurl, pkgconfig +, libjpeg, libtiff, libpng, freetype +, fltk, gtk +, libX11, libXext, libICE +, dbus +, fetchpatch +}: + +stdenv.mkDerivation rec { + + pname = "afterstep"; + version = "2.2.12"; + sourceName = "AfterStep-${version}"; + + src = fetchurl { + urls = [ "ftp://ftp.afterstep.org/stable/${sourceName}.tar.bz2" ]; + sha256 = "1j7vkx1ig4kzwffdxnkqv3kld9qi3sam4w2nhq18waqjsi8xl5gz"; + }; + + patches = [ + (fetchpatch { + url = "https://salsa.debian.org/debian/afterstep/raw/master/debian/patches/44-Fix-build-with-gcc-5.patch"; + sha256 = "1vipy2lzzd2gqrsqk85pwgcdhargy815fxlbn57hsm45zglc3lj4"; + }) + ]; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libjpeg libtiff libpng freetype fltk gtk libX11 libXext libICE dbus dbus ]; + + # A strange type of bug: dbus is not immediately found by pkgconfig + preConfigure = '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config dbus-1 --cflags)" + ''; + + meta = with stdenv.lib; { + description = "A NEXTStep-inspired window manager"; + longDescription = '' + AfterStep is a window manager for the Unix X Window + System. Originally based on the look and feel of the NeXTStep + interface, it provides end users with a consistent, clean, and + elegant desktop. The goal of AfterStep development is to provide + for flexibility of desktop configuration, improving aestetics, + and efficient use of system resources. + ''; + homepage = http://www.afterstep.org/; + license = licenses.gpl2; + maintainers = [ maintainers.AndersonTorres ]; + platforms = platforms.linux; + }; + +} diff --git a/nixpkgs/pkgs/applications/window-managers/awesome/default.nix b/nixpkgs/pkgs/applications/window-managers/awesome/default.nix new file mode 100644 index 000000000000..54244d4dc8d8 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/awesome/default.nix @@ -0,0 +1,92 @@ +{ stdenv, fetchFromGitHub, luaPackages, cairo, librsvg, cmake, imagemagick, pkgconfig, gdk-pixbuf +, xorg, libstartup_notification, libxdg_basedir, libpthreadstubs +, xcb-util-cursor, makeWrapper, pango, gobject-introspection +, which, dbus, nettools, git, doxygen +, xmlto, docbook_xml_dtd_45, docbook_xsl, findXMLCatalogs +, libxkbcommon, xcbutilxrm, hicolor-icon-theme +, asciidoctor +, fontsConf +, gtk3Support ? false, gtk3 ? null +}: + +# needed for beautiful.gtk to work +assert gtk3Support -> gtk3 != null; + +stdenv.mkDerivation rec { + lgi = luaPackages.lgi; + lua = luaPackages.lua; + ldoc = luaPackages.ldoc; + pname = "awesome"; + version = "4.3"; + + src = fetchFromGitHub { + owner = "awesomewm"; + repo = "awesome"; + rev = "v${version}"; + sha256 = "1i7ajmgbsax4lzpgnmkyv35x8vxqi0j84a14k6zys4blx94m9yjf"; + }; + + nativeBuildInputs = [ + cmake + doxygen + imagemagick + makeWrapper + pkgconfig + xmlto docbook_xml_dtd_45 + docbook_xsl findXMLCatalogs + asciidoctor + ldoc + ]; + + outputs = [ "out" "doc" ]; + + FONTCONFIG_FILE = toString fontsConf; + + propagatedUserEnvPkgs = [ hicolor-icon-theme ]; + buildInputs = [ cairo librsvg dbus gdk-pixbuf gobject-introspection + git lgi libpthreadstubs libstartup_notification + libxdg_basedir lua nettools pango xcb-util-cursor + xorg.libXau xorg.libXdmcp xorg.libxcb xorg.libxshmfence + xorg.xcbutil xorg.xcbutilimage xorg.xcbutilkeysyms + xorg.xcbutilrenderutil xorg.xcbutilwm libxkbcommon + xcbutilxrm ] + ++ stdenv.lib.optional gtk3Support gtk3; + + cmakeFlags = [ + #"-DGENERATE_MANPAGES=ON" + "-DOVERRIDE_VERSION=${version}" + ] ++ stdenv.lib.optional luaPackages.isLuaJIT "-DLUA_LIBRARY=${lua}/lib/libluajit-5.1.so" + ; + + GI_TYPELIB_PATH = "${pango.out}/lib/girepository-1.0"; + # LUA_CPATH and LUA_PATH are used only for *building*, see the --search flags + # below for how awesome finds the libraries it needs at runtime. + LUA_CPATH = "${lgi}/lib/lua/${lua.luaversion}/?.so"; + LUA_PATH = "${lgi}/share/lua/${lua.luaversion}/?.lua;;"; + + postInstall = '' + # Don't use wrapProgram or the wrapper will duplicate the --search + # arguments every restart + mv "$out/bin/awesome" "$out/bin/.awesome-wrapped" + makeWrapper "$out/bin/.awesome-wrapped" "$out/bin/awesome" \ + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ + --add-flags '--search ${lgi}/lib/lua/${lua.luaversion}' \ + --add-flags '--search ${lgi}/share/lua/${lua.luaversion}' \ + --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" + + wrapProgram $out/bin/awesome-client \ + --prefix PATH : "${which}/bin" + ''; + + passthru = { + inherit lua; + }; + + meta = with stdenv.lib; { + description = "Highly configurable, dynamic window manager for X"; + homepage = https://awesomewm.org/; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ lovek323 rasendubi ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/bevelbar/default.nix b/nixpkgs/pkgs/applications/window-managers/bevelbar/default.nix new file mode 100644 index 000000000000..40cebb572af3 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/bevelbar/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchFromGitHub, libX11, libXrandr, libXft }: + +stdenv.mkDerivation rec { + pname = "bevelbar"; + version = "16.11"; + + src = fetchFromGitHub { + owner = "vain"; + repo = "bevelbar"; + rev = "v${version}"; + sha256 = "1hbwg3vdxw9fyshy85skv476p0zr4ynvhcz2xkijydpzm2j3rmjm"; + }; + + buildInputs = [ libX11 libXrandr libXft ]; + + installFlags = [ "prefix=$(out)" ]; + + meta = with stdenv.lib; { + description = "An X11 status bar with fancy schmancy 1985-ish beveled borders"; + inherit (src.meta) homepage; + license = licenses.mit; + platforms = platforms.all; + maintainers = [ maintainers.neeasade ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/bspwm/default.nix b/nixpkgs/pkgs/applications/window-managers/bspwm/default.nix new file mode 100644 index 000000000000..e863a382470f --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/bspwm/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, libxcb, libXinerama +, xcbutil, xcbutilkeysyms, xcbutilwm +}: + +stdenv.mkDerivation rec { + pname = "bspwm"; + version = "0.9.9"; + + src = fetchFromGitHub { + owner = "baskerville"; + repo = "bspwm"; + rev = version; + sha256 = "1i7crmljk1vra1r6alxvj6lqqailjjcv0llyg7a0gm23rbv4a42g"; + }; + + buildInputs = [ libxcb libXinerama xcbutil xcbutilkeysyms xcbutilwm ]; + + makeFlags = [ "PREFIX=$(out)" ]; + + meta = with stdenv.lib; { + description = "A tiling window manager based on binary space partitioning"; + homepage = https://github.com/baskerville/bspwm; + maintainers = with maintainers; [ meisternu epitrochoid rvolosatovs ]; + license = licenses.bsd2; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/bspwm/unstable.nix b/nixpkgs/pkgs/applications/window-managers/bspwm/unstable.nix new file mode 100644 index 000000000000..eeadfa248d75 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/bspwm/unstable.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, libxcb, libXinerama, xcbutil, xcbutilkeysyms, xcbutilwm }: + +stdenv.mkDerivation { + name = "bspwm-unstable-2016-09-30"; + + + src = fetchFromGitHub { + owner = "baskerville"; + repo = "bspwm"; + rev = "8664c007e44de162c1597fd7e163635b274fb747"; + sha256 = "0clvpz32z38i8kr10hqlifa661szpfn93c63m2aq2h4dwmr44slz"; + }; + + buildInputs = [ libxcb libXinerama xcbutil xcbutilkeysyms xcbutilwm ]; + + buildPhase = '' + make PREFIX=$out + ''; + + installPhase = '' + make PREFIX=$out install + ''; + + meta = { + description = "A tiling window manager based on binary space partitioning (git version)"; + homepage = https://github.com/baskerville/bspwm; + maintainers = [ stdenv.lib.maintainers.meisternu stdenv.lib.maintainers.epitrochoid ]; + license = stdenv.lib.licenses.bsd2; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/btops/default.nix b/nixpkgs/pkgs/applications/window-managers/btops/default.nix new file mode 100644 index 000000000000..cf90b1fad63b --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/btops/default.nix @@ -0,0 +1,25 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +{ stdenv, buildGoPackage, fetchgit }: + +buildGoPackage rec { + pname = "btops"; + version = "0.1.0"; + + goPackagePath = "github.com/cmschuetz/btops"; + + src = fetchgit { + url = "https://github.com/cmschuetz/btops.git"; + rev = version; + sha256 = "1ilidvpy7gz49zqp6rf0q7wjrc3r0brdrcp4r5f6i6p9cwybqkbq"; + }; + + goDeps = ./deps.nix; + + meta = with stdenv.lib; { + description = "bspwm desktop management that supports dymanic appending, removing, and renaming"; + homepage = https://github.com/cmschuetz/btops; + maintainers = with maintainers; [ mnacamura ]; + license = licenses.mit; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/btops/deps.nix b/nixpkgs/pkgs/applications/window-managers/btops/deps.nix new file mode 100644 index 000000000000..a893d40e2107 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/btops/deps.nix @@ -0,0 +1,120 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +[ + { + goPackagePath = "github.com/fsnotify/fsnotify"; + fetch = { + type = "git"; + url = "https://github.com/fsnotify/fsnotify"; + rev = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9"; + sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g"; + }; + } + { + goPackagePath = "github.com/hashicorp/hcl"; + fetch = { + type = "git"; + url = "https://github.com/hashicorp/hcl"; + rev = "ef8a98b0bbce4a65b5aa4c368430a80ddc533168"; + sha256 = "1qalfsc31fra7hcw2lc3s20aj7al62fq3j5fn5kga3mg99b82nyr"; + }; + } + { + goPackagePath = "github.com/magiconair/properties"; + fetch = { + type = "git"; + url = "https://github.com/magiconair/properties"; + rev = "c2353362d570a7bfa228149c62842019201cfb71"; + sha256 = "1a10362wv8a8qwb818wygn2z48lgzch940hvpv81hv8gc747ajxn"; + }; + } + { + goPackagePath = "github.com/mitchellh/mapstructure"; + fetch = { + type = "git"; + url = "https://github.com/mitchellh/mapstructure"; + rev = "bb74f1db0675b241733089d5a1faa5dd8b0ef57b"; + sha256 = "1aqk9qr46bwgdc5j7n7als61xvssvyjf4qzfsvhacl4izpygqnw7"; + }; + } + { + goPackagePath = "github.com/pelletier/go-toml"; + fetch = { + type = "git"; + url = "https://github.com/pelletier/go-toml"; + rev = "66540cf1fcd2c3aee6f6787dfa32a6ae9a870f12"; + sha256 = "1n8na0yg90gm0rpifmzrby5r385vvd62cdam3ls7ssy02bjvfw15"; + }; + } + { + goPackagePath = "github.com/spf13/afero"; + fetch = { + type = "git"; + url = "https://github.com/spf13/afero"; + rev = "63644898a8da0bc22138abf860edaf5277b6102e"; + sha256 = "13piahaq4vw1y1sklq5scrsflqx0a8hzmdqfz1fy4871kf2gl8qw"; + }; + } + { + goPackagePath = "github.com/spf13/cast"; + fetch = { + type = "git"; + url = "https://github.com/spf13/cast"; + rev = "8965335b8c7107321228e3e3702cab9832751bac"; + sha256 = "177bk7lq40jbgv9p9r80aydpaccfk8ja3a7jjhfwiwk9r1pa4rr2"; + }; + } + { + goPackagePath = "github.com/spf13/jwalterweatherman"; + fetch = { + type = "git"; + url = "https://github.com/spf13/jwalterweatherman"; + rev = "7c0cea34c8ece3fbeb2b27ab9b59511d360fb394"; + sha256 = "132p84i20b9s5r6fs597lsa6648vd415ch7c0d018vm8smzqpd0h"; + }; + } + { + goPackagePath = "github.com/spf13/pflag"; + fetch = { + type = "git"; + url = "https://github.com/spf13/pflag"; + rev = "583c0c0531f06d5278b7d917446061adc344b5cd"; + sha256 = "0nr4mdpfhhk94hq4ymn5b2sxc47b29p1akxd8b0hx4dvdybmipb5"; + }; + } + { + goPackagePath = "github.com/spf13/viper"; + fetch = { + type = "git"; + url = "https://github.com/spf13/viper"; + rev = "15738813a09db5c8e5b60a19d67d3f9bd38da3a4"; + sha256 = "1mjfzg8zvnxckaq6l8gw99i2msrfqn9yr04dc3b7kd5bpxi6zr4v"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "7c87d13f8e835d2fb3a70a2912c811ed0c1d241b"; + sha256 = "03fhkng37rczqwfgah5hd7d373jps3hcfx79dmky2fh62yvpcyn3"; + }; + } + { + goPackagePath = "golang.org/x/text"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/text"; + rev = "5c1cf69b5978e5a34c5f9ba09a83e56acc4b7877"; + sha256 = "03br8p1sb1ffr02l8hyrgcyib7ms0z06wy3v4r1dj2l6q4ghwzfs"; + }; + } + { + goPackagePath = "gopkg.in/yaml.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/yaml.v2"; + rev = "5420a8b6744d3b0345ab293f6fcba19c978f1183"; + sha256 = "0dwjrs2lp2gdlscs7bsrmyc5yf6mm4fvgw71bzr9mv2qrd2q73s1"; + }; + } +] diff --git a/nixpkgs/pkgs/applications/window-managers/cage/default.nix b/nixpkgs/pkgs/applications/window-managers/cage/default.nix new file mode 100644 index 000000000000..fe5e9c4e2e34 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/cage/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchFromGitHub, fetchpatch +, meson, ninja, pkgconfig, makeWrapper +, wlroots, wayland, wayland-protocols, pixman, libxkbcommon +, systemd, libGL, libX11 +, xwayland ? null +}: + +stdenv.mkDerivation rec { + pname = "cage-unstable"; + version = "2020-01-18"; + # The last stable release (0.1.1) would require at least the following 3 patches: + # - https://github.com/Hjdskes/cage/commit/33bb3c818c5971777b6f09d8821e7f078d38d262.patch + # - https://github.com/Hjdskes/cage/commit/51e6c760da51e2b885737d61a61cdc965bb9269d.patch + # - https://github.com/Hjdskes/cage/commit/84216ca2a417b237ad61c11e2f3ebbcb91681ece.patch + # Which need to be adapted due to other changes. At this point it seems + # better to use the current master version until the next stable release. + + src = fetchFromGitHub { + owner = "Hjdskes"; + repo = "cage"; + rev = "cc1f975c442ebd691b70196d76aa120ead717810"; + sha256 = "1gkqx26pvlw00b3fgx6sh87yyjfzyj51jwxvbf9k117npkrf4b2g"; + }; + + nativeBuildInputs = [ meson ninja pkgconfig makeWrapper ]; + + buildInputs = [ + wlroots wayland wayland-protocols pixman libxkbcommon + # TODO: Not specified but required: + systemd libGL libX11 + ]; + + enableParallelBuilding = true; + + mesonFlags = [ "-Dxwayland=${stdenv.lib.boolToString (xwayland != null)}" ]; + + postFixup = stdenv.lib.optionalString (xwayland != null) '' + wrapProgram $out/bin/cage --prefix PATH : "${xwayland}/bin" + ''; + + meta = with stdenv.lib; { + description = "A Wayland kiosk"; + homepage = https://www.hjdskes.nl/projects/cage/; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/clfswm/default.nix b/nixpkgs/pkgs/applications/window-managers/clfswm/default.nix new file mode 100644 index 000000000000..e2c39887a321 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/clfswm/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchgit, autoconf, sbcl, lispPackages, xdpyinfo, texinfo4 +, makeWrapper }: + +stdenv.mkDerivation { + name = "clfswm"; + + src = fetchgit { + url = "https://gitlab.common-lisp.net/clfswm/clfswm.git"; + rev = "refs/heads/master"; + sha256 = "0hynzh3a1zr719cxfb0k4cvh5lskzs616hwn7p942isyvhwzhynd"; + }; + + buildInputs = [ + texinfo4 makeWrapper autoconf + sbcl + lispPackages.clx + lispPackages.cl-ppcre + xdpyinfo + ]; + + patches = [ ./require-clx.patch ]; + + # Stripping destroys the generated SBCL image + dontStrip = true; + + configurePhase = '' + substituteInPlace load.lisp --replace \ + ";; (setf *contrib-dir* \"/usr/local/lib/clfswm/\")" \ + "(setf *contrib-dir* \"$out/lib/clfswm/\")" + ''; + + installPhase = '' + mkdir -pv $out/bin + make DESTDIR=$out install + + # Paths in the compressed image $out/bin/clfswm are not + # recognized by Nix. Add explicit reference here. + mkdir $out/nix-support + echo ${xdpyinfo} ${lispPackages.clx} ${lispPackages.cl-ppcre} > $out/nix-support/depends + ''; + + meta = with stdenv.lib; { + description = "A(nother) Common Lisp FullScreen Window Manager"; + homepage = https://common-lisp.net/project/clfswm/; + license = licenses.gpl3; + maintainers = with maintainers; [ robgssp ]; + platforms = platforms.linux; + broken = true; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/clfswm/require-clx.patch b/nixpkgs/pkgs/applications/window-managers/clfswm/require-clx.patch new file mode 100644 index 000000000000..ae2234461d25 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/clfswm/require-clx.patch @@ -0,0 +1,13 @@ +diff --git a/load.lisp b/load.lisp +index c8c4cf0..8c9ca2e 100644 +--- a/load.lisp ++++ b/load.lisp +@@ -111,6 +111,8 @@ from $XDG_CONFIG_HOME/clfswm/clfswmrc") + ;;;------------------ + (load-info "Requiring CLX") + ++(require 'clx) ++ + ;;; Loading clisp dynamic module. This part needs clisp >= 2.50 + ;;#+(AND CLISP (not CLX)) + ;;(when (fboundp 'require) diff --git a/nixpkgs/pkgs/applications/window-managers/cwm/default.nix b/nixpkgs/pkgs/applications/window-managers/cwm/default.nix new file mode 100644 index 000000000000..0e57643c64d3 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/cwm/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, libX11, libXinerama, libXrandr, libXft, yacc, pkgconfig }: + +stdenv.mkDerivation rec { + + pname = "cwm"; + version = "6.6"; + + src = fetchFromGitHub { + owner = "leahneukirchen"; + repo = pname; + rev = "v${version}"; + sha256 = "1rvb4y37vw3bpkqa6fbizgc74x3nrlkk6yf5hlm0hf8qz0c17vbl"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libX11 libXinerama libXrandr libXft yacc ]; + + prePatch = ''sed -i "s@/usr/local@$out@" Makefile''; + + meta = with stdenv.lib; { + description = "A lightweight and efficient window manager for X11"; + homepage = "https://github.com/leahneukirchen/cwm"; + maintainers = with maintainers; [ maintainers."0x4A6F" mkf ]; + license = licenses.isc; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/dwm/default.nix b/nixpkgs/pkgs/applications/window-managers/dwm/default.nix new file mode 100644 index 000000000000..af2c9af900dc --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/dwm/default.nix @@ -0,0 +1,30 @@ +{stdenv, fetchurl, libX11, libXinerama, libXft, patches ? []}: + +let + name = "dwm-6.2"; +in +stdenv.mkDerivation { + inherit name; + + src = fetchurl { + url = "https://dl.suckless.org/dwm/${name}.tar.gz"; + sha256 = "03hirnj8saxnsfqiszwl2ds7p0avg20izv9vdqyambks00p2x44p"; + }; + + buildInputs = [ libX11 libXinerama libXft ]; + + prePatch = ''sed -i "s@/usr/local@$out@" config.mk''; + + # Allow users set their own list of patches + inherit patches; + + buildPhase = " make "; + + meta = { + homepage = https://suckless.org/; + description = "Dynamic window manager for X"; + license = stdenv.lib.licenses.mit; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; all; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/dwm/dwm-status.nix b/nixpkgs/pkgs/applications/window-managers/dwm/dwm-status.nix new file mode 100644 index 000000000000..69337976f88f --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/dwm/dwm-status.nix @@ -0,0 +1,37 @@ +{ stdenv, lib, rustPlatform, fetchFromGitHub, dbus, gdk-pixbuf, libnotify, makeWrapper, pkgconfig, xorg +, enableAlsaUtils ? true, alsaUtils, coreutils +, enableNetwork ? true, dnsutils, iproute, wirelesstools }: + +let + bins = lib.optionals enableAlsaUtils [ alsaUtils coreutils ] + ++ lib.optionals enableNetwork [ dnsutils iproute wirelesstools ]; +in + +rustPlatform.buildRustPackage rec { + pname = "dwm-status"; + version = "1.6.3"; + + src = fetchFromGitHub { + owner = "Gerschtli"; + repo = "dwm-status"; + rev = version; + sha256 = "02sprsr7822ynkwpf3xdgmkdrgkw3vgijhlh65bayiv3b5lwb54n"; + }; + + nativeBuildInputs = [ makeWrapper pkgconfig ]; + buildInputs = [ dbus gdk-pixbuf libnotify xorg.libX11 ]; + + cargoSha256 = "0xybd6110b29ghl66kxfs64704qlhnn9jb5vl7lfk9sv62cs564i"; + + postInstall = lib.optionalString (bins != []) '' + wrapProgram $out/bin/dwm-status --prefix "PATH" : "${stdenv.lib.makeBinPath bins}" + ''; + + meta = with stdenv.lib; { + description = "Highly performant and configurable DWM status service"; + homepage = https://github.com/Gerschtli/dwm-status; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ gerschtli ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/dwm/git.nix b/nixpkgs/pkgs/applications/window-managers/dwm/git.nix new file mode 100644 index 000000000000..aaa32dd6b11b --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/dwm/git.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchgit, libX11, libXinerama, libXft, patches ? [], conf ? null }: + +let + name = "dwm-git-20180602"; +in + +stdenv.mkDerivation { + inherit name; + + src = fetchgit { + url = "git://git.suckless.org/dwm"; + rev = "b69c870a3076d78ab595ed1cd4b41cf6b03b2610"; + sha256 = "10i079h79l4gdch1qy2vrrb2xxxkgkjmgphr5r9a75jbbagwvz0k"; + }; + + buildInputs = [ libX11 libXinerama libXft ]; + + prePatch = ''sed -i "s@/usr/local@$out@" config.mk''; + + # Allow users set their own list of patches + inherit patches; + + # Allow users to override the entire config file AFTER appying the patches + postPatch = stdenv.lib.optionalString (conf!=null) '' + echo -n '${conf}' > config.def.h + ''; + + buildPhase = "make"; + + meta = with stdenv.lib; { + homepage = https://suckless.org/; + description = "Dynamic window manager for X, development version"; + license = licenses.mit; + maintainers = with maintainers; [xeji]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/dzen2/default.nix b/nixpkgs/pkgs/applications/window-managers/dzen2/default.nix new file mode 100644 index 000000000000..96dcfb938004 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/dzen2/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, pkgconfig, libX11, libXft, libXinerama, libXpm }: + +stdenv.mkDerivation { + name = "dzen2-0.9.5"; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libX11 libXft libXinerama libXpm ]; + + src = fetchurl { + url = "https://github.com/robm/dzen/tarball/master/dzen2-0.9.5git.tar.gz"; + sha256 = "d4f7943cd39dc23fd825eb684b49dc3484860fa8443d30b06ee38af72a53b556"; + }; + + patchPhase = '' + CFLAGS=" -Wall -Os ''${INCS} -DVERSION=\"''${VERSION}\" -DDZEN_XINERAMA -DDZEN_XPM -DDZEN_XFT `pkg-config --cflags xft`" + LIBS=" -L/usr/lib -lc -lXft -lXpm -lXinerama -lX11" + echo "CFLAGS=$CFLAGS" >>config.mk + echo "LIBS=$LIBS" >>config.mk + echo "LDFLAGS=$LIBS" >>config.mk + substituteInPlace config.mk --replace /usr/local "$out" + substituteInPlace gadgets/config.mk --replace /usr/local "$out" + ''; + + buildPhase = '' + mkdir -p $out/bin $out/man/man1 + make clean install + cd gadgets + make clean install + ''; + + meta = { + homepage = https://github.com/robm/dzen; + license = stdenv.lib.licenses.mit; + description = "X notification utility"; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/evilwm/default.nix b/nixpkgs/pkgs/applications/window-managers/evilwm/default.nix new file mode 100644 index 000000000000..1907fbb68f98 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/evilwm/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchurl, libX11, libXext, libXrandr, libXrender, + xorgproto, patches ? [] }: + +stdenv.mkDerivation rec { + name = "evilwm-1.1.1"; + + src = fetchurl { + url = "http://www.6809.org.uk/evilwm/${name}.tar.gz"; + sha256 = "79589c296a5915ee0bae1d231e8912601fc794d9f0a9cacb6b648ff9a5f2602a"; + }; + + buildInputs = [ libX11 libXext libXrandr libXrender + xorgproto ]; + + prePatch = ''substituteInPlace ./Makefile --replace /usr $out \ + --replace "CC = gcc" "#CC = gcc"''; + + # Allow users set their own list of patches + inherit patches; + + meta = with stdenv.lib; { + homepage = http://www.6809.org.uk/evilwm/; + description = "Minimalist window manager for the X Window System"; + + license = { + shortName = "evilwm"; + fullName = "Custom, inherited from aewm and 9wm"; + url = http://www.6809.org.uk/evilwm/; + free = true; + }; # like BSD/MIT, but Share-Alike'y; See README. + + maintainers = with maintainers; [ amiloradovsky ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/fbpanel/default.nix b/nixpkgs/pkgs/applications/window-managers/fbpanel/default.nix new file mode 100644 index 000000000000..cf45dfa86407 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/fbpanel/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, pkgconfig +, libX11, libXmu, libXpm, gtk2, libpng, libjpeg, libtiff, librsvg +}: + +stdenv.mkDerivation rec { + pname = "fbpanel"; + version = "6.1"; + src = fetchurl { + url = "mirror://sourceforge/fbpanel/${pname}-${version}.tbz2"; + sha256 = "e14542cc81ea06e64dd4708546f5fd3f5e01884c3e4617885c7ef22af8cf3965"; + }; + buildInputs = + [ pkgconfig libX11 libXmu libXpm gtk2 libpng libjpeg libtiff librsvg ]; + + preConfigure = "patchShebangs ."; + + NIX_LDFLAGS="-lX11"; + + meta = with stdenv.lib; { + description = "A stand-alone panel"; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.linux; + license = licenses.mit; + }; + + passthru = { + updateInfo = { + downloadPage = "fbpanel.sourceforge.net"; + }; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/fluxbox/default.nix b/nixpkgs/pkgs/applications/window-managers/fluxbox/default.nix new file mode 100644 index 000000000000..404044fa3fa1 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/fluxbox/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchurl, pkgconfig +, freetype, fribidi +, libXext, libXft, libXpm, libXrandr, libXrender, xorgproto +, libXinerama +, imlib2 }: + +with stdenv.lib; +stdenv.mkDerivation rec { + + pname = "fluxbox"; + version = "1.3.7"; + + src = fetchurl { + url = "mirror://sourceforge/fluxbox/${pname}-${version}.tar.xz"; + sha256 = "1h1f70y40qd225dqx937vzb4k2cz219agm1zvnjxakn5jkz7b37w"; + }; + + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ freetype fribidi libXext libXft libXpm libXrandr libXrender xorgproto libXinerama imlib2 ]; + + enableParallelBuilding = true; + + preConfigure = '' + substituteInPlace util/fluxbox-generate_menu.in \ + --subst-var-by PREFIX "$out" + ''; + + meta = { + description = "Full-featured, light-resource X window manager"; + longDescription = '' + Fluxbox is a X window manager based on Blackbox 0.61.1 window + manager sources. It is very light on resources and easy to + handle but yet full of features to make an easy, and extremely + fast, desktop experience. It is written in C++ and licensed + under MIT license. + ''; + homepage = http://fluxbox.org/; + license = licenses.mit; + maintainers = [ maintainers.AndersonTorres ]; + platforms = platforms.linux; + }; +} +# Many thanks Jack Ryan from Nix-dev mailing list! diff --git a/nixpkgs/pkgs/applications/window-managers/fvwm/default.nix b/nixpkgs/pkgs/applications/window-managers/fvwm/default.nix new file mode 100644 index 000000000000..cc503b2db4f4 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/fvwm/default.nix @@ -0,0 +1,33 @@ +{ gestures ? false +, stdenv, fetchurl, pkgconfig +, cairo, fontconfig, freetype, libXft, libXcursor, libXinerama +, libXpm, libXt, librsvg, libpng, fribidi, perl +, libstroke ? null +}: + +assert gestures -> libstroke != null; + +stdenv.mkDerivation rec { + pname = "fvwm"; + version = "2.6.9"; + + src = fetchurl { + url = "https://github.com/fvwmorg/fvwm/releases/download/${version}/${pname}-${version}.tar.gz"; + sha256 = "1bliqcnap7vb3m2rn8wvxyfhbf35h9x34s41fl4301yhrkrlrihv"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + cairo fontconfig freetype + libXft libXcursor libXinerama libXpm libXt + librsvg libpng fribidi perl + ] ++ stdenv.lib.optional gestures libstroke; + + meta = { + homepage = http://fvwm.org; + description = "A multiple large virtual desktop window manager"; + license = stdenv.lib.licenses.gpl2Plus; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ edanaher ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/herbstluftwm/default.nix b/nixpkgs/pkgs/applications/window-managers/herbstluftwm/default.nix new file mode 100644 index 000000000000..ca64786475f7 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/herbstluftwm/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, pkgconfig, glib, libX11, libXext, libXinerama }: + +stdenv.mkDerivation rec { + name = "herbstluftwm-0.7.2"; + + src = fetchurl { + url = "https://herbstluftwm.org/tarballs/${name}.tar.gz"; + sha256 = "1kc18aj9j3nfz6fj4qxg9s3gg4jvn6kzi3ii24hfm0vqdpy17xnz"; + }; + + patchPhase = '' + substituteInPlace config.mk \ + --replace "/usr/local" "$out" \ + --replace "/etc" "$out/etc" \ + --replace "/zsh/functions/Completion/X" "/zsh/site-functions" \ + --replace "/usr/share" "\$(PREFIX)/share" + ''; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ glib libX11 libXext libXinerama ]; + + meta = { + description = "A manual tiling window manager for X"; + homepage = http://herbstluftwm.org/; + license = stdenv.lib.licenses.bsd2; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ the-kenny ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/blocks-gaps.nix b/nixpkgs/pkgs/applications/window-managers/i3/blocks-gaps.nix new file mode 100644 index 000000000000..acfd06235ac7 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/blocks-gaps.nix @@ -0,0 +1,51 @@ +{ fetchFromGitHub, stdenv, perl, makeWrapper +, iproute, acpi, sysstat, alsaUtils +, scripts ? [ "bandwidth" "battery" "cpu_usage" "disk" "iface" + "load_average" "memory" "volume" "wifi" ] +}: + +with stdenv.lib; + +let + perlscripts = [ "battery" "cpu_usage" "openvpn" "temperature" ]; + contains_any = l1: l2: 0 < length( intersectLists l1 l2 ); + +in +stdenv.mkDerivation rec { + pname = "i3blocks-gaps"; + version = "1.4"; + + src = fetchFromGitHub { + owner = "Airblader"; + repo = "i3blocks-gaps"; + rev = "4cfdf93c75f729a2c96d471004d31734e923812f"; + sha256 = "0v9307ij8xzwdaxay3r75sd2cp453s3qb6q7dy9fks2p6wwqpazi"; + }; + + makeFlags = [ "all" ]; + installFlags = [ "PREFIX=\${out}" "VERSION=${version}" ]; + + buildInputs = optional (contains_any scripts perlscripts) perl; + nativeBuildInputs = [ makeWrapper ]; + + postFixup = '' + wrapProgram $out/libexec/i3blocks/bandwidth \ + --prefix PATH : ${makeBinPath (optional (elem "bandwidth" scripts) iproute)} + wrapProgram $out/libexec/i3blocks/battery \ + --prefix PATH : ${makeBinPath (optional (elem "battery" scripts) acpi)} + wrapProgram $out/libexec/i3blocks/cpu_usage \ + --prefix PATH : ${makeBinPath (optional (elem "cpu_usage" scripts) sysstat)} + wrapProgram $out/libexec/i3blocks/iface \ + --prefix PATH : ${makeBinPath (optional (elem "iface" scripts) iproute)} + wrapProgram $out/libexec/i3blocks/volume \ + --prefix PATH : ${makeBinPath (optional (elem "volume" scripts) alsaUtils)} + ''; + + meta = with stdenv.lib; { + description = "A flexible scheduler for your i3bar blocks -- this is a fork to use with i3-gaps"; + homepage = https://github.com/Airblader/i3blocks-gaps; + license = licenses.gpl3; + maintainers = with maintainers; [ carlsverre ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/blocks.nix b/nixpkgs/pkgs/applications/window-managers/i3/blocks.nix new file mode 100644 index 000000000000..8c3101f8eb9e --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/blocks.nix @@ -0,0 +1,33 @@ +{ fetchFromGitHub, fetchpatch, stdenv, autoreconfHook, pkg-config }: + +with stdenv.lib; + +stdenv.mkDerivation { + pname = "i3blocks"; + version = "1.5"; + + src = fetchFromGitHub { + owner = "vivien"; + repo = "i3blocks"; + rev = "3417602a2d8322bc866861297f535e1ef80b8cb0"; + sha256 = "0v8mwnm8qzpv6xnqvrk43s4b9iyld4naqzbaxk4ldq1qkhai0wsv"; + }; + + patches = [ + # XDG_CONFIG_DIRS can contain multiple elements separated by colons, which should be searched in order. + (fetchpatch { + # https://github.com/vivien/i3blocks/pull/405 + url = https://github.com/edef1c/i3blocks/commit/d57b32f9a364aeaf36869efdd54240433c737e57.patch; + sha256 = "102xb0ax0hmg82dz2gzfag470dkckzf2yizai0izacvrz0d3ngj1"; + }) + ]; + + nativeBuildInputs = [ autoreconfHook pkg-config ]; + + meta = { + description = "A flexible scheduler for your i3bar blocks"; + homepage = https://github.com/vivien/i3blocks; + license = licenses.gpl3; + platforms = with platforms; freebsd ++ linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/default.nix b/nixpkgs/pkgs/applications/window-managers/i3/default.nix new file mode 100644 index 000000000000..fd964215d455 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/default.nix @@ -0,0 +1,74 @@ +{ fetchurl, stdenv, which, pkgconfig, makeWrapper, libxcb, xcbutilkeysyms +, xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification, libX11, pcre, libev +, yajl, xcb-util-cursor, perl, pango, perlPackages, libxkbcommon +, xorgserver, xvfb_run }: + +stdenv.mkDerivation rec { + pname = "i3"; + version = "4.18"; + + src = fetchurl { + url = "https://i3wm.org/downloads/${pname}-${version}.tar.bz2"; + sha256 = "0dv5g8ycfmijxfjyw8hzsxaf80v09lb73zh7x2vszy78h3amifqz"; + }; + + nativeBuildInputs = [ which pkgconfig makeWrapper ]; + + buildInputs = [ + libxcb xcbutilkeysyms xcbutil xcbutilwm xcbutilxrm libxkbcommon + libstartup_notification libX11 pcre libev yajl xcb-util-cursor perl pango + perlPackages.AnyEventI3 perlPackages.X11XCB perlPackages.IPCRun + perlPackages.ExtUtilsPkgConfig perlPackages.InlineC + xorgserver xvfb_run + ]; + + configureFlags = [ "--disable-builddir" ]; + + enableParallelBuilding = true; + + postPatch = '' + patchShebangs . + ''; + + # Tests have been failing (at least for some people in some cases) + # and have been disabled until someone wants to fix them. Some + # initial digging uncovers that the tests call out to `git`, which + # they shouldn't, and then even once that's fixed have some + # perl-related errors later on. For more, see + # https://github.com/NixOS/nixpkgs/issues/7957 + doCheck = false; # stdenv.hostPlatform.system == "x86_64-linux"; + + checkPhase = stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") + '' + (cd testcases && xvfb-run ./complete-run.pl -p 1 --keep-xserver-output) + ! grep -q '^not ok' testcases/latest/complete-run.log + ''; + + postInstall = '' + wrapProgram "$out/bin/i3-save-tree" --prefix PERL5LIB ":" "$PERL5LIB" + for program in $out/bin/i3-sensible-*; do + sed -i 's/which/command -v/' $program + done + + install -vD -t $out/share/man/man1 man/*.{1,man} + ''; + + separateDebugInfo = true; + + meta = with stdenv.lib; { + description = "A tiling window manager"; + homepage = "https://i3wm.org"; + maintainers = with maintainers; [ modulistic fpletz globin ]; + license = licenses.bsd3; + platforms = platforms.all; + + longDescription = '' + A tiling window manager primarily targeted at advanced users and + developers. Based on a tree as data structure, supports tiling, + stacking, and tabbing layouts, handled dynamically, as well as + floating windows. Configured via plain text file. Multi-monitor. + UTF-8 clean. + ''; + }; + +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/easyfocus.nix b/nixpkgs/pkgs/applications/window-managers/i3/easyfocus.nix new file mode 100644 index 000000000000..9ce5486557a5 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/easyfocus.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, pkgconfig, xorgproto, libxcb, xcbutilkeysyms +, xorg , i3ipc-glib , glib +}: + +stdenv.mkDerivation { + pname = "i3easyfocus"; + version = "20190411"; + + src = fetchFromGitHub { + owner = "cornerman"; + repo = "i3-easyfocus"; + rev = "fffb468f7274f9d7c9b92867c8cb9314ec6cf81a"; + sha256 = "1db23vzzmp0hnfss1fkd80za6d2pajx7hdwikw50pk95jq0w8wfm"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libxcb xcbutilkeysyms xorgproto xorg.libX11.dev i3ipc-glib glib.dev ]; + + # Makefile has no rule for 'install' + installPhase = '' + mkdir -p $out/bin + cp i3-easyfocus $out/bin + ''; + + meta = with stdenv.lib; { + description = "Focus and select windows in i3"; + homepage = https://github.com/cornerman/i3-easyfocus; + maintainers = with maintainers; [teto]; + license = licenses.gpl3; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/gaps.nix b/nixpkgs/pkgs/applications/window-managers/i3/gaps.nix new file mode 100644 index 000000000000..731555ce9f8c --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/gaps.nix @@ -0,0 +1,38 @@ +{ fetchurl, stdenv, i3, autoreconfHook }: + +i3.overrideAttrs (oldAttrs : rec { + + name = "i3-gaps-${version}"; + version = "4.18"; + releaseDate = "2019-01-27"; + + src = fetchurl { + url = "https://github.com/Airblader/i3/archive/${version}.tar.gz"; + sha256 = "04sq2sik7j09kgnn1k87yg3vzy56pk4688bmxh49l6drl0wr1m2v"; + }; + + nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ autoreconfHook ]; + + postUnpack = '' + echo -n "${version} (${releaseDate})" > ./i3-${version}/I3_VERSION + ''; + + # fatal error: GENERATED_config_enums.h: No such file or directory + enableParallelBuilding = false; + + meta = with stdenv.lib; { + description = "A fork of the i3 tiling window manager with some additional features"; + homepage = "https://github.com/Airblader/i3"; + maintainers = with maintainers; [ fmthoma ]; + license = licenses.bsd3; + platforms = platforms.all; + + longDescription = '' + Fork of i3wm, a tiling window manager primarily targeted at advanced users + and developers. Based on a tree as data structure, supports tiling, + stacking, and tabbing layouts, handled dynamically, as well as floating + windows. This fork adds a few features such as gaps between windows. + Configured via plain text file. Multi-monitor. UTF-8 clean. + ''; + }; +}) diff --git a/nixpkgs/pkgs/applications/window-managers/i3/i3ipc-glib.nix b/nixpkgs/pkgs/applications/window-managers/i3/i3ipc-glib.nix new file mode 100644 index 000000000000..33aac1cf4b65 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/i3ipc-glib.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, pkgconfig, xorgproto, libxcb +, autoreconfHook, json-glib, gtk-doc, which +, gobject-introspection +}: + +stdenv.mkDerivation rec { + + pname = "i3ipc-glib"; + version = "0.6.0"; + + src = fetchFromGitHub { + owner = "acrisci"; + repo = "i3ipc-glib"; + rev = "v${version}"; + sha256 = "1gmk1zjafrn6jh4j7r0wkwrpwvf9drl1lcw8vya23i1f4zbk0wh4"; + }; + + nativeBuildInputs = [ autoreconfHook which pkgconfig ]; + + buildInputs = [ libxcb json-glib gtk-doc xorgproto gobject-introspection ]; + + + preAutoreconf = '' + gtkdocize + ''; + + meta = with stdenv.lib; { + description = "A C interface library to i3wm"; + homepage = https://github.com/acrisci/i3ipc-glib; + maintainers = with maintainers; [teto]; + license = licenses.gpl3; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/layout-manager.nix b/nixpkgs/pkgs/applications/window-managers/i3/layout-manager.nix new file mode 100644 index 000000000000..c7454981400d --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/layout-manager.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, vim, makeWrapper, jq, rofi, xrandr, xdotool, i3, gawk, libnotify }: + +let + path = stdenv.lib.makeBinPath [ vim jq rofi xrandr xdotool i3 gawk libnotify ]; +in + +stdenv.mkDerivation rec { + pname = "i3-layout-manager"; + version = "unstable-2019-12-06"; + + src = fetchFromGitHub { + owner = "klaxalk"; + repo = pname; + rev = "064e13959413ba2d706185478a394e5852c0dc53"; + sha256 = "1qm35sp1cfi3xj5j7xwa05dkb3353gwq4xh69ryc6382xx3wszg6"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + install -D layout_manager.sh $out/bin/layout_manager + wrapProgram $out/bin/layout_manager \ + --prefix PATH : "${path}" + + runHook postInstall + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/klaxalk/i3-layout-manager; + description = "Saving, loading and managing layouts for i3wm."; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/lock-color.nix b/nixpkgs/pkgs/applications/window-managers/i3/lock-color.nix new file mode 100644 index 000000000000..062a8c4b8d87 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/lock-color.nix @@ -0,0 +1,62 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libxcb, + xcbutilkeysyms , xcbutilimage, pam, libX11, libev, cairo, libxkbcommon, + libxkbfile, libjpeg_turbo, xcbutilxrm +}: + +stdenv.mkDerivation rec { + version = "2.12.c.1"; + pname = "i3lock-color"; + + src = fetchFromGitHub { + owner = "PandorasFox"; + repo = "i3lock-color"; + rev = version; + sha256 = "1q09cfgkikqbrkk1kljg8dsgbs5nacixhdqaww18h94hmlnbbssc"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + buildInputs = [ libxcb xcbutilkeysyms xcbutilimage pam libX11 + libev cairo libxkbcommon libxkbfile libjpeg_turbo xcbutilxrm ]; + + makeFlags = [ "all" ]; + preInstall = '' + mkdir -p $out/share/man/man1 + ''; + installFlags = [ "PREFIX=\${out}" "SYSCONFDIR=\${out}/etc" "MANDIR=\${out}/share/man" ]; + postInstall = '' + mv $out/bin/i3lock $out/bin/i3lock-color + mv $out/share/man/man1/i3lock.1 $out/share/man/man1/i3lock-color.1 + sed -i 's/\(^\|\s\|"\)i3lock\(\s\|$\)/\1i3lock-color\2/g' $out/share/man/man1/i3lock-color.1 + ''; + meta = with stdenv.lib; { + description = "A simple screen locker like slock, enhanced version with extra configuration options"; + longDescription = '' + Simple screen locker. After locking, a colored background (default: white) or + a configurable image is shown, and a ring-shaped unlock-indicator gives feedback + for every keystroke. After entering your password, the screen is unlocked again. + + i3lock-color is forked from i3lock (https://i3wm.org/i3lock/) with the following + enhancements / additional configuration options: + + - indicator: + - shape: ring or bar + - size: configurable + - all colors: configurable + - all texts: configurable + - visibility: can be always visible, can be restricted to some screens + + - background: optionally show a blurred screen instead of a single color + + - more information: show text at configurable positions: + - clock: time/date with configurable format + - keyboard-layout + ''; + homepage = "https://github.com/PandorasFox/i3lock-color"; + maintainers = with maintainers; [ malyn ]; + license = licenses.bsd3; + + # Needs the SSE2 instruction set. See upstream issue + # https://github.com/chrjguill/i3lock-color/issues/44 + platforms = platforms.x86; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/lock-fancy.nix b/nixpkgs/pkgs/applications/window-managers/i3/lock-fancy.nix new file mode 100644 index 000000000000..4ca69ce31b44 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/lock-fancy.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchFromGitHub, coreutils, scrot, imagemagick, gawk +, i3lock-color, getopt, fontconfig +}: + +stdenv.mkDerivation rec { + rev = "7accfb2aa2f918d1a3ab975b860df1693d20a81a"; + name = "i3lock-fancy-unstable-2018-11-25_rev${builtins.substring 0 7 rev}"; + src = fetchFromGitHub { + owner = "meskarune"; + repo = "i3lock-fancy"; + inherit rev; + sha256 = "00lqsvz1knb8iqy8lnkn3sf4c2c4nzb0smky63qf48m8za5aw9b1"; + }; + patchPhase = '' + sed -i -e "s|(mktemp)|(${coreutils}/bin/mktemp)|" i3lock-fancy + sed -i -e "s|'rm -f |'${coreutils}/bin/rm -f |" i3lock-fancy + sed -i -e "s|scrot -z |${scrot}/bin/scrot -z |" i3lock-fancy + sed -i -e "s|convert |${imagemagick.out}/bin/convert |" i3lock-fancy + sed -i -e "s|awk -F|${gawk}/bin/awk -F|" i3lock-fancy + sed -i -e "s| awk | ${gawk}/bin/awk |" i3lock-fancy + sed -i -e "s|i3lock -i |${i3lock-color}/bin/i3lock-color -i |" i3lock-fancy + sed -i -e 's|icon="/usr/share/i3lock-fancy/icons/lockdark.png"|icon="'$out'/share/i3lock-fancy/icons/lockdark.png"|' i3lock-fancy + sed -i -e 's|icon="/usr/share/i3lock-fancy/icons/lock.png"|icon="'$out'/share/i3lock-fancy/icons/lock.png"|' i3lock-fancy + sed -i -e "s|getopt |${getopt}/bin/getopt |" i3lock-fancy + sed -i -e "s|fc-match |${fontconfig.bin}/bin/fc-match |" i3lock-fancy + sed -i -e "s|shot=(import -window root)|shot=(${scrot}/bin/scrot -z -o)|" i3lock-fancy + rm Makefile + ''; + installPhase = '' + mkdir -p $out/bin $out/share/i3lock-fancy/icons + cp i3lock-fancy $out/bin/i3lock-fancy + cp icons/lock*.png $out/share/i3lock-fancy/icons + ''; + meta = with stdenv.lib; { + description = "i3lock is a bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text."; + homepage = https://github.com/meskarune/i3lock-fancy; + maintainers = with maintainers; [ ]; + license = licenses.mit; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/lock.nix b/nixpkgs/pkgs/applications/window-managers/i3/lock.nix new file mode 100644 index 000000000000..619345d1b96d --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/lock.nix @@ -0,0 +1,37 @@ +{ fetchurl, stdenv, which, pkgconfig, libxcb, xcbutilkeysyms, xcbutilimage, + xcbutilxrm, pam, libX11, libev, cairo, libxkbcommon, libxkbfile }: + +stdenv.mkDerivation rec { + pname = "i3lock"; + version = "2.12"; + + src = fetchurl { + url = "https://i3wm.org/i3lock/${pname}-${version}.tar.bz2"; + sha256 = "02dwaqxpclcwiwvpvq7zwz4sxcv9c15dbf17ifalj1p8djls3cnh"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ which libxcb xcbutilkeysyms xcbutilimage xcbutilxrm + pam libX11 libev cairo libxkbcommon libxkbfile ]; + + makeFlags = [ "all" ]; + installFlags = [ "PREFIX=\${out}" "SYSCONFDIR=\${out}/etc" ]; + postInstall = '' + mkdir -p $out/share/man/man1 + cp *.1 $out/share/man/man1 + ''; + + meta = with stdenv.lib; { + description = "A simple screen locker like slock"; + longDescription = '' + Simple screen locker. After locking, a colored background (default: white) or + a configurable image is shown, and a ring-shaped unlock-indicator gives feedback + for every keystroke. After entering your password, the screen is unlocked again. + ''; + homepage = https://i3wm.org/i3lock/; + maintainers = with maintainers; [ malyn domenkozar ]; + license = licenses.bsd3; + platforms = platforms.all; + }; + +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/pystatus.nix b/nixpkgs/pkgs/applications/window-managers/i3/pystatus.nix new file mode 100644 index 000000000000..20ea0dd03cc3 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/pystatus.nix @@ -0,0 +1,45 @@ +{ stdenv, fetchFromGitHub, libpulseaudio, python3Packages, extraLibs ? [] }: + +python3Packages.buildPythonApplication rec { + # i3pystatus moved to rolling release: + # https://github.com/enkore/i3pystatus/issues/584 + version = "unstable-2019-06-10"; + pname = "i3pystatus"; + + src = fetchFromGitHub + { + owner = "enkore"; + repo = "i3pystatus"; + rev = "56ce08d0ff8d5d64950d6b588ebede35a95e0ce2"; + sha256 = "12938860jbcly1xwhd71jvy2dff28pwv9kqh6mab1859148bzmcg"; + }; + + propagatedBuildInputs = with python3Packages; [ keyring colour netifaces psutil basiciw ] ++ + [ libpulseaudio ] ++ extraLibs; + + libpulseaudioPath = stdenv.lib.makeLibraryPath [ libpulseaudio ]; + ldWrapperSuffix = "--suffix LD_LIBRARY_PATH : \"${libpulseaudioPath}\""; + # LC_TIME != C results in locale.Error: unsupported locale setting + makeWrapperArgs = [ "--set LC_TIME C" ldWrapperSuffix ]; # libpulseaudio.so is loaded manually + + postInstall = '' + makeWrapper ${python3Packages.python.interpreter} $out/bin/${pname}-python-interpreter \ + --prefix PYTHONPATH : "$PYTHONPATH" \ + ${ldWrapperSuffix} + ''; + + # no tests in tarball + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://github.com/enkore/i3pystatus; + description = "A complete replacement for i3status"; + longDescription = '' + i3pystatus is a growing collection of python scripts for status output compatible + to i3status / i3bar of the i3 window manager. + ''; + license = licenses.mit; + platforms = platforms.linux; + maintainers = [ maintainers.igsha ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/status-rust.nix b/nixpkgs/pkgs/applications/window-managers/i3/status-rust.nix new file mode 100644 index 000000000000..b28c95e6bfb1 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/status-rust.nix @@ -0,0 +1,30 @@ +{ stdenv, rustPlatform, fetchFromGitHub, pkgconfig, dbus, libpulseaudio }: + +rustPlatform.buildRustPackage rec { + pname = "i3status-rust"; + version = "0.13.1"; + + src = fetchFromGitHub { + owner = "greshake"; + repo = pname; + rev = "v${version}"; + sha256 = "0va6ny1v7lk30hhx4i5qyk9fwg3apy2nmh6kbmxhcf0rs5449ikg"; + }; + + cargoSha256 = "1lywr21kk3idjyc10gy4848dmmgyqc2jjf7hpzq0vywkp639bf2x"; + + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ dbus libpulseaudio ]; + + # Currently no tests are implemented, so we avoid building the package twice + doCheck = false; + + meta = with stdenv.lib; { + description = "Very resource-friendly and feature-rich replacement for i3status"; + homepage = https://github.com/greshake/i3status-rust; + license = licenses.gpl3; + maintainers = with maintainers; [ backuitist globin ma27 ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/status.nix b/nixpkgs/pkgs/applications/window-managers/i3/status.nix new file mode 100644 index 000000000000..e963259b6247 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/status.nix @@ -0,0 +1,29 @@ +{ fetchurl, stdenv, libconfuse, yajl, alsaLib, libpulseaudio, libnl, pkgconfig, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl }: + +stdenv.mkDerivation rec { + name = "i3status-2.13"; + + src = fetchurl { + url = "https://i3wm.org/i3status/${name}.tar.bz2"; + sha256 = "0rhlzb96mw64z2jnhwz9nibc7pxg549626lz5642xxk5hpzwk2ff"; + }; + + nativeBuildInputs = [ pkgconfig asciidoc xmlto docbook_xml_dtd_45 docbook_xsl ]; + buildInputs = [ libconfuse yajl alsaLib libpulseaudio libnl ]; + + makeFlags = [ "all" "PREFIX=$(out)" ]; + + # This hack is needed because for unknown reasons configure generates a broken makefile on the 2.13 release under nixos + preBuild = '' + sed -i -e 's/\$(TEST_LOGS) \$(TEST_LOGS/\$(TEST_LOGS)/g' Makefile + ''; + + meta = { + description = "Generates a status line for i3bar, dzen2, xmobar or lemonbar"; + homepage = https://i3wm.org; + maintainers = [ ]; + license = stdenv.lib.licenses.bsd3; + platforms = stdenv.lib.platforms.all; + }; + +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/wk-switch.nix b/nixpkgs/pkgs/applications/window-managers/i3/wk-switch.nix new file mode 100644 index 000000000000..5b1cdbe05f5d --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/wk-switch.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, python3Packages }: + +python3Packages.buildPythonApplication rec { + pname = "i3-wk-switch"; + version = "2019-05-10"; + + src = fetchFromGitHub { + owner = "tmfink"; + repo = pname; + rev = "05a2d5d35e9841d2a26630f1866fc0a0e8e708eb"; + sha256 = "0ln192abdqrrs7rdazp9acbji2y6pf68z2d1by4nf2q529dh24dc"; + }; + + propagatedBuildInputs = with python3Packages; [ i3ipc ]; + + dontBuild = true; + doCheck = false; + + installPhase = '' + mkdir -p "$out/bin" + cp i3-wk-switch.py "$out/bin/i3-wk-switch" + ''; + + meta = with stdenv.lib; { + description = "XMonad-like workspace switching for i3 and sway"; + maintainers = with maintainers; [ synthetica ]; + platforms = platforms.linux; + license = licenses.mit; + homepage = https://travisf.net/i3-wk-switcher; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/i3/wmfocus.nix b/nixpkgs/pkgs/applications/window-managers/i3/wmfocus.nix new file mode 100644 index 000000000000..c4e22546d1c4 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/i3/wmfocus.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, rustPlatform +, xorg, python3, pkgconfig, cairo, libxkbcommon }: + +rustPlatform.buildRustPackage rec { + pname = "wmfocus"; + version = "1.1.3"; + + src = fetchFromGitHub { + owner = "svenstaro"; + repo = pname; + rev = version; + sha256 = "17qdsqp9072yr7rcm6g1h620rff95ldawr8ldpkbjmkh0rc86skn"; + }; + + cargoSha256 = "1nsdvzrsgprwq7lsvfpymqslhggdzfk3840y8x92qjb0l2g4jhw1"; + + nativeBuildInputs = [ python3 pkgconfig ]; + buildInputs = [ cairo libxkbcommon xorg.xcbutilkeysyms ]; + + # For now, this is the only available featureset. This is also why the file is + # in the i3 folder, even though it might be useful for more than just i3 + # users. + cargoBuildFlags = [ "--features i3" ]; + + meta = with stdenv.lib; { + description = "Visually focus windows by label"; + homepage = "https://github.com/svenstaro/wmfocus"; + license = licenses.mit; + maintainers = with maintainers; [ synthetica ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/icewm/default.nix b/nixpkgs/pkgs/applications/window-managers/icewm/default.nix new file mode 100644 index 000000000000..58fa0d194e11 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/icewm/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchFromGitHub, cmake, gettext, perl, asciidoc +, libjpeg, libtiff, libungif, libpng, imlib, expat +, freetype, fontconfig, pkgconfig, gdk-pixbuf +, mkfontdir, libX11, libXft, libXext, libXinerama +, libXrandr, libICE, libSM, libXpm, libXdmcp, libxcb +, libpthreadstubs, pcre, libXdamage, libXcomposite, libXfixes +, libsndfile, fribidi }: + +stdenv.mkDerivation rec { + pname = "icewm"; + version = "1.6.3"; + + src = fetchFromGitHub { + owner = "bbidulock"; + repo = "icewm"; + rev = version; + sha256 = "0h3w718x28fd4sz36ka9wpgcb98scna6qpycxzls4cjji3rjgm0l"; + }; + + nativeBuildInputs = [ cmake pkgconfig perl asciidoc ]; + + buildInputs = [ + gettext libjpeg libtiff libungif libpng imlib expat + freetype fontconfig gdk-pixbuf mkfontdir libX11 + libXft libXext libXinerama libXrandr libICE libSM libXpm + libXdmcp libxcb libpthreadstubs pcre libsndfile fribidi + libXdamage libXcomposite libXfixes + ]; + + cmakeFlags = [ "-DPREFIX=$out" "-DCFGDIR=/etc/icewm" ]; + + # install legacy themes + postInstall = '' + cp -r ../lib/themes/{gtk2,Natural,nice,nice2,warp3,warp4,yellowmotif} $out/share/icewm/themes/ + ''; + + meta = with stdenv.lib; { + description = "A simple, lightweight X window manager"; + longDescription = '' + IceWM is a window manager for the X Window System. The goal of + IceWM is speed, simplicity, and not getting in the user's way. + ''; + homepage = http://www.icewm.org/; + license = licenses.lgpl2; + maintainers = [ maintainers.AndersonTorres ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/ion-3/default.nix b/nixpkgs/pkgs/applications/window-managers/ion-3/default.nix new file mode 100644 index 000000000000..073af3bfd053 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/ion-3/default.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchurl, xlibsWrapper, lua, gettext, groff }: + +stdenv.mkDerivation { + name = "ion-3-20090110"; + meta = { + description = "Tiling tabbed window manager designed with keyboard users in mind"; + homepage = http://modeemi.fi/~tuomov/ion; + platforms = with stdenv.lib.platforms; linux; + license = stdenv.lib.licenses.lgpl21; + }; + src = fetchurl { + url = http://tuomov.iki.fi/software/dl/ion-3-20090110.tar.gz; + sha256 = "1nkks5a95986nyfkxvg2rik6zmwx0lh7szd5fji7yizccwzc9xns"; + }; + buildInputs = [ xlibsWrapper lua gettext groff ]; + buildFlags = [ "LUA_DIR=${lua}" "X11_PREFIX=/no-such-path" "PREFIX=\${out}" ]; + installFlags = [ "PREFIX=\${out}" ]; +} diff --git a/nixpkgs/pkgs/applications/window-managers/jwm/default.nix b/nixpkgs/pkgs/applications/window-managers/jwm/default.nix new file mode 100644 index 000000000000..3668b344be50 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/jwm/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, pkgconfig, automake, autoconf, libtool, + gettext, which, xorg, libX11, libXext, libXinerama, libXpm, libXft, + libXau, libXdmcp, libXmu, libpng, libjpeg, expat, xorgproto, + librsvg, freetype, fontconfig }: + +stdenv.mkDerivation rec { + pname = "jwm"; + version = "1685"; + + src = fetchFromGitHub { + owner = "joewing"; + repo = "jwm"; + rev = "s${version}"; + sha256 = "1kyvy022sij898g2hm5spy5vq0kw6aqd7fsnawl2xyh06gwh29wg"; + }; + + nativeBuildInputs = [ pkgconfig automake autoconf libtool gettext which ]; + + buildInputs = [ libX11 libXext libXinerama libXpm libXft xorg.libXrender + libXau libXdmcp libXmu libpng libjpeg expat xorgproto + librsvg freetype fontconfig ]; + + enableParallelBuilding = true; + + preConfigure = "./autogen.sh"; + + meta = { + homepage = http://joewing.net/projects/jwm/; + description = "Joe's Window Manager is a light-weight X11 window manager"; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.unix; + maintainers = [ stdenv.lib.maintainers.romildo ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/jwm/jwm-settings-manager.nix b/nixpkgs/pkgs/applications/window-managers/jwm/jwm-settings-manager.nix new file mode 100644 index 000000000000..db33b27ddd81 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/jwm/jwm-settings-manager.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchFromGitHub, cmake, pkgconfig, gettext, libXpm, libGL, fltk, hicolor-icon-theme, glib, gnome2, which }: + +stdenv.mkDerivation { + pname = "jwm-settings-manager"; + version = "2018-10-19"; + + src = fetchFromGitHub { + owner = "Israel-D"; + repo = "jwm-settings-manager"; + rev = "cb32a70563cf1f3927339093481542b85ec3c8c8"; + sha256 = "0d5bqf74p8zg8azns44g46q973blhmp715k8kcd73x88g7sfir8s"; + }; + + nativeBuildInputs = [ + cmake + pkgconfig + gettext + ]; + + buildInputs = [ + libXpm + libGL + fltk + hicolor-icon-theme + which # needed at runtime to locate optional programs + glib.bin # provides gsettings + gnome2.GConf # provides gconftool-2 + ]; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace 'CMAKE_INSTALL_PREFIX "/usr"' "CMAKE_INSTALL_PREFIX $out" + substituteInPlace data/CMakeLists.txt \ + --replace 'DESTINATION usr/share' "DESTINATION share" + ''; + + meta = with stdenv.lib; { + description = "A full configuration manager for JWM"; + homepage = https://joewing.net/projects/jwm; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = [ maintainers.romildo ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/kbdd/default.nix b/nixpkgs/pkgs/applications/window-managers/kbdd/default.nix new file mode 100644 index 000000000000..bcfcbe3c5f52 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/kbdd/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, pkgconfig, dbus-glib, autoreconfHook, xorg }: + +stdenv.mkDerivation { + pname = "kbdd"; + version = "unstable-2017-01-29"; + + src = fetchFromGitHub { + owner = "qnikst"; + repo = "kbdd"; + rev = "0e1056f066ab6e3c74fd0db0c9710a9a2b2538c3"; + sha256 = "068iqkqxh7928xlmz2pvnykszn9bcq2qgkkiwf37k1vm8fdmgzlj"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + buildInputs = [ xorg.libX11 dbus-glib ]; + + meta = { + description = "Simple daemon and library to make per window layout using XKB"; + homepage = https://github.com/qnikst/kbdd; + license = stdenv.lib.licenses.gpl3; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.wedens ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/larswm/default.nix b/nixpkgs/pkgs/applications/window-managers/larswm/default.nix new file mode 100644 index 000000000000..f6f3132178c5 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/larswm/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, imake, gccmakedep, libX11, libXext, libXmu }: + +stdenv.mkDerivation { + name = "larswm-7.5.3"; + + src = fetchurl { + url = mirror://sourceforge/larswm/larswm-7.5.3.tar.gz; + sha256 = "1xmlx9g1nhklxjrg0wvsya01s4k5b9fphnpl9zdwp29mm484ni3v"; + }; + + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ libX11 libXext libXmu ]; + + makeFlags = [ "BINDIR=$(out)/bin" "MANPATH=$(out)/share/man" ]; + installTargets = [ "install" "install.man" ]; + + meta = { + homepage = http://www.fnurt.net/larswm; + description = "9wm-like tiling window manager"; + license = stdenv.lib.licenses.free; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/leftwm/default.nix b/nixpkgs/pkgs/applications/window-managers/leftwm/default.nix new file mode 100644 index 000000000000..ade3904b95c2 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/leftwm/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, rustPlatform, libX11, libXinerama, makeWrapper }: + +let + rpath = stdenv.lib.makeLibraryPath [ libXinerama libX11 ]; +in + +rustPlatform.buildRustPackage rec { + pname = "leftwm"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "leftwm"; + repo = "leftwm"; + rev = version; + sha256 = "0x8cqc7zay19jxy7cshayjjwwjrcblqpmqrxipm2g5hhyjghk6q0"; + }; + + cargoSha256 = "1kphv3vnr8ij7raf0niwz3rwly986xi5fgwqg2ya0r46ifqkgvrc"; + + buildInputs = [ makeWrapper libX11 libXinerama ]; + + postInstall = '' + wrapProgram $out/bin/leftwm --prefix LD_LIBRARY_PATH : "${rpath}" + wrapProgram $out/bin/leftwm-state --prefix LD_LIBRARY_PATH : "${rpath}" + wrapProgram $out/bin/leftwm-worker --prefix LD_LIBRARY_PATH : "${rpath}" + ''; + + meta = with stdenv.lib; { + description = "Leftwm - A tiling window manager for the adventurer"; + homepage = "https://github.com/leftwm/leftwm"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ mschneider ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/lemonbar/default.nix b/nixpkgs/pkgs/applications/window-managers/lemonbar/default.nix new file mode 100644 index 000000000000..9d6e0f27f934 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/lemonbar/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, perl, libxcb }: + +stdenv.mkDerivation { + name = "lemonbar-1.3"; + + src = fetchurl { + url = "https://github.com/LemonBoy/bar/archive/v1.3.tar.gz"; + sha256 = "0zd3v8ys4jzi60pm3wq7p3pbbd5y0acimgiq46qx1ckmwg2q9rza"; + }; + + buildInputs = [ libxcb perl ]; + + prePatch = ''sed -i "s@/usr@$out@" Makefile''; + + meta = with stdenv.lib; { + description = "A lightweight xcb based bar"; + homepage = https://github.com/LemonBoy/bar; + maintainers = [ maintainers.meisternu ]; + license = "Custom"; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/lemonbar/xft.nix b/nixpkgs/pkgs/applications/window-managers/lemonbar/xft.nix new file mode 100644 index 000000000000..ff34f1dfee78 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/lemonbar/xft.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchFromGitHub, perl, libxcb, libXft }: + +stdenv.mkDerivation { + name = "lemonbar-xft-unstable-2016-02-17"; + + src = fetchFromGitHub { + owner = "krypt-n"; + repo = "bar"; + rev = "a43b801ddc0f015ce8b1211f4c062fad12cd63a9"; + sha256 = "0iqas07qjvabxyvna2m9aj5bcwnkdii1izl9jxha63vz0zlsc4gd"; + }; + + buildInputs = [ libxcb libXft perl ]; + + prePatch = ''sed -i "s@/usr@$out@" Makefile''; + + meta = { + description = "A lightweight xcb based bar with XFT-support"; + homepage = https://github.com/krypt-n/bar; + license = "Custom"; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/matchbox/default.nix b/nixpkgs/pkgs/applications/window-managers/matchbox/default.nix new file mode 100644 index 000000000000..3c537d6c931b --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/matchbox/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, pkgconfig, libmatchbox, libX11, libXext }: + +stdenv.mkDerivation rec { + pname = "matchbox"; + version = "1.2"; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libmatchbox ]; + NIX_LDFLAGS = "-lX11 -L${libX11}/lib -lXext -L${libXext}/lib"; + + src = fetchurl { + url = "https://downloads.yoctoproject.org/releases/matchbox/matchbox-window-manager/${version}/matchbox-window-manager-${version}.tar.bz2"; + sha256 = "1zyfq438b466ygcz78nvsmnsc5bhg4wcfnpxb43kbkwpyx53m8l1"; + }; + + meta = { + description = "X window manager for non-desktop embedded systems"; + homepage = "https://www.yoctoproject.org/software-item/matchbox/"; + license = stdenv.lib.licenses.gpl2Plus; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/neocomp/default.nix b/nixpkgs/pkgs/applications/window-managers/neocomp/default.nix new file mode 100644 index 000000000000..026ee2e1287e --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/neocomp/default.nix @@ -0,0 +1,85 @@ +{ stdenv +, fetchFromGitHub +, asciidoc +, docbook_xml_dtd_45 +, docbook_xsl +, freetype +, judy +, libGL +, libconfig +, libdrm +, libxml2 +, libxslt +, libXcomposite +, libXdamage +, libXext +, libXinerama +, libXrandr +, libXrender +, pcre +, pkgconfig +}: +let + rev = "v0.6-17-g271e784"; +in +stdenv.mkDerivation rec { + pname = "neocomp-unstable"; + version = "2019-03-12"; + + src = fetchFromGitHub { + inherit rev; + owner = "DelusionalLogic"; + repo = "NeoComp"; + sha256 = "1mp338vz1jm5pwf7pi5azx4hzykmvpkwzx1kw6a9anj272f32zpg"; + }; + + buildInputs = [ + asciidoc + docbook_xml_dtd_45 + docbook_xsl + freetype + judy + libGL + libconfig + libdrm + libxml2 + libxslt + libXcomposite + libXdamage + libXext + libXinerama + libXrandr + libXrender + pcre + pkgconfig + ]; + + makeFlags = [ + "PREFIX=${placeholder "out"}" + "CFGDIR=${placeholder "out"}/etc/xdg/neocomp" + "ASTDIR=${placeholder "out"}/share/neocomp/assets" + "COMPTON_VERSION=git-${rev}-${version}" + ]; + + postPatch = '' + substituteInPlace src/compton.c --replace \ + "assets_add_path(\"./assets/\");" \ + "assets_add_path(\"$out/share/neocomp/assets/\");" + substituteInPlace src/assets/assets.c --replace \ + "#define MAX_PATH_LENGTH 64" \ + "#define MAX_PATH_LENGTH 128" + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/DelusionalLogic/NeoComp; + license = licenses.gpl3; + maintainers = with maintainers; [ twey ]; + platforms = platforms.linux; + description = "A fork of Compton, a compositor for X11"; + longDescription = '' + NeoComp is a (hopefully) fast and (hopefully) simple compositor + for X11, focused on delivering frames from the window to the + framebuffer as quickly as possible. + ''; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/notion/default.nix b/nixpkgs/pkgs/applications/window-managers/notion/default.nix new file mode 100644 index 000000000000..2b9e8237a045 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/notion/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, pkgconfig +, lua, gettext, which, groff, xmessage, xterm +, readline, fontconfig, libX11, libXext, libSM +, libXinerama, libXrandr, libXft +, xlibsWrapper, makeWrapper +}: + +stdenv.mkDerivation rec{ + pname = "notion"; + version = "3-2019050101"; + + src = fetchFromGitHub { + owner = "raboof"; + repo = pname; + rev = version; + sha256 = "09kvgqyw0gnj3jhz9gmwq81ak8qy32vyanx1hw79r6m181aysspz"; + }; + + nativeBuildInputs = [ pkgconfig makeWrapper groff ]; + buildInputs = [ lua gettext which readline fontconfig libX11 libXext libSM + libXinerama libXrandr libXft xlibsWrapper ]; + + buildFlags = [ "CC=cc" "LUA_DIR=${lua}" "X11_PREFIX=/no-such-path" ]; + + makeFlags = [ "PREFIX=\${out}" ]; + + postInstall = '' + wrapProgram $out/bin/notion \ + --prefix PATH ":" "${xmessage}/bin:${xterm}/bin" \ + ''; + + meta = with stdenv.lib; { + description = "Tiling tabbed window manager, follow-on to the Ion"; + homepage = "https://notionwm.net/"; + license = licenses.lgpl21; + maintainers = with maintainers; [ jfb AndersonTorres ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/openbox/default.nix b/nixpkgs/pkgs/applications/window-managers/openbox/default.nix new file mode 100644 index 000000000000..c8d526b6d288 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/openbox/default.nix @@ -0,0 +1,57 @@ +{ stdenv, fetchurl, pkgconfig, python2 +, libxml2, libXinerama, libXcursor, libXau, libXrandr, libICE, libSM +, imlib2, pango, libstartup_notification, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "openbox"; + version = "3.6.1"; + + nativeBuildInputs = [ + pkgconfig + makeWrapper + python2.pkgs.wrapPython + ]; + + buildInputs = [ + libxml2 + libXinerama libXcursor libXau libXrandr libICE libSM + libstartup_notification + ]; + + propagatedBuildInputs = [ + pango imlib2 + ]; + + pythonPath = with python2.pkgs; [ + pyxdg + ]; + + src = fetchurl { + url = "http://openbox.org/dist/openbox/${pname}-${version}.tar.gz"; + sha256 = "1xvyvqxlhy08n61rjkckmrzah2si1i7nmc7s8h07riqq01vc0jlb"; + }; + + setlayoutSrc = fetchurl { + url = "http://openbox.org/dist/tools/setlayout.c"; + sha256 = "1ci9lq4qqhl31yz1jwwjiawah0f7x0vx44ap8baw7r6rdi00pyiv"; + }; + + postBuild = "gcc -O2 -o setlayout $(pkg-config --cflags --libs x11) $setlayoutSrc"; + + # Openbox needs XDG_DATA_DIRS set or it can't find its default theme + postInstall = '' + cp -a setlayout "$out"/bin + wrapProgram "$out/bin/openbox" --prefix XDG_DATA_DIRS : "$out/share" + wrapProgram "$out/bin/openbox-session" --prefix XDG_DATA_DIRS : "$out/share" + wrapProgram "$out/bin/openbox-gnome-session" --prefix XDG_DATA_DIRS : "$out/share" + wrapProgram "$out/bin/openbox-kde-session" --prefix XDG_DATA_DIRS : "$out/share" + wrapPythonProgramsIn "$out/libexec" "$out $pythonPath" + ''; + + meta = { + description = "X window manager for non-desktop embedded systems"; + homepage = http://openbox.org/; + license = stdenv.lib.licenses.gpl2Plus; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/oroborus/default.nix b/nixpkgs/pkgs/applications/window-managers/oroborus/default.nix new file mode 100644 index 000000000000..d449fc91c0d3 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/oroborus/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, pkgconfig +, freetype, fribidi +, libSM, libICE, libXt, libXaw, libXmu +, libXext, libXft, libXpm, libXrandr +, libXrender, xorgproto, libXinerama }: + +with stdenv.lib; +stdenv.mkDerivation rec { + + pname = "oroborus"; + version = "2.0.20"; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ freetype fribidi libSM libICE libXt libXaw libXmu libXext + libXft libXpm libXrandr libXrender xorgproto libXinerama ]; + + src = fetchurl { + url = "http://ftp.debian.org/debian/pool/main/o/oroborus/oroborus_${version}.tar.gz"; + sha256 = "12bvk8x8rfnymbfbwmdcrd9g8m1zxbcq7rgvfdkjr0gnpi0aa82j"; + }; + + meta = { + description = "A really minimalistic X window manager"; + homepage = https://www.oroborus.org/; + license = licenses.gpl2Plus; + maintainers = [ maintainers.AndersonTorres ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/pekwm/default.nix b/nixpkgs/pkgs/applications/window-managers/pekwm/default.nix new file mode 100644 index 000000000000..38255dce7224 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/pekwm/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchurl, pkgconfig +, libpng, libjpeg +, libXext, libXft, libXpm, libXrandr, libXinerama }: + +stdenv.mkDerivation rec { + + pname = "pekwm"; + version = "0.1.17"; + + src = fetchurl { + url = "https://www.pekwm.org/projects/pekwm/files/${pname}-${version}.tar.bz2"; + sha256 = "003x6bxj1lb2ljxz3v414bn0rdl6z68c0r185fxwgs1qkyzx67wa"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libpng libjpeg + libXext libXft libXpm libXrandr libXinerama ]; + + meta = with stdenv.lib; { + description = "A lightweight window manager"; + longDescription = '' + pekwm is a window manager that once upon a time was based on the + aewm++ window manager, but it has evolved enough that it no + longer resembles aewm++ at all. It has a much expanded + feature-set, including window grouping (similar to ion, pwm, or + fluxbox), autoproperties, xinerama, keygrabber that supports + keychains, and much more. + - Lightweight and Unobtrusive, a window manager shouldn't be + noticed. + - Very configurable, we all work and think in different ways. + - Automatic properties, for all the lazy people, make things + appear as they should when starting applications. + - Chainable Keygrabber, usability for everyone. + ''; + homepage = http://www.pekwm.org; + license = licenses.gpl2; + maintainers = [ maintainers.AndersonTorres ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/picom/default.nix b/nixpkgs/pkgs/applications/window-managers/picom/default.nix new file mode 100644 index 000000000000..ad5f73ab1739 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/picom/default.nix @@ -0,0 +1,65 @@ +{ stdenv, lib, fetchFromGitHub, pkgconfig, uthash, asciidoc, docbook_xml_dtd_45 +, docbook_xsl, libxslt, libxml2, makeWrapper, meson, ninja +, xorgproto, libxcb ,xcbutilrenderutil, xcbutilimage, pixman, libev +, dbus, libconfig, libdrm, libGL, pcre, libX11 +, libXinerama, libXext, xwininfo, libxdg_basedir }: + +stdenv.mkDerivation rec { + pname = "picom"; + version = "7.5"; + + src = fetchFromGitHub { + owner = "yshui"; + repo = "picom"; + rev = "v${version}"; + sha256 = "1l48fxl04vkzr4r94sl37nbbw7a621rn8sxmkbdv4252i1gjxd4z"; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + meson ninja + pkgconfig + uthash + asciidoc + docbook_xml_dtd_45 + docbook_xsl + makeWrapper + ]; + + buildInputs = [ + dbus libX11 libXext + xorgproto + libXinerama libdrm pcre libxml2 libxslt libconfig libGL + libxcb xcbutilrenderutil xcbutilimage + pixman libev + libxdg_basedir + ]; + + NIX_CFLAGS_COMPILE = "-fno-strict-aliasing"; + + mesonFlags = [ + "-Dbuild_docs=true" + ]; + + installFlags = [ "PREFIX=$(out)" ]; + + postInstall = '' + wrapProgram $out/bin/picom-trans \ + --prefix PATH : ${lib.makeBinPath [ xwininfo ]} + ''; + + meta = with lib; { + description = "A fork of XCompMgr, a sample compositing manager for X servers"; + longDescription = '' + A fork of XCompMgr, which is a sample compositing manager for X + servers supporting the XFIXES, DAMAGE, RENDER, and COMPOSITE + extensions. It enables basic eye-candy effects. This fork adds + additional features, such as additional effects, and a fork at a + well-defined and proper place. + ''; + license = licenses.mit; + homepage = "https://github.com/yshui/picom"; + maintainers = with maintainers; [ ertes enzime twey ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/qtile/0001-Substitution-vars-for-absolute-paths.patch b/nixpkgs/pkgs/applications/window-managers/qtile/0001-Substitution-vars-for-absolute-paths.patch new file mode 100644 index 000000000000..219d6dcbe207 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/qtile/0001-Substitution-vars-for-absolute-paths.patch @@ -0,0 +1,30 @@ +diff --git a/libqtile/pangocffi.py b/libqtile/pangocffi.py +index 1e8f5c04..e860d43a 100644 +--- a/libqtile/pangocffi.py ++++ b/libqtile/pangocffi.py +@@ -58,9 +58,9 @@ except ImportError: + else: + raise ImportError("No module named libqtile._ffi_pango, be sure to run `python ./libqtile/ffi_build.py`") + +-gobject = ffi.dlopen('libgobject-2.0.so.0') +-pango = ffi.dlopen('libpango-1.0.so.0') +-pangocairo = ffi.dlopen('libpangocairo-1.0.so.0') ++gobject = ffi.dlopen('@glib@/lib/libgobject-2.0.so.0') ++pango = ffi.dlopen('@pango@/lib/libpango-1.0.so.0') ++pangocairo = ffi.dlopen('@pango@/lib/libpangocairo-1.0.so.0') + + + def CairoContext(cairo_t): +diff --git a/libqtile/xcursors.py b/libqtile/xcursors.py +index f1133555..3e61204a 100644 +--- a/libqtile/xcursors.py ++++ b/libqtile/xcursors.py +@@ -112,7 +112,7 @@ class Cursors(dict): + + def _setup_xcursor_binding(self): + try: +- xcursor = ffi.dlopen('libxcb-cursor.so.0') ++ xcursor = ffi.dlopen('@xcb-cursor@/lib/libxcb-cursor.so.0') + except OSError: + logger.warning("xcb-cursor not found, fallback to font pointer") + return False diff --git a/nixpkgs/pkgs/applications/window-managers/qtile/0002-Restore-PATH-and-PYTHONPATH.patch b/nixpkgs/pkgs/applications/window-managers/qtile/0002-Restore-PATH-and-PYTHONPATH.patch new file mode 100644 index 000000000000..a01f14062f1d --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/qtile/0002-Restore-PATH-and-PYTHONPATH.patch @@ -0,0 +1,60 @@ +diff --git a/bin/qshell b/bin/qshell +index 2ba7e61c..0ac2a2ef 100755 +--- a/bin/qshell ++++ b/bin/qshell +@@ -28,5 +28,6 @@ base_dir = os.path.abspath(os.path.join(this_dir, "..")) + sys.path.insert(0, base_dir) + + if __name__ == '__main__': ++ __import__("importlib").import_module("libqtile.utils").restore_os_environment() + from libqtile.scripts import qshell + qshell.main() +diff --git a/bin/qtile b/bin/qtile +index 3e82814d..335b5cea 100755 +--- a/bin/qtile ++++ b/bin/qtile +@@ -29,5 +29,6 @@ base_dir = os.path.abspath(os.path.join(this_dir, "..")) + sys.path.insert(0, base_dir) + + if __name__ == '__main__': ++ __import__("importlib").import_module("libqtile.utils").restore_os_environment() + from libqtile.scripts import qtile + qtile.main() +diff --git a/bin/qtile-run b/bin/qtile-run +index e4b121be..1c203bc9 100755 +--- a/bin/qtile-run ++++ b/bin/qtile-run +@@ -8,5 +8,6 @@ base_dir = os.path.abspath(os.path.join(this_dir, "..")) + sys.path.insert(0, base_dir) + + if __name__ == '__main__': ++ __import__("importlib").import_module("libqtile.utils").restore_os_environment() + from libqtile.scripts import qtile_run + qtile_run.main() +diff --git a/bin/qtile-top b/bin/qtile-top +index 5316e0e7..272c6430 100755 +--- a/bin/qtile-top ++++ b/bin/qtile-top +@@ -8,5 +8,6 @@ base_dir = os.path.abspath(os.path.join(this_dir, "..")) + sys.path.insert(0, base_dir) + + if __name__ == '__main__': ++ __import__("importlib").import_module("libqtile.utils").restore_os_environment() + from libqtile.scripts import qtile_top + qtile_top.main() +diff --git a/libqtile/utils.py b/libqtile/utils.py +index 550ed02677e..1358a66f3df 100644 +--- a/libqtile/utils.py ++++ b/libqtile/utils.py +@@ -272,3 +272,11 @@ def safe_import(module_names, class_name, globals_, fallback=None): + logger.debug("%s", traceback.format_exc()) + if fallback: + globals_[class_name] = fallback(module_path, class_name, error) ++ ++ ++def restore_os_environment(): ++ pythonpath = os.environ.pop("QTILE_SAVED_PYTHONPATH", "") ++ os.environ["PYTHONPATH"] = pythonpath ++ path = os.environ.pop("QTILE_SAVED_PATH", None) ++ if path: ++ os.environ["PATH"] = path diff --git a/nixpkgs/pkgs/applications/window-managers/qtile/0003-Restart-executable.patch b/nixpkgs/pkgs/applications/window-managers/qtile/0003-Restart-executable.patch new file mode 100644 index 000000000000..87fd19773794 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/qtile/0003-Restart-executable.patch @@ -0,0 +1,13 @@ +diff --git a/libqtile/manager.py b/libqtile/manager.py +index fc198e9bae7..860b97d8db1 100644 +--- a/libqtile/manager.py ++++ b/libqtile/manager.py +@@ -1402,7 +1402,7 @@ class Qtile(command.CommandObject): + logger.error("Unable to pickle qtile state") + argv = [s for s in argv if not s.startswith('--with-state')] + argv.append('--with-state=' + buf.getvalue().decode()) +- self._restart = (sys.executable, argv) ++ self._restart = (os.environ.get("QTILE_WRAPPER", "@out@/bin/qtile"), argv[1:]) + self.stop() + + def cmd_spawn(self, cmd): diff --git a/nixpkgs/pkgs/applications/window-managers/qtile/default.nix b/nixpkgs/pkgs/applications/window-managers/qtile/default.nix new file mode 100644 index 000000000000..6d0e6bdac45e --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/qtile/default.nix @@ -0,0 +1,53 @@ +{ stdenv, fetchFromGitHub, python37Packages, glib, cairo, pango, pkgconfig, libxcb, xcbutilcursor }: + +let cairocffi-xcffib = python37Packages.cairocffi.override { + withXcffib = true; + }; +in + +python37Packages.buildPythonApplication rec { + name = "qtile-${version}"; + version = "0.13.0"; + + src = fetchFromGitHub { + owner = "qtile"; + repo = "qtile"; + rev = "v${version}"; + sha256 = "1lyclnn8hs6wl4w9v5b4hh2q0pvmsn7cyibpskhbpw0cgv7bvi90"; + }; + + patches = [ + ./0001-Substitution-vars-for-absolute-paths.patch + ./0002-Restore-PATH-and-PYTHONPATH.patch + ./0003-Restart-executable.patch + ]; + + postPatch = '' + substituteInPlace libqtile/manager.py --subst-var-by out $out + substituteInPlace libqtile/pangocffi.py --subst-var-by glib ${glib.out} + substituteInPlace libqtile/pangocffi.py --subst-var-by pango ${pango.out} + substituteInPlace libqtile/xcursors.py --subst-var-by xcb-cursor ${xcbutilcursor.out} + ''; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ glib libxcb cairo pango python37Packages.xcffib ]; + + pythonPath = with python37Packages; [ xcffib cairocffi-xcffib setuptools ]; + + postInstall = '' + wrapProgram $out/bin/qtile \ + --run 'export QTILE_WRAPPER=$0' \ + --run 'export QTILE_SAVED_PYTHONPATH=$PYTHONPATH' \ + --run 'export QTILE_SAVED_PATH=$PATH' + ''; + + doCheck = false; # Requires X server. + + meta = with stdenv.lib; { + homepage = http://www.qtile.org/; + license = licenses.mit; + description = "A small, flexible, scriptable tiling window manager written in Python"; + platforms = platforms.linux; + maintainers = with maintainers; [ kamilchm ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/ratpoison/default.nix b/nixpkgs/pkgs/applications/window-managers/ratpoison/default.nix new file mode 100644 index 000000000000..11a69020ee62 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/ratpoison/default.nix @@ -0,0 +1,58 @@ +{ stdenv, fetchurl, pkgconfig, perl, autoconf, automake +, libX11, xorgproto, libXt, libXpm, libXft, libXtst, libXi +, libXrandr, fontconfig, freetype, readline +}: + +stdenv.mkDerivation rec { + pname = "ratpoison"; + version = "1.4.9"; + + src = fetchurl { + url = "mirror://savannah/ratpoison/${pname}-${version}.tar.xz"; + sha256 = "1wfir1gvh5h7izgvx2kd1pr2k7wlncd33zq7qi9s9k2y0aza93yr"; + }; + + outputs = [ "out" "contrib" "man" "doc" "info" ]; + + configureFlags = [ + # >=1.4.9 requires this even with readline in inputs + "--enable-history" + ]; + + nativeBuildInputs = [ pkgconfig autoconf automake ]; + + buildInputs = + [ perl + libX11 xorgproto libXt libXpm libXft libXtst libXi libXrandr + fontconfig freetype readline ]; + + postInstall = '' + mkdir -p $contrib/{bin,share} + mv $out/bin/rpws $contrib/bin + mv $out/share/ratpoison $contrib/share + ''; + + meta = with stdenv.lib; { + homepage = https://www.nongnu.org/ratpoison/; + description = "Simple mouse-free tiling window manager"; + license = licenses.gpl2Plus; + + longDescription = '' + Ratpoison is a simple window manager with no fat library + dependencies, no fancy graphics, no window decorations, and no + rodent dependence. It is largely modelled after GNU Screen which + has done wonders in the virtual terminal market. + + The screen can be split into non-overlapping frames. All windows + are kept maximized inside their frames to take full advantage of + your precious screen real estate. + + All interaction with the window manager is done through keystrokes. + Ratpoison has a prefix map to minimize the key clobbering that + cripples Emacs and other quality pieces of software. + ''; + + platforms = platforms.unix; + maintainers = [ maintainers.AndersonTorres ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/sawfish/default.nix b/nixpkgs/pkgs/applications/window-managers/sawfish/default.nix new file mode 100644 index 000000000000..f9bcb28e4557 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/sawfish/default.nix @@ -0,0 +1,54 @@ +{ stdenv, fetchurl +, pkgconfig, which, autoreconfHook +, rep-gtk, pango, gdk-pixbuf +, imlib, gettext, texinfo +, libXinerama, libXrandr, libXtst, libICE, libSM +, makeWrapper +}: + +with stdenv.lib; + +stdenv.mkDerivation rec { + + pname = "sawfish"; + version = "1.12.90"; + sourceName = "sawfish_${version}"; + + src = fetchurl { + url = "https://download.tuxfamily.org/sawfish/${sourceName}.tar.xz"; + sha256 = "18p8srqqj9vjffg13qhspfz2gr1h4vfs10qzlv89g76r289iam31"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + buildInputs = [ which + rep-gtk pango gdk-pixbuf imlib gettext texinfo + libXinerama libXrandr libXtst libICE libSM + makeWrapper ]; + + patchPhase = '' + sed -e 's|REP_DL_LOAD_PATH=|REP_DL_LOAD_PATH=$(REP_DL_LOAD_PATH):|g' -i Makedefs.in + sed -e 's|$(repexecdir)|$(libdir)/rep|g' -i src/Makefile.in + ''; + + postInstall = '' + for i in $out/lib/sawfish/sawfish-menu $out/bin/sawfish-about $out/bin/sawfish-client $out/bin/sawfish-config $out/bin/sawfish; do + wrapProgram $i \ + --prefix REP_DL_LOAD_PATH : "$out/lib/rep" \ + --set REP_LOAD_PATH "$out/share/sawfish/lisp" + done + ''; + + meta = { + description = "An extensible, Lisp-based window manager"; + longDescription = '' + Sawfish is an extensible window manager using a Lisp-based scripting language. + Its policy is very minimal compared to most window managers. Its aim is simply + to manage windows in the most flexible and attractive manner possible. + All high-level WM functions are implemented in Lisp for future extensibility + or redefinition. + ''; + homepage = http://sawfish.wikia.com; + license = licenses.gpl2; + maintainers = [ maintainers.AndersonTorres ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/spectrwm/default.nix b/nixpkgs/pkgs/applications/window-managers/spectrwm/default.nix new file mode 100644 index 000000000000..1eb19e2de6f9 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/spectrwm/default.nix @@ -0,0 +1,62 @@ +{ fetchurl +, libX11 +, libXrandr +, libXcursor +, libXft +, libXt +, libxcb +, xcbutil +, xcb-util-cursor +, xcbutilkeysyms +, xcbutilwm +, stdenv +}: + +stdenv.mkDerivation { + pname = "spectrwm"; + version = "2.7.2"; + + src = fetchurl { + url = "https://github.com/conformal/spectrwm/archive/SPECTRWM_2_7_2.tar.gz"; + sha256 = "1yssqnhxlfl1b60gziqp8c5pzs1lr8p6anrnp9ga1zfdql3b7993"; + }; + + + buildInputs = [ + libX11 + libxcb + libXrandr + libXcursor + libXft + libXt + xcbutil + xcb-util-cursor + xcbutilkeysyms + xcbutilwm + ]; + + sourceRoot = let + subdir = if stdenv.isDarwin then "osx" else "linux"; + in "spectrwm-SPECTRWM_2_7_2/${subdir}"; + + makeFlags = [ "PREFIX=$(out)" ]; + installPhase = "PREFIX=$out make install"; + + meta = with stdenv.lib; { + description = "A tiling window manager"; + homepage = "https://github.com/conformal/spectrwm"; + maintainers = with maintainers; [ jb55 ]; + license = licenses.isc; + platforms = platforms.all; + + longDescription = '' + spectrwm is a small dynamic tiling window manager for X11. It + tries to stay out of the way so that valuable screen real estate + can be used for much more important stuff. It has sane defaults + and does not require one to learn a language to do any + configuration. It was written by hackers for hackers and it + strives to be small, compact and fast. + ''; + }; + +} diff --git a/nixpkgs/pkgs/applications/window-managers/stalonetray/default.nix b/nixpkgs/pkgs/applications/window-managers/stalonetray/default.nix new file mode 100644 index 000000000000..f0f724d6cf0e --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/stalonetray/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, libX11, xorgproto }: + +stdenv.mkDerivation rec { + pname = "stalonetray"; + version = "0.8.3"; + + src = fetchurl { + url = "mirror://sourceforge/stalonetray/${pname}-${version}.tar.bz2"; + sha256 = "0k7xnpdb6dvx25d67v0crlr32cdnzykdsi9j889njiididc8lm1n"; + }; + + buildInputs = [ libX11 xorgproto ]; + + hardeningDisable = [ "format" ]; + + meta = with stdenv.lib; { + description = "Stand alone tray"; + homepage = http://stalonetray.sourceforge.net; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ raskin ]; + }; + + passthru = { + updateInfo = { + downloadPage = "https://sourceforge.net/projects/stalonetray/files/"; + }; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/stumpish/default.nix b/nixpkgs/pkgs/applications/window-managers/stumpish/default.nix new file mode 100644 index 000000000000..00f4b95b3f27 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/stumpish/default.nix @@ -0,0 +1,43 @@ +{ stdenv, substituteAll, fetchFromGitHub, gnused, ncurses, xorg, rlwrap }: + +stdenv.mkDerivation { + pname = "stumpish"; + version = "0.0.1"; + + src = fetchFromGitHub { + owner = "stumpwm"; + repo = "stumpwm-contrib"; + rev = "9f5f06652c480159ec57d1fd8751b16f02db06dc"; + sha256 = "1dxzsnir3158p8y2128s08r9ca0ywr9mcznivmhn1lycw8mg4nfl"; + }; + + buildInputs = [ + gnused xorg.xprop rlwrap ncurses + ]; + + patches = [ + (substituteAll { + src = ./paths.patch; + sed = "${gnused}/bin/sed"; + xprop = "${xorg.xprop}/bin/xprop"; + rlwrap = "${rlwrap}/bin/rlwrap"; + tput = "${ncurses}/bin/tput"; + }) + ]; + + buildPhase = '' + mkdir -p $out/bin + ''; + + installPhase = '' + cp util/stumpish/stumpish $out/bin + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/stumpwm/stumpwm-contrib; + description = "STUMPwm Interactive SHell"; + license = licenses.gpl2; + maintainers = [ maintainers.ebzzry ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/stumpish/paths.patch b/nixpkgs/pkgs/applications/window-managers/stumpish/paths.patch new file mode 100644 index 000000000000..d18392037015 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/stumpish/paths.patch @@ -0,0 +1,87 @@ +diff --git a/util/stumpish/stumpish b/util/stumpish/stumpish +index 830cb1b..64213dc 100755 +--- a/util/stumpish/stumpish ++++ b/util/stumpish/stumpish +@@ -28,8 +28,8 @@ then + fi + + # replace -E with -r option for old versions of GNU sed +-if ! sed -E 1p /dev/null 2>/dev/null; then +- sed() { shift; command sed -r "$@"; } ++if ! @sed@ -E 1p /dev/null 2>/dev/null; then ++ sed() { shift; command @sed@ -r "$@"; } + fi + + # parse C-style backslash sequences by default +@@ -41,9 +41,9 @@ wait_result () + { + while true + do +- RESULT=$(xprop -root -f STUMPWM_COMMAND_RESULT 8s \ ++ RESULT=$(@xprop@ -root -f STUMPWM_COMMAND_RESULT 8s \ + STUMPWM_COMMAND_RESULT 2>/dev/null | +- sed -E 's/\\([[:digit:]]+)/\\0\1/g') ++ @sed@ -E 's/\\([[:digit:]]+)/\\0\1/g') + if echo "$RESULT" | grep -v -q 'not found.$' + then + break +@@ -52,7 +52,7 @@ wait_result () + sleep $DELAY + done + +- xprop -root -remove STUMPWM_COMMAND_RESULT ++ @xprop@ -root -remove STUMPWM_COMMAND_RESULT + + if echo "$RESULT" | grep -q '= $' + then +@@ -60,7 +60,7 @@ wait_result () + fi + + echo "$RESULT" | +- sed -E 's/[^"\\n]+"// ++ @sed@ -E 's/[^"\\n]+"// + /^"[[:space:]]*$/d + s/(^|[^\\])\\n/\1\ + /g +@@ -80,7 +80,7 @@ send_cmd () + exit + fi + +- xprop -root -f STUMPWM_COMMAND 8s -set STUMPWM_COMMAND "$cmd" ++ @xprop@ -root -f STUMPWM_COMMAND 8s -set STUMPWM_COMMAND "$cmd" + + wait_result + } +@@ -123,8 +123,8 @@ tput () + local cap1=$1 cap2=$2 + shift 2 + +- command tput $cap1 $@ 2>/dev/null || +- command tput $cap2 $@ 2>/dev/null ++ command @tput@ $cap1 $@ 2>/dev/null || ++ command @tput@ $cap2 $@ 2>/dev/null + } + + READLINE=yes +@@ -156,18 +156,18 @@ then + else + if [ -t 0 ] + then +- if ! type rlwrap 2>/dev/null >&2 ++ if ! type @rlwrap@ 2>/dev/null >&2 + then + warn rlwrap not found, command completion won\'t work + elif [ $READLINE = yes ] + then + COMMANDS="${TMPDIR:-/tmp}/stumpish.commands.$$" + echo $(send_cmd "commands") | +- sed -E 's/[[:space:]]+/\ ++ @sed@ -E 's/[[:space:]]+/\ + /g' | + sort > "$COMMANDS" + trap 'rm -f "$COMMANDS"' exit int term +- rlwrap -b '' -f "$COMMANDS" "$0" -r ++ @rlwrap@ -b '' -f "$COMMANDS" "$0" -r + exit + fi + diff --git a/nixpkgs/pkgs/applications/window-managers/stumpwm/default.nix b/nixpkgs/pkgs/applications/window-managers/stumpwm/default.nix new file mode 100644 index 000000000000..69b2e6ceb50f --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/stumpwm/default.nix @@ -0,0 +1,104 @@ +{ stdenv, fetchgit, autoconf, sbcl, lispPackages, xdpyinfo, texinfo4 +, makeWrapper , rlwrap, gnused, gnugrep, coreutils, xprop +, extraModulePaths ? [] +, version }: + +let + contrib = (fetchgit { + url = "https://github.com/stumpwm/stumpwm-contrib.git"; + rev = "9bebe3622b2b6c31a6bada9055ef3862fa79b86f"; + sha256 = "1ml6mjk2fsfv4sf65fdbji3q5x0qiq99g1k8w7a99gsl2i8h60gc"; + }); + versionSpec = { + latest = { + name = "1.0.0"; + rev = "refs/tags/1.0.0"; + sha256 = "16r0lwhxl8g71masmfbjr7s7m7fah4ii4smi1g8zpbpiqjz48ryb"; + patches = []; + }; + "0.9.9" = { + name = "0.9.9"; + rev = "refs/tags/0.9.9"; + sha256 = "0hmvbdk2yr5wrkiwn9dfzf65s4xc2qifj0sn6w2mghzp96cph79k"; + patches = [ ./fix-module-path.patch ]; + }; + git = { + name = "git-20170203"; + rev = "d20f24e58ab62afceae2afb6262ffef3cc318b97"; + sha256 = "1gi29ds1x6dq7lz8lamnhcvcrr3cvvrg5yappfkggyhyvib1ii70"; + patches = []; + }; + }.${version}; +in +stdenv.mkDerivation { + name = "stumpwm-${versionSpec.name}"; + + src = fetchgit { + url = "https://github.com/stumpwm/stumpwm"; + rev = versionSpec.rev; + sha256 = versionSpec.sha256; + }; + + # NOTE: The patch needs an update for the next release. + # `(stumpwm:set-module-dir "@MODULE_DIR@")' needs to be in it. + patches = versionSpec.patches; + + buildInputs = [ + texinfo4 makeWrapper autoconf + sbcl + lispPackages.clx + lispPackages.cl-ppcre + lispPackages.alexandria + xdpyinfo + ]; + + + # Stripping destroys the generated SBCL image + dontStrip = true; + + configurePhase = '' + ./autogen.sh + ./configure --prefix=$out --with-module-dir=$out/share/stumpwm/modules + ''; + + preBuild = '' + cp -r --no-preserve=mode ${contrib} modules + substituteInPlace head.lisp \ + --replace 'run-shell-command "xdpyinfo' 'run-shell-command "${xdpyinfo}/bin/xdpyinfo' + ''; + + installPhase = '' + mkdir -pv $out/bin + make install + + mkdir -p $out/share/stumpwm/modules + cp -r modules/* $out/share/stumpwm/modules/ + for d in ${stdenv.lib.concatStringsSep " " extraModulePaths}; do + cp -r --no-preserve=mode "$d" $out/share/stumpwm/modules/ + done + + # Copy stumpish; + cp $out/share/stumpwm/modules/util/stumpish/stumpish $out/bin/ + chmod +x $out/bin/stumpish + wrapProgram $out/bin/stumpish \ + --prefix PATH ":" "${stdenv.lib.makeBinPath [ rlwrap gnused gnugrep coreutils xprop ]}" + + # Paths in the compressed image $out/bin/stumpwm are not + # recognized by Nix. Add explicit reference here. + mkdir $out/nix-support + echo ${xdpyinfo} > $out/nix-support/xdpyinfo + ''; + + passthru = { + inherit sbcl lispPackages contrib; + }; + + meta = with stdenv.lib; { + description = "A tiling window manager for X11"; + homepage = https://github.com/stumpwm/; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ the-kenny ]; + platforms = platforms.linux; + broken = true; # 2018-04-11 + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/stumpwm/fix-module-path.patch b/nixpkgs/pkgs/applications/window-managers/stumpwm/fix-module-path.patch new file mode 100644 index 000000000000..79bfaad3dec3 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/stumpwm/fix-module-path.patch @@ -0,0 +1,16 @@ +diff --git a/make-image.lisp.in b/make-image.lisp.in +index 121e9d6..2210242 100644 +--- a/make-image.lisp.in ++++ b/make-image.lisp.in +@@ -2,7 +2,10 @@ + + (load "load-stumpwm.lisp") + +-#-ecl (stumpwm:set-module-dir "@CONTRIB_DIR@") ++(setf asdf::*immutable-systems* ++ (uiop:list-to-hash-set (asdf:already-loaded-systems))) ++ ++#-ecl (stumpwm:set-module-dir "@MODULE_DIR@") + + #+sbcl + (sb-ext:save-lisp-and-die "stumpwm" :toplevel (lambda () diff --git a/nixpkgs/pkgs/applications/window-managers/sway/bg.nix b/nixpkgs/pkgs/applications/window-managers/sway/bg.nix new file mode 100644 index 000000000000..86301492c468 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/sway/bg.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub +, meson, ninja, pkgconfig, scdoc +, wayland, wayland-protocols, cairo, gdk-pixbuf +}: + +stdenv.mkDerivation rec { + pname = "swaybg"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "swaywm"; + repo = "swaybg"; + rev = version; + sha256 = "1lmqz5bmig90gq2m7lwf02d2g7z4hzf8fhqz78c8vk92c6p4xwbc"; + }; + + nativeBuildInputs = [ meson ninja pkgconfig scdoc ]; + buildInputs = [ wayland wayland-protocols cairo gdk-pixbuf ]; + + mesonFlags = [ + "-Dgdk-pixbuf=enabled" "-Dman-pages=enabled" + ]; + + meta = with stdenv.lib; { + description = "Wallpaper tool for Wayland compositors"; + longDescription = '' + A wallpaper utility for Wayland compositors, that is compatible with any + Wayland compositor which implements the following Wayland protocols: + wlr-layer-shell, xdg-output, and xdg-shell. + ''; + inherit (src.meta) homepage; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/sway/default.nix b/nixpkgs/pkgs/applications/window-managers/sway/default.nix new file mode 100644 index 000000000000..a98c48ddd1f1 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/sway/default.nix @@ -0,0 +1,50 @@ +{ stdenv, lib, fetchFromGitHub, makeWrapper +, meson, ninja +, pkgconfig, scdoc +, wayland, libxkbcommon, pcre, json_c, libevdev, pango, cairo, libinput +, wlroots, wayland-protocols + +, gdkPixbufSupport ? true, gdk-pixbuf +, xwaylandSupport ? !(lib.elem "-Dxwayland=disabled" (wlroots.mesonFlags or [])) +}: + +stdenv.mkDerivation rec { + pname = "sway-unwrapped"; + version = "1.4"; + + src = fetchFromGitHub { + owner = "swaywm"; + repo = "sway"; + rev = version; + sha256 = "11qf89y3q92g696a6f4d23qb44gqixg6qxq740vwv2jw59ms34ja"; + }; + + patches = [ + ./sway-config-no-nix-store-references.patch + ./load-configuration-from-etc.patch + ]; + + nativeBuildInputs = [ + pkgconfig meson ninja scdoc + ]; + + buildInputs = [ + wayland libxkbcommon pcre json_c libevdev pango cairo libinput + wlroots wayland-protocols + ] ++ lib.optional gdkPixbufSupport gdk-pixbuf; + + enableParallelBuilding = true; + + mesonFlags = + [ "-Ddefault-wallpaper=false" "-Dtray=enabled" "-Dman-pages=enabled" ] + ++ lib.optional gdkPixbufSupport "-Dgdk-pixbuf=enabled" + ++ lib.optional xwaylandSupport "-Dxwayland=enabled"; + + meta = with lib; { + description = "i3-compatible tiling Wayland compositor"; + homepage = https://swaywm.org; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos synthetica ma27 ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/sway/idle.nix b/nixpkgs/pkgs/applications/window-managers/sway/idle.nix new file mode 100644 index 000000000000..486ab79598df --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/sway/idle.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub +, meson, ninja, pkgconfig, scdoc +, wayland, wayland-protocols, systemd +}: + +stdenv.mkDerivation rec { + pname = "swayidle"; + version = "1.6"; + + src = fetchFromGitHub { + owner = "swaywm"; + repo = "swayidle"; + rev = version; + sha256 = "1nd3v8r9549lykdwh4krldfl59lzaspmmai5k1icy7dvi6kkr18r"; + }; + + postPatch = '' + substituteInPlace meson.build \ + --replace "version: '1.5'" "version: '${version}'" + ''; + + nativeBuildInputs = [ meson ninja pkgconfig scdoc ]; + buildInputs = [ wayland wayland-protocols systemd ]; + + mesonFlags = [ "-Dman-pages=enabled" "-Dlogind=enabled" ]; + + meta = with stdenv.lib; { + description = "Idle management daemon for Wayland"; + longDescription = '' + Sway's idle management daemon. It is compatible with any Wayland + compositor which implements the KDE idle protocol. + ''; + inherit (src.meta) homepage; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/sway/load-configuration-from-etc.patch b/nixpkgs/pkgs/applications/window-managers/sway/load-configuration-from-etc.patch new file mode 100644 index 000000000000..26a3d40d66cb --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/sway/load-configuration-from-etc.patch @@ -0,0 +1,42 @@ +From 26f9c65ef037892977a824f0d7d7111066856b53 Mon Sep 17 00:00:00 2001 +From: Michael Weiss <dev.primeos@gmail.com> +Date: Sat, 27 Apr 2019 14:26:16 +0200 +Subject: [PATCH] Load configs from /etc but fallback to /nix/store + +This change will load all configuration files from /etc, to make it easy +to override them, but fallback to /nix/store/.../etc/sway/config to make +Sway work out-of-the-box with the default configuration on non NixOS +systems. +--- + meson.build | 3 ++- + sway/config.c | 1 + + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 02b5d606..c03a9c0f 100644 +--- a/meson.build ++++ b/meson.build +@@ -129,7 +129,8 @@ if scdoc.found() + endforeach + endif + +-add_project_arguments('-DSYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c') ++add_project_arguments('-DSYSCONFDIR="/@0@"'.format(sysconfdir), language : 'c') ++add_project_arguments('-DNIX_SYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c') + + version = '"@0@"'.format(meson.project_version()) + if git.found() +diff --git a/sway/config.c b/sway/config.c +index 4cd21bbc..dd855753 100644 +--- a/sway/config.c ++++ b/sway/config.c +@@ -317,6 +317,7 @@ static char *get_config_path(void) { + "$XDG_CONFIG_HOME/i3/config", + SYSCONFDIR "/sway/config", + SYSCONFDIR "/i3/config", ++ NIX_SYSCONFDIR "/sway/config", + }; + + char *config_home = getenv("XDG_CONFIG_HOME"); +-- +2.19.2 diff --git a/nixpkgs/pkgs/applications/window-managers/sway/lock-fancy.nix b/nixpkgs/pkgs/applications/window-managers/sway/lock-fancy.nix new file mode 100644 index 000000000000..338d626d9908 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/sway/lock-fancy.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchFromGitHub, coreutils, grim, gawk, swaylock +, imagemagick, getopt, fontconfig, makeWrapper +}: + +let + depsPath = stdenv.lib.makeBinPath [ + coreutils + grim + gawk + swaylock + imagemagick + getopt + fontconfig + ]; +in stdenv.mkDerivation rec { + pname = "swaylock-fancy-unstable"; + version = "2020-02-22"; + + src = fetchFromGitHub { + owner = "Big-B"; + repo = "swaylock-fancy"; + rev = "5cf977b12f372740aa7b7e5a607d583f93f1e028"; + sha256 = "0laqwzi6069sgz91i69438ns0g2nq4zkqickavrf80h4g3gcs8vm"; + }; + + postPatch = '' + substituteInPlace swaylock-fancy \ + --replace "/usr/share" "$out/share" + ''; + + nativeBuildInputs = [ makeWrapper ]; + + makeFlags = [ "PREFIX=${placeholder "out"}" ]; + + postInstall = '' + wrapProgram $out/bin/swaylock-fancy \ + --prefix PATH : "${depsPath}" + ''; + + meta = with stdenv.lib; { + description = "This is an swaylock bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text"; + homepage = "https://github.com/Big-B/swaylock-fancy"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ ma27 ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/sway/lock.nix b/nixpkgs/pkgs/applications/window-managers/sway/lock.nix new file mode 100644 index 000000000000..dcff3a5c47f6 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/sway/lock.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub +, meson, ninja, pkgconfig, scdoc +, wayland, wayland-protocols, libxkbcommon, cairo, gdk-pixbuf, pam +}: + +stdenv.mkDerivation rec { + pname = "swaylock"; + version = "1.5"; + + src = fetchFromGitHub { + owner = "swaywm"; + repo = "swaylock"; + rev = version; + sha256 = "0r95p4w11dwm5ra614vddz83r8j7z6gd120z2vcchy7m9b0f15kf"; + }; + + postPatch = '' + substituteInPlace meson.build \ + --replace "version: '1.4'" "version: '${version}'" + ''; + + nativeBuildInputs = [ meson ninja pkgconfig scdoc ]; + buildInputs = [ wayland wayland-protocols libxkbcommon cairo gdk-pixbuf pam ]; + + mesonFlags = [ + "-Dpam=enabled" "-Dgdk-pixbuf=enabled" "-Dman-pages=enabled" + ]; + + meta = with stdenv.lib; { + description = "Screen locker for Wayland"; + longDescription = '' + swaylock is a screen locking utility for Wayland compositors. + ''; + inherit (src.meta) homepage; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/sway/sway-config-no-nix-store-references.patch b/nixpkgs/pkgs/applications/window-managers/sway/sway-config-no-nix-store-references.patch new file mode 100644 index 000000000000..009c12959430 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/sway/sway-config-no-nix-store-references.patch @@ -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/* + diff --git a/nixpkgs/pkgs/applications/window-managers/sway/wrapper.nix b/nixpkgs/pkgs/applications/window-managers/sway/wrapper.nix new file mode 100644 index 000000000000..7c59b8b7cde4 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/sway/wrapper.nix @@ -0,0 +1,51 @@ +{ lib, stdenv +, sway-unwrapped, swaybg +, makeWrapper, symlinkJoin, writeShellScriptBin +, withBaseWrapper ? true, extraSessionCommands ? "", dbus +, withGtkWrapper ? false, wrapGAppsHook, gdk-pixbuf +, extraOptions ? [] # E.g.: [ "--verbose" ] +}: + +assert extraSessionCommands != "" -> withBaseWrapper; + +with lib; + +let + baseWrapper = writeShellScriptBin "sway" '' + set -o errexit + if [ ! "$_SWAY_WRAPPER_ALREADY_EXECUTED" ]; then + export _SWAY_WRAPPER_ALREADY_EXECUTED=1 + ${extraSessionCommands} + fi + if [ "$DBUS_SESSION_BUS_ADDRESS" ]; then + export DBUS_SESSION_BUS_ADDRESS + exec ${sway-unwrapped}/bin/sway "$@" + else + exec ${dbus}/bin/dbus-run-session ${sway-unwrapped}/bin/sway "$@" + fi + ''; +in symlinkJoin { + name = "sway-${sway-unwrapped.version}"; + + paths = (optional withBaseWrapper baseWrapper) + ++ [ sway-unwrapped ]; + + nativeBuildInputs = [ makeWrapper ] + ++ (optional withGtkWrapper wrapGAppsHook); + + buildInputs = optional withGtkWrapper gdk-pixbuf; + + postBuild = '' + # We want to run wrapProgram manually to only wrap sway and add swaybg: + export dontWrapGApps=true + ${optionalString withGtkWrapper "wrapGAppsHook"} + wrapProgram $out/bin/sway \ + --prefix PATH : "${swaybg}/bin" \ + ${optionalString withGtkWrapper ''"''${gappsWrapperArgs[@]}"''} \ + ${optionalString (extraOptions != []) "${concatMapStrings (x: " --add-flags " + x) extraOptions}"} + ''; + + passthru.providedSessions = [ "sway" ]; + + inherit (sway-unwrapped) meta; +} diff --git a/nixpkgs/pkgs/applications/window-managers/sxhkd/default.nix b/nixpkgs/pkgs/applications/window-managers/sxhkd/default.nix new file mode 100644 index 000000000000..2404129b165d --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/sxhkd/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, asciidoc, libxcb, xcbutil, xcbutilkeysyms +, xcbutilwm +}: + +stdenv.mkDerivation rec { + pname = "sxhkd"; + version = "0.6.1"; + + src = fetchFromGitHub { + owner = "baskerville"; + repo = "sxhkd"; + rev = version; + sha256 = "0j7bl2l06r0arrjzpz7al9j6cwzc730knbsijp7ixzz96pq7xa2h"; + }; + + buildInputs = [ asciidoc libxcb xcbutil xcbutilkeysyms xcbutilwm ]; + + makeFlags = [ "PREFIX=$(out)" ]; + + meta = with stdenv.lib; { + description = "Simple X hotkey daemon"; + homepage = "https://github.com/baskerville/sxhkd"; + license = licenses.bsd2; + maintainers = with maintainers; [ vyp ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/tabbed/default.nix b/nixpkgs/pkgs/applications/window-managers/tabbed/default.nix new file mode 100644 index 000000000000..c391532376e3 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/tabbed/default.nix @@ -0,0 +1,33 @@ +{stdenv, fetchgit, xorgproto, libX11, libXft, customConfig ? null, patches ? [] }: + +with stdenv.lib; + +stdenv.mkDerivation { + name = "tabbed-20180310"; + + src = fetchgit { + url = https://git.suckless.org/tabbed; + rev = "b5f9ec647aae2d9a1d3bd586eb7523a4e0a329a3"; + sha256 = "0frj2yjaf0mfjwgyfappksfir52mx2xxd3cdg5533m5d88vbmxss"; + }; + + inherit patches; + + postPatch = stdenv.lib.optionalString (customConfig != null) '' + cp ${builtins.toFile "config.h" customConfig} ./config.h + ''; + + buildInputs = [ xorgproto libX11 libXft ]; + + makeFlags = [ + "PREFIX=$(out)" + ]; + + meta = { + homepage = https://tools.suckless.org/tabbed; + description = "Simple generic tabbed fronted to xembed aware applications"; + license = licenses.mit; + maintainers = with maintainers; [ vrthra ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/taffybar/default.nix b/nixpkgs/pkgs/applications/window-managers/taffybar/default.nix new file mode 100644 index 000000000000..681a5baec82c --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/taffybar/default.nix @@ -0,0 +1,20 @@ +{ stdenv, ghcWithPackages, makeWrapper, packages ? (x: []) }: + +let +taffybarEnv = ghcWithPackages (self: [ self.taffybar ] ++ packages self); +in stdenv.mkDerivation { + name = "taffybar-with-packages-${taffybarEnv.version}"; + + nativeBuildInputs = [ makeWrapper ]; + + buildCommand = '' + mkdir -p $out/bin + makeWrapper ${taffybarEnv}/bin/taffybar $out/bin/taffybar \ + --set NIX_GHC "${taffybarEnv}/bin/ghc" + ''; + + meta = { + platforms = stdenv.lib.platforms.unix; + license = stdenv.lib.licenses.bsd3; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/trayer/default.nix b/nixpkgs/pkgs/applications/window-managers/trayer/default.nix new file mode 100644 index 000000000000..5705ae8256c8 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/trayer/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, pkgconfig, gdk-pixbuf, gtk2 }: + +stdenv.mkDerivation rec { + name = "trayer-1.1.8"; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ gdk-pixbuf gtk2 ]; + + src = fetchFromGitHub { + owner = "sargon"; + repo = "trayer-srg"; + rev = name; + sha256 = "1mvhwaqa9bng9wh3jg3b7y8gl7nprbydmhg963xg0r076jyzv0cg"; + }; + + preConfigure = '' + patchShebangs configure + ''; + + makeFlags = [ "PREFIX=$(out)" ]; + + meta = with stdenv.lib; { + homepage = https://github.com/sargon/trayer-srg; + license = licenses.mit; + description = "A lightweight GTK2-based systray for UNIX desktop"; + platforms = platforms.linux; + maintainers = with maintainers; [ pSub ]; + }; +} + diff --git a/nixpkgs/pkgs/applications/window-managers/vwm/default.nix b/nixpkgs/pkgs/applications/window-managers/vwm/default.nix new file mode 100644 index 000000000000..3423b0e181d5 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/vwm/default.nix @@ -0,0 +1,33 @@ +{stdenv, fetchurl, ncurses, pkgconfig, glib, libviper, libpseudo, gpm, +libvterm}: + +stdenv.mkDerivation rec { + name = "vwm-2.1.3"; + + src = fetchurl { + url = "mirror://sourceforge/vwm/${name}.tar.gz"; + sha256 = "1r5wiqyfqwnyx7dfihixlnavbvg8rni36i4gq169aisjcg7laxaf"; + }; + + prePatch = '' + sed -i -e s@/usr/local@$out@ \ + -e s@/usr/lib@$out/lib@ \ + -e 's@tic vwmterm@tic -o '$out/lib/terminfo' vwmterm@' \ + -e /ldconfig/d Makefile modules/*/Makefile vwm.h + ''; + + preInstall = '' + mkdir -p $out/bin $out/include + ''; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ncurses glib libviper libpseudo gpm libvterm ]; + + meta = with stdenv.lib; { + homepage = http://vwm.sourceforge.net/; + description = "Dynamic window manager for the console"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/weston/default.nix b/nixpkgs/pkgs/applications/window-managers/weston/default.nix new file mode 100644 index 000000000000..51da999aff0c --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/weston/default.nix @@ -0,0 +1,54 @@ +{ stdenv, fetchurl, meson, ninja, pkgconfig +, wayland, libGL, mesa, libxkbcommon, cairo, libxcb +, libXcursor, xlibsWrapper, udev, libdrm, mtdev, libjpeg, pam, dbus, libinput, libevdev +, colord, lcms2, pipewire ? null +, pango ? null, libunwind ? null, freerdp ? null, vaapi ? null, libva ? null +, libwebp ? null, xwayland ? null, wayland-protocols +# beware of null defaults, as the parameters *are* supplied by callPackage by default +}: + +with stdenv.lib; +stdenv.mkDerivation rec { + pname = "weston"; + version = "8.0.0"; + + src = fetchurl { + url = "https://wayland.freedesktop.org/releases/${pname}-${version}.tar.xz"; + sha256 = "0j3q0af3595g4wcicldgy749zm2g2b6bswa6ya8k075a5sdv863m"; + }; + + nativeBuildInputs = [ meson ninja pkgconfig ]; + buildInputs = [ + wayland libGL mesa libxkbcommon cairo libxcb libXcursor xlibsWrapper udev libdrm + mtdev libjpeg pam dbus libinput libevdev pango libunwind freerdp vaapi libva + libwebp wayland-protocols + colord lcms2 pipewire + ]; + + mesonFlags= [ + "-Dbackend-drm-screencast-vaapi=${boolToString (vaapi != null)}" + "-Dbackend-rdp=${boolToString (freerdp != null)}" + "-Dxwayland=${boolToString (xwayland != null)}" # Default is true! + "-Dremoting=false" # TODO + "-Dpipewire=${boolToString (pipewire != null)}" + "-Dimage-webp=${boolToString (libwebp != null)}" + "-Ddemo-clients=false" + "-Dsimple-clients=" + "-Dtest-junit-xml=false" + # TODO: + #"--enable-clients" + #"--disable-setuid-install" # prevent install target to chown root weston-launch, which fails + ] ++ optionals (xwayland != null) [ + "-Dxwayland-path=${xwayland.out}/bin/Xwayland" + ]; + + passthru.providedSessions = [ "weston" ]; + + meta = { + description = "Reference implementation of a Wayland compositor"; + homepage = https://wayland.freedesktop.org/; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/windowlab/default.nix b/nixpkgs/pkgs/applications/window-managers/windowlab/default.nix new file mode 100644 index 000000000000..d0a1de7f6006 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/windowlab/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, pkgconfig +, libX11, libXext, libXft }: + +let version = "1.40"; in +stdenv.mkDerivation { + pname = "windowlab"; + inherit version; + + src = fetchurl { + url = "http://nickgravgaard.com/windowlab/windowlab-${version}.tar"; + sha256 = "1fx4jwq4s98p2wpvawsiww7d6568bpjgcjpks61dzfj8p2j32s4d"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libX11 libXext libXft ]; + + postPatch = + '' + mv Makefile Makefile.orig + echo \ + " + DEFINES += -DXFT + EXTRA_INC += $(pkg-config --cflags xft) + EXTRA_LIBS += $(pkg-config --libs xft) + " > Makefile + sed "s|/usr/local|$out|g" Makefile.orig >> Makefile + ''; + + meta = with stdenv.lib; + { description = "Small and simple stacking window manager"; + homepage = "http://nickgravgaard.com/windowlab/"; + license = licenses.gpl2; + maintainers = with maintainers; [ ehmry ]; + platforms = platforms.linux; + }; +} \ No newline at end of file diff --git a/nixpkgs/pkgs/applications/window-managers/windowmaker/default.nix b/nixpkgs/pkgs/applications/window-managers/windowmaker/default.nix new file mode 100644 index 000000000000..8ad63999289e --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/windowmaker/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchurl, pkgconfig +, libX11, libXext, libXft, libXmu, libXinerama, libXrandr, libXpm +, imagemagick, libpng, libjpeg, libexif, libtiff, libungif, libwebp }: + +stdenv.mkDerivation rec { + pname = "windowmaker"; + version = "0.95.8"; + srcName = "WindowMaker-${version}"; + + src = fetchurl { + url = "http://windowmaker.org/pub/source/release/${srcName}.tar.gz"; + sha256 = "12p8kljqgx5hnic0zvs5mxwp7kg21sb6qjagb2qw8ydvf5amrgwx"; + }; + + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ libX11 libXext libXft libXmu libXinerama libXrandr libXpm + imagemagick libpng libjpeg libexif libtiff libungif libwebp ]; + + configureFlags = [ + "--with-x" + "--enable-modelock" + "--enable-randr" + "--enable-magick" + ]; + + meta = with stdenv.lib; { + homepage = http://windowmaker.org/; + description = "NeXTSTEP-like window manager"; + longDescription = '' + Window Maker is an X11 window manager originally designed to + provide integration support for the GNUstep Desktop + Environment. In every way possible, it reproduces the elegant look + and feel of the NEXTSTEP user interface. It is fast, feature rich, + easy to configure, and easy to use. It is also free software, with + contributions being made by programmers from around the world. + ''; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.AndersonTorres ]; + }; +} + +# TODO: investigate support for WEBP (its autodetection is failing) diff --git a/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/alsamixer.app.nix b/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/alsamixer.app.nix new file mode 100644 index 000000000000..e708682e3036 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/alsamixer.app.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchgit, pkgconfig, libX11, libXpm, libXext, alsaLib }: + +stdenv.mkDerivation { + name = "alsamixer.app-0.2.1"; + src = fetchgit { + url = git://repo.or.cz/dockapps.git; + rev = "38c74350b02f35824554ce0c4f0f251d71762040"; + sha256 = "0g9cwhlqg065fbhav4g4n16a4cqkk9jykl3y0zwbn5whhacfqyhl"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libX11 libXpm libXext alsaLib ]; + + postUnpack = "sourceRoot=\${sourceRoot}/AlsaMixer.app"; + + installPhase = '' + mkdir -pv $out/bin; + cp AlsaMixer.app $out/bin/AlsaMixer; + ''; + + meta = { + description = "Alsa mixer application for Windowmaker"; + homepage = http://windowmaker.org/dockapps/?name=AlsaMixer.app; + license = stdenv.lib.licenses.gpl2; + maintainers = [ stdenv.lib.maintainers.bstrik ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/wmcalclock.nix b/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/wmcalclock.nix new file mode 100644 index 000000000000..e2f17d11f64d --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/wmcalclock.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, pkgconfig, libX11, libXpm, libXext }: + +stdenv.mkDerivation { + name = "wmCalClock-1.25"; + src = fetchurl { + url = http://www.cs.mun.ca/~gstarkes/wmaker/dockapps/files/wmCalClock-1.25.tar.gz; + sha256 = "4b42b55bb7c1d7c58b5ee1f0058c683d3e4f3e3380d3a69c54a50b983c7c1b3f"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libX11 libXpm libXext ]; + + postUnpack = "sourceRoot=\${sourceRoot}/Src"; + + buildPhase='' + make prefix=$out + ''; + + installPhase = '' + mkdir -pv $out/bin + mkdir -pv $out/man/man1 + make DESTDIR=$out install + ''; + + meta = { + description = "Clock for Windowmaker"; + homepage = "http://www.cs.mun.ca/~gstarkes/wmaker/dockapps/time.html#wmcalclock"; + license = stdenv.lib.licenses.gpl2; + maintainers = [ stdenv.lib.maintainers.bstrik ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/wmsm.app.nix b/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/wmsm.app.nix new file mode 100644 index 000000000000..3e8b3f7f1584 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/wmsm.app.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, pkgconfig, libX11, libXpm, libXext }: + +stdenv.mkDerivation { + name = "wmsm.app-0.2.1"; + src = fetchurl { + url = http://linux-bsd-unix.strefa.pl/wmsm.app-0.2.1.tar.bz2; + sha256 = "369a8f2e5673c6b7ab0cf85166f38fbf553dd966c3c1cfeec0e32837defd32c7"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libX11 libXpm libXext ]; + + postUnpack = "sourceRoot=\${sourceRoot}/wmsm"; + + NIX_CFLAGS_COMPILE = "-std=gnu89"; + + installPhase = '' + substituteInPlace Makefile --replace "PREFIX = /usr/X11R6/bin" "" --replace "/usr/bin/install" "install" + mkdir -pv $out/bin; + make PREFIX=$out/bin install; + ''; + + meta = { + description = "System monitor for Windowmaker"; + homepage = http://linux-bsd-unix.strefa.pl; + license = stdenv.lib.licenses.gpl2; + maintainers = [ stdenv.lib.maintainers.bstrik ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/wmsystemtray.nix b/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/wmsystemtray.nix new file mode 100644 index 000000000000..e5eb2fc559da --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/windowmaker/dockapps/wmsystemtray.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, pkgconfig, libX11, libXpm, libXext, libXfixes, libXmu }: + +stdenv.mkDerivation { + name = "wmsystemtray-1.4"; + src = fetchurl { + url = mirror://sourceforge/project/wmsystemtray/wmsystemtray/wmsystemtray-1.4.tar.gz; + sha256 = "8edef43691e9fff071000e29166c7c1ad420c0956e9068151061e881c8ac97e9"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libX11 libXpm libXext libXfixes libXmu ]; + + meta = { + description = "Systemtray for Windowmaker"; + homepage = http://wmsystemtray.sourceforge.net; + license = stdenv.lib.licenses.gpl2; + maintainers = [ stdenv.lib.maintainers.bstrik ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/wmfs/default.nix b/nixpkgs/pkgs/applications/window-managers/wmfs/default.nix new file mode 100644 index 000000000000..2013096d6fea --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/wmfs/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchFromGitHub, gnumake, + libX11, libXinerama, libXrandr, libXpm, libXft, imlib2 }: +stdenv.mkDerivation { + pname = "wmfs"; + + version = "201902"; + + src = fetchFromGitHub { + owner = "xorg62"; + repo = "wmfs"; + sha256 = "sha256:1m7dsmmlhq2qipim659cp9aqlriz1cwrrgspl8baa5pncln0gd5c"; + rev = "b7b8ff812d28c79cb22a73db2739989996fdc6c2"; + }; + + nativeBuildInputs = [ + gnumake + ]; + + buildInputs = [ + imlib2 + libX11 + libXinerama + libXrandr + libXpm + libXft + ]; + + preConfigure = "substituteInPlace configure --replace '-lxft' '-lXft'"; + + makeFlags = [ + "PREFIX=${placeholder "out"}" + "XDG_CONFIG_DIR=${placeholder "out"}/etc/xdg" + "MANPREFIX=${placeholder "out"}/share/man" + ]; + + meta = with stdenv.lib; { + description = "Window manager from scratch"; + license = licenses.bsd2; + maintainers = [ maintainers.balsoft ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/wmii-hg/default.nix b/nixpkgs/pkgs/applications/window-managers/wmii-hg/default.nix new file mode 100644 index 000000000000..426fcfe8efce --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/wmii-hg/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchurl, unzip, pkgconfig, libixp_hg, txt2tags, dash, python, which +, libX11 , libXrender, libXext, libXinerama, libXrandr, libXft }: + +stdenv.mkDerivation rec { + rev = "2823"; + version = "hg-2012-12-09"; + pname = "wmii"; + + src = fetchurl { + url = https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/wmii/source-archive.zip; + sha256 = "1wmkq14zvmfrmydl8752xz852cy7agrx3qp4fy2cc5asb2r9abaz"; + }; + + # for dlopen-ing + patchPhase = '' + substituteInPlace lib/libstuff/x11/xft.c --replace "libXft.so" "$(pkg-config --variable=libdir xft)/libXft.so.2" + substituteInPlace cmd/wmii.sh.sh --replace "\$(which which)" "${which}/bin/which" + ''; + + configurePhase = '' + for file in $(grep -lr '#!.*sh'); do + sed -i 's|#!.*sh|#!${dash}/bin/dash|' $file + done + + cat <<EOF >> config.mk + PREFIX = $out + LIBIXP = ${libixp_hg}/lib/libixp.a + BINSH = ${dash}/bin/dash + EOF + ''; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ unzip libixp_hg txt2tags dash python which + libX11 libXrender libXext libXinerama libXrandr libXft ]; + + # For some reason including mercurial in buildInputs did not help + makeFlags = [ "WMII_HGVERSION=hg${rev}" ]; + + meta = { + homepage = https://suckless.org/; # https://wmii.suckless.org/ does not exist anymore + description = "A small window manager controlled by a 9P filesystem"; + maintainers = with stdenv.lib.maintainers; [ kovirobi ]; + license = stdenv.lib.licenses.mit; + inherit version; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/xmonad/log-applet/default.nix b/nixpkgs/pkgs/applications/window-managers/xmonad/log-applet/default.nix new file mode 100644 index 000000000000..f7ccda273890 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/xmonad/log-applet/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, glib, dbus-glib +, desktopSupport ? "gnomeflashback", xorg +, gtk2 +, gtk3, gnome3, mate +, libxfce4util, xfce4-panel +}: + +assert desktopSupport == "gnomeflashback" || desktopSupport == "mate" || desktopSupport == "xfce4"; + +stdenv.mkDerivation rec { + version = "unstable-2017-09-15"; + pname = "xmonad-log-applet"; + name = "${pname}-${desktopSupport}-${version}"; + + src = fetchFromGitHub { + owner = "kalj"; + repo = pname; + rev = "a1b294cad2f266e4f18d9de34167fa96a0ffdba8"; + sha256 = "042307grf4zvn61gnflhsj5xsjykrk9sjjsprprm4iij0qpybxcw"; + }; + + buildInputs = [ glib dbus-glib xorg.xcbutilwm ] + ++ stdenv.lib.optionals (desktopSupport == "gnomeflashback") [ gtk3 gnome3.gnome-panel ] + ++ stdenv.lib.optionals (desktopSupport == "mate") [ gtk3 mate.mate-panel ] + ++ stdenv.lib.optionals (desktopSupport == "xfce4") [ gtk2 libxfce4util xfce4-panel ] + ; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + + configureFlags = [ "--with-panel=${desktopSupport}" ]; + + patches = [ ./fix-paths.patch ]; + + # Setup hook replaces ${prefix} in pc files so we cannot use + # --define-variable=prefix=$prefix + PKG_CONFIG_LIBXFCE4PANEL_1_0_LIBDIR = "$(out)/lib"; + + meta = with stdenv.lib; { + homepage = https://github.com/kalj/xmonad-log-applet; + license = licenses.bsd3; + description = "An applet that will display XMonad log information (${desktopSupport} version)"; + platforms = platforms.linux; + maintainers = with maintainers; [ abbradar ]; + }; +} + diff --git a/nixpkgs/pkgs/applications/window-managers/xmonad/log-applet/fix-paths.patch b/nixpkgs/pkgs/applications/window-managers/xmonad/log-applet/fix-paths.patch new file mode 100644 index 000000000000..5e1fc7114dc8 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/xmonad/log-applet/fix-paths.patch @@ -0,0 +1,57 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -20,7 +20,7 @@ + PKG_CHECK_MODULES(XCB, xcb xcb-ewmh) + + PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.80) +-SESSION_BUS_SERVICES_DIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1` ++SESSION_BUS_SERVICES_DIR=$prefix/share/dbus-1/services + AC_SUBST([SESSION_BUS_SERVICES_DIR]) + + AC_ARG_WITH( +@@ -32,35 +32,35 @@ + AS_IF( + [test "x$panel" = xgnome2], + [PKG_CHECK_MODULES(LIBPANEL, libpanelapplet-3.0 >= 2.32.0)] +- LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=prefix libpanelapplet-3.0`/share/gnome-panel/applets +- PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libpanelapplet-3.0`/libexec ++ LIBPANEL_APPLET_DIR=$prefix/share/gnome-panel/applets ++ PLUGIN_DIR=$prefix/libexec + [AC_DEFINE(PANEL_GNOME, 1, [panel type])] + [AC_DEFINE(PANEL_GNOME2, 1, [panel type])] + , + [test "x$panel" = xgnome3], + [PKG_CHECK_MODULES(LIBPANEL, libpanelapplet-4.0 >= 3.0.0)] +- LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=libpanel_applet_dir libpanelapplet-4.0` +- PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libpanelapplet-4.0`/libexec ++ LIBPANEL_APPLET_DIR=`$PKG_CONFIG --define-variable=prefix=$prefix --variable=libpanel_applet_dir libpanelapplet-4.0` ++ PLUGIN_DIR=$prefix/libexec + [AC_DEFINE(PANEL_GNOME, 1, [panel type])] + [AC_DEFINE(PANEL_GNOME3, 1, [panel type])] + , + [test "x$panel" = xgnomeflashback], + [PKG_CHECK_MODULES(LIBPANEL, libpanel-applet >= 3.0.0)] +- LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=libpanel_applet_dir libpanel-applet` +- PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libpanel-applet`/libexec ++ LIBPANEL_APPLET_DIR=`$PKG_CONFIG --define-variable=prefix=$prefix --variable=libpanel_applet_dir libpanel-applet` ++ PLUGIN_DIR=$prefix/libexec + [AC_DEFINE(PANEL_GNOME, 1, [panel type])] + [AC_DEFINE(PANEL_GNOMEFLASHBACK, 1, [panel type])] + , + [test "x$panel" = xmate], + [PKG_CHECK_MODULES(LIBPANEL, libmatepanelapplet-4.0 >= 1.4.0)] +- LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=prefix libmatepanelapplet-4.0`/share/mate-panel/applets +- PLUGIN_DIR=`$PKG_CONFIG --variable=prefix libmatepanelapplet-4.0`/libexec ++ LIBPANEL_APPLET_DIR=$prefix/share/mate-panel/applets ++ PLUGIN_DIR=$prefix/libexec + [AC_DEFINE(PANEL_MATE, 1, [panel type])] + , + [test "x$panel" = xxfce4], + [PKG_CHECK_MODULES(LIBPANEL, libxfce4panel-1.0 >= 4.6.0)] +- LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=prefix libxfce4panel-1.0`/share/xfce4/panel-plugins +- PLUGIN_DIR=`$PKG_CONFIG --variable=libdir libxfce4panel-1.0`/xfce4/panel/plugins ++ LIBPANEL_APPLET_DIR=$prefix/share/xfce4/panel-plugins ++ PLUGIN_DIR=`$PKG_CONFIG --define-variable=prefix=$prefix --variable=libdir libxfce4panel-1.0`/xfce4/panel/plugins + [AC_DEFINE(PANEL_XFCE4, 1, [panel type])] + , + [AC_MSG_ERROR([Unknown panel type, use gnome2, gnome3, gnomeflashback, mate or xfce4])] diff --git a/nixpkgs/pkgs/applications/window-managers/xmonad/wrapper.nix b/nixpkgs/pkgs/applications/window-managers/xmonad/wrapper.nix new file mode 100644 index 000000000000..f5c9f12a23f6 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/xmonad/wrapper.nix @@ -0,0 +1,20 @@ +{ stdenv, ghcWithPackages, xmessage, makeWrapper, packages }: + +let +xmonadEnv = ghcWithPackages (self: [ self.xmonad ] ++ packages self); +in stdenv.mkDerivation { + name = "xmonad-with-packages-${xmonadEnv.version}"; + + nativeBuildInputs = [ makeWrapper ]; + + buildCommand = '' + install -D ${xmonadEnv}/share/man/man1/xmonad.1.gz $out/share/man/man1/xmonad.1.gz + makeWrapper ${xmonadEnv}/bin/xmonad $out/bin/xmonad \ + --set NIX_GHC "${xmonadEnv}/bin/ghc" \ + --set XMONAD_XMESSAGE "${xmessage}/bin/xmessage" + ''; + + # trivial derivation + preferLocalBuild = true; + allowSubstitutes = false; +} diff --git a/nixpkgs/pkgs/applications/window-managers/yabar/build.nix b/nixpkgs/pkgs/applications/window-managers/yabar/build.nix new file mode 100644 index 000000000000..f7867882d222 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/yabar/build.nix @@ -0,0 +1,55 @@ +{ stdenv, fetchFromGitHub, cairo, gdk-pixbuf, libconfig, pango, pkgconfig +, xcbutilwm, alsaLib, wirelesstools, asciidoc, libxslt, makeWrapper, docbook_xsl +, configFile ? null, lib +, rev, sha256, version, patches ? [] +}: + +stdenv.mkDerivation { + pname = "yabar"; + inherit version; + + src = fetchFromGitHub { + inherit rev sha256; + + owner = "geommer"; + repo = "yabar"; + }; + + inherit patches; + + hardeningDisable = [ "format" ]; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + cairo gdk-pixbuf libconfig pango xcbutilwm docbook_xsl + alsaLib wirelesstools asciidoc libxslt makeWrapper + ]; + + postPatch = '' + substituteInPlace ./Makefile \ + --replace "\$(shell git describe)" "${version}" \ + --replace "a2x" "${asciidoc}/bin/a2x --no-xmllint" + ''; + + makeFlags = [ "DESTDIR=$(out)" "PREFIX=/" ]; + + postInstall = '' + mkdir -p $out/share/yabar/examples + cp -v examples/*.config $out/share/yabar/examples + + ${lib.optionalString (configFile != null) + '' + wrapProgram "$out/bin/yabar" \ + --add-flags "-c ${configFile}" + '' + } + ''; + + meta = with stdenv.lib; { + description = "A modern and lightweight status bar for X window managers"; + homepage = https://github.com/geommer/yabar; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ ma27 ]; + }; +} diff --git a/nixpkgs/pkgs/applications/window-managers/yabar/default.nix b/nixpkgs/pkgs/applications/window-managers/yabar/default.nix new file mode 100644 index 000000000000..a33a75676ee9 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/yabar/default.nix @@ -0,0 +1,18 @@ +{ callPackage, attrs ? {}, fetchpatch }: + +let + overrides = rec { + version = "0.4.0"; + + rev = version; + sha256 = "1nw9dar1caqln5fr0dqk7dg6naazbpfwwzxwlkxz42shsc3w30a6"; + + patches = [ + (fetchpatch { + url = "https://github.com/geommer/yabar/commit/9779a5e04bd6e8cdc1c9fcf5d7ac31416af85a53.patch"; + sha256 = "1szhr3k1kq6ixgnp74wnzgfvgxm6r4zpc3ny2x2wzy6lh2czc07s"; + }) + ]; + + } // attrs; +in callPackage ./build.nix overrides diff --git a/nixpkgs/pkgs/applications/window-managers/yabar/unstable.nix b/nixpkgs/pkgs/applications/window-managers/yabar/unstable.nix new file mode 100644 index 000000000000..47c8f6c5e568 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/yabar/unstable.nix @@ -0,0 +1,25 @@ +{ fetchpatch, playerctl, libxkbcommon, callPackage, attrs ? {} }: + +let + pkg = callPackage ./build.nix ({ + version = "unstable-2018-01-18"; + + rev = "c516e8e78d39dd2b339acadc4c175347171150bb"; + sha256 = "1p9lx78cayyn7qc2q66id2xfs76jyddnqv2x1ypsvixaxwcvqgdb"; + } // attrs); +in pkg.overrideAttrs (o: { + buildInputs = o.buildInputs ++ [ + playerctl libxkbcommon + ]; + + makeFlags = o.makeFlags ++ [ + "PLAYERCTL=1" + ]; + + patches = (o.patches or []) ++ [ + (fetchpatch { + url = "https://github.com/geommer/yabar/commit/008dc1420ff684cf12ce2ef3ac9d642e054e39f5.patch"; + sha256 = "1q7nd66ai6nr2m6iqxn55gvbr4r5gjc00c8wyjc3riv31qcbqbhv"; + }) + ]; +}) |