mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
lwp: 1.2 -> 2.0.0
This commit is contained in:
parent
89488b86f6
commit
b2c62f2341
@ -1,47 +1,53 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
, SDL2
|
, SDL2
|
||||||
, xorg
|
, xorg
|
||||||
|
, xwayland
|
||||||
, libconfig
|
, libconfig
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "lwp";
|
pname = "lwp";
|
||||||
version = "1.2";
|
version = "2.0.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jszczerbinsky";
|
owner = "jszczerbinsky";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = "v${version}";
|
||||||
sha256 = "sha256-5/wnPXIfC8jiyjC0/2x/PoBZ1lONcoQ3NWL6uEuqPv8=";
|
hash = "sha256-cy5ZnkC/KtZsjFLAtWjfWL4gacQpEhNv0VC/hbw0LFA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
nativeBuildInputs = [ cmake ];
|
||||||
substituteInPlace default.cfg --replace "/usr/share" "${placeholder "out"}/share"
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
gcc main.c window.c parser.c debug.c -lSDL2 -lX11
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -Dm0755 a.out $out/bin/lwp
|
|
||||||
install -Dm0644 default.cfg -t $out/etc
|
|
||||||
mkdir -p $out/share/lwp
|
|
||||||
cp -R ./wallpapers $out/share/lwp
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
SDL2
|
SDL2
|
||||||
xorg.libX11
|
xorg.libX11
|
||||||
|
xwayland
|
||||||
libconfig
|
libconfig
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# 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}"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/jszczerbinsky/lwp";
|
homepage = "https://github.com/jszczerbinsky/lwp";
|
||||||
description = "Parallax wallpaper engine for Linux and Windows";
|
description = "Parallax wallpaper engine for Linux and Windows";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = platforms.unix;
|
|
||||||
|
# We'll package it for Linux only for now.
|
||||||
|
platforms = platforms.linux;
|
||||||
|
|
||||||
|
maintainers = with maintainers; [ foo-dogsquared ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user