nixos-config/pkgs/lwp/default.nix

54 lines
1.1 KiB
Nix
Raw Normal View History

2022-09-26 06:34:19 +00:00
{ stdenv
, lib
, fetchFromGitHub
2023-07-17 03:40:50 +00:00
, cmake
2022-09-26 06:34:19 +00:00
, SDL2
, xorg
2023-07-17 03:40:50 +00:00
, xwayland
2022-10-24 04:04:08 +00:00
, 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 ];
2022-09-26 06:34:19 +00:00
buildInputs = [
SDL2
xorg.libX11
2023-07-17 03:40:50 +00:00
xwayland
2022-10-24 04:04:08 +00:00
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"}"
'';
cmakeFlags = [
"-DPROGRAM_VERSION=${version}"
];
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
};
}