From e34c5309b6f0107b4443523d63d43ef1b0aae099 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 19 Apr 2019 21:43:04 +0200 Subject: [PATCH] wallutils: init at 5.7.2 (#59878) --- pkgs/tools/graphics/wallutils/default.nix | 34 +++++++++++++++++++ ...paths-to-DefaultWallpaperDirectories.patch | 25 ++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 61 insertions(+) create mode 100644 pkgs/tools/graphics/wallutils/default.nix create mode 100644 pkgs/tools/graphics/wallutils/lscollection-Add-NixOS-paths-to-DefaultWallpaperDirectories.patch diff --git a/pkgs/tools/graphics/wallutils/default.nix b/pkgs/tools/graphics/wallutils/default.nix new file mode 100644 index 000000000000..25ef433304c9 --- /dev/null +++ b/pkgs/tools/graphics/wallutils/default.nix @@ -0,0 +1,34 @@ +{ buildGoModule, fetchFromGitHub, lib +, wayland, libX11, xbitmaps, libXcursor, libXmu +}: + +buildGoModule rec { + name = "wallutils-${version}"; + version = "5.7.2"; + + src = fetchFromGitHub { + owner = "xyproto"; + repo = "wallutils"; + rev = version; + sha256 = "1q4487s83iwwgd40hkihpns84ya8mg54zp63ag519cdjizz38xyi"; + }; + + modSha256 = "0kj9s9ymd99a5w9r1d997qysnzlgpnmh5dnki33h1jlwz47nwkld"; + + patches = [ ./lscollection-Add-NixOS-paths-to-DefaultWallpaperDirectories.patch ]; + + postPatch = '' + # VersionString is sometimes not up-to-date: + sed -iE 's/VersionString = "[0-9].[0-9].[0-9]"/VersionString = "${version}"/' wallutils.go + ''; + + buildInputs = [ wayland libX11 xbitmaps libXcursor libXmu ]; + + meta = with lib; { + description = "Utilities for handling monitors, resolutions, and (timed) wallpapers"; + inherit (src.meta) homepage; + license = licenses.mit; + maintainers = with maintainers; [ primeos ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/tools/graphics/wallutils/lscollection-Add-NixOS-paths-to-DefaultWallpaperDirectories.patch b/pkgs/tools/graphics/wallutils/lscollection-Add-NixOS-paths-to-DefaultWallpaperDirectories.patch new file mode 100644 index 000000000000..00aeed6363e3 --- /dev/null +++ b/pkgs/tools/graphics/wallutils/lscollection-Add-NixOS-paths-to-DefaultWallpaperDirectories.patch @@ -0,0 +1,25 @@ +From 9d064428cec970ced9be6753d6250b20a45a9fe2 Mon Sep 17 00:00:00 2001 +From: Michael Weiss +Date: Fri, 19 Apr 2019 11:56:50 +0200 +Subject: [PATCH] lscollection: Add NixOS paths to DefaultWallpaperDirectories + +--- + collections.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/collections.go b/collections.go +index ef74ea6..9f9a608 100644 +--- a/collections.go ++++ b/collections.go +@@ -21,7 +21,7 @@ const ( + ) + + var ( +- DefaultWallpaperDirectories = []string{"/usr/share/pixmaps", "/usr/share/wallpapers", "/usr/share/backgrounds", "/usr/local/share/pixmaps", "/usr/local/share/wallpapers", "/usr/local/share/backgrounds", "/usr/share/archlinux"} ++ DefaultWallpaperDirectories = []string{"/run/current-system/sw/share/pixmaps", "/run/current-system/sw/share/wallpapers", "/run/current-system/sw/share/backgrounds", "/usr/share/pixmaps", "/usr/share/wallpapers", "/usr/share/backgrounds", "/usr/local/share/pixmaps", "/usr/local/share/wallpapers", "/usr/local/share/backgrounds", "/usr/share/archlinux"} + ) + + type SearchResults struct { +-- +2.19.2 + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4686c6610a78..11ada7244236 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2561,6 +2561,8 @@ in inherit (pythonPackages) sphinx; }; + wallutils = callPackage ../tools/graphics/wallutils { }; + wl-clipboard = callPackage ../tools/misc/wl-clipboard { }; zabbix-cli = callPackage ../tools/misc/zabbix-cli { };