diff --git a/pkgs/applications/window-managers/yabar/build.nix b/pkgs/applications/window-managers/yabar/build.nix new file mode 100644 index 000000000000..fbbfa5f0118d --- /dev/null +++ b/pkgs/applications/window-managers/yabar/build.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchFromGitHub, cairo, gdk_pixbuf, libconfig, pango, pkgconfig +, xcbutilwm, alsaLib, wirelesstools, asciidoc, libxslt, makeWrapper, docbook_xsl +, configFile ? null, lib +, rev, sha256, version +}: + +stdenv.mkDerivation { + name = "yabar-${version}"; + + src = fetchFromGitHub { + inherit rev sha256; + + owner = "geommer"; + repo = "yabar"; + }; + + hardeningDisable = [ "format" ]; + + buildInputs = [ + cairo gdk_pixbuf libconfig pango pkgconfig 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/pkgs/applications/window-managers/yabar/default.nix b/pkgs/applications/window-managers/yabar/default.nix index 34d424252530..4d42e3082f35 100644 --- a/pkgs/applications/window-managers/yabar/default.nix +++ b/pkgs/applications/window-managers/yabar/default.nix @@ -1,38 +1,10 @@ -{ stdenv, fetchFromGitHub, cairo, gdk_pixbuf, libconfig, pango, pkgconfig, xcbutilwm }: +{ callPackage, attrs ? {} }: -stdenv.mkDerivation rec { - name = "yabar-${version}"; - version = "0.4.0"; +let + overrides = { + version = "0.4.0"; - src = fetchFromGitHub { - owner = "geommer"; - repo = "yabar"; - rev = "746387f0112f9b7aa2e2e27b3d69cb2892d8c63b"; + rev = "746387f0112f9b7aa2e2e27b3d69cb2892d8c63b"; sha256 = "1nw9dar1caqln5fr0dqk7dg6naazbpfwwzxwlkxz42shsc3w30a6"; - }; - - buildInputs = [ cairo gdk_pixbuf libconfig pango pkgconfig xcbutilwm ]; - - hardeningDisable = [ "format" ]; - - postPatch = '' - substituteInPlace ./Makefile --replace "\$(shell git describe)" "${version}" - ''; - - buildPhase = '' - make DESTDIR=$out PREFIX=/ - ''; - - installPhase = '' - make DESTDIR=$out PREFIX=/ install - mkdir -p $out/share/yabar/examples - cp -v examples/*.config $out/share/yabar/examples - ''; - - 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; - }; -} + } // attrs; +in callPackage ./build.nix overrides diff --git a/pkgs/applications/window-managers/yabar/unstable.nix b/pkgs/applications/window-managers/yabar/unstable.nix new file mode 100644 index 000000000000..6baa7ae5c036 --- /dev/null +++ b/pkgs/applications/window-managers/yabar/unstable.nix @@ -0,0 +1,10 @@ +{ callPackage, attrs ? {} }: + +let + overrides = { + version = "unstable-2017-09-09"; + + rev = "d3934344ba27f5bdf122bf74daacee6d49284dab"; + sha256 = "14zrlzva8i83ffg426mrf6yli8afwq6chvc7yi78ngixyik5gzhx"; + } // attrs; +in callPackage ./build.nix overrides diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ab6b17403a4c..585a03890e3e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17119,6 +17119,8 @@ with pkgs; yabar = callPackage ../applications/window-managers/yabar { }; + yabar-unstable = callPackage ../applications/window-managers/yabar/unstable.nix { }; + yakuake = libsForQt5.callPackage ../applications/misc/yakuake { inherit (kdeApplications) konsole; };