nixos-config/pkgs/lwp/default.nix

39 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2025-01-15 06:00:12 +00:00
{ stdenv, lib, fetchFromGitHub, cmake, SDL2, xorg, xwayland, libconfig }:
2022-09-26 06:34:19 +00:00
stdenv.mkDerivation rec {
pname = "lwp";
2023-07-17 03:40:50 +00:00
version = "2.0.0";
2022-09-26 06:34:19 +00:00
src = fetchFromGitHub {
owner = "jszczerbinsky";
repo = pname;
2023-07-17 03:40:50 +00:00
rev = "v${version}";
hash = "sha256-cy5ZnkC/KtZsjFLAtWjfWL4gacQpEhNv0VC/hbw0LFA=";
2022-09-26 06:34:19 +00:00
};
2023-07-17 03:40:50 +00:00
nativeBuildInputs = [ cmake ];
2025-01-15 06:00:12 +00:00
buildInputs = [ SDL2 xorg.libX11 xwayland libconfig ];
2022-09-26 06:34:19 +00:00
2023-07-17 03:40:50 +00:00
# TODO: Add conditional for Mac systems.
postPatch = ''
substituteInPlace default.cfg \
--replace "/usr/share" "${placeholder "out"}/share" \
--replace "/usr/local" "${placeholder "out"}"
substituteInPlace CMakeLists.txt \
--replace "usr/local" "${placeholder "out"}"
'';
2025-01-15 06:00:12 +00:00
cmakeFlags = [ "-DPROGRAM_VERSION=${version}" ];
2023-07-17 03:40:50 +00:00
2022-09-26 06:34:19 +00:00
meta = with lib; {
homepage = "https://github.com/jszczerbinsky/lwp";
description = "Parallax wallpaper engine for Linux and Windows";
license = licenses.mit;
2023-07-17 03:40:50 +00:00
# We'll package it for Linux only for now.
platforms = platforms.linux;
maintainers = with maintainers; [ foo-dogsquared ];
2022-09-26 06:34:19 +00:00
};
}