2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, makeWrapper
|
|
|
|
, bzip2
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
, libGL
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXrandr
|
|
|
|
, libXi
|
|
|
|
, gnome
|
2022-12-02 08:20:57 +00:00
|
|
|
, libsForQt5
|
2022-11-21 17:40:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "ludusavi";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.17.1";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mtkennerly";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-LTqorrZ7hp9hFGcQ0rdc/U6st9YraXEftDpH7VEShs8=";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
cargoSha256 = "sha256-3SijgvIPb+QBAWZaTivw8P5aYjctGfgnVrFYcGl8PyE=";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXrandr
|
|
|
|
libXi
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 assets/com.github.mtkennerly.ludusavi.metainfo.xml -t \
|
|
|
|
"$out/share/metainfo/"
|
|
|
|
install -Dm644 assets/icon.png \
|
|
|
|
"$out/share/icons/hicolor/64x64/apps/${pname}.png"
|
|
|
|
install -Dm644 assets/icon.svg \
|
|
|
|
"$out/share/icons/hicolor/scalable/apps/${pname}.svg"
|
|
|
|
install -Dm644 "assets/${pname}.desktop" -t "$out/share/applications/"
|
|
|
|
install -Dm644 assets/MaterialIcons-Regular.ttf -t "$out/share/fonts/TTF/"
|
|
|
|
install -Dm644 LICENSE -t "$out/share/licenses/${pname}/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup =
|
|
|
|
let
|
|
|
|
libPath = lib.makeLibraryPath [
|
|
|
|
libGL
|
|
|
|
bzip2
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXrandr
|
|
|
|
libXi
|
|
|
|
];
|
|
|
|
in
|
|
|
|
''
|
|
|
|
patchelf --set-rpath "${libPath}" "$out/bin/$pname"
|
2022-12-02 08:20:57 +00:00
|
|
|
wrapProgram $out/bin/$pname --prefix PATH : ${lib.makeBinPath [ gnome.zenity libsForQt5.kdialog ]}
|
2022-11-21 17:40:18 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Backup tool for PC game saves";
|
|
|
|
homepage = "https://github.com/mtkennerly/ludusavi";
|
|
|
|
changelog = "https://github.com/mtkennerly/ludusavi/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ pasqui23 ];
|
|
|
|
};
|
|
|
|
}
|