mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 17:53:37 +00:00
48fe501426
Diff: https://github.com/mtkennerly/ludusavi/compare/v0.17.1...v0.19.0 Changelog: https://github.com/mtkennerly/ludusavi/blob/v0.19.0/CHANGELOG.md
86 lines
1.9 KiB
Nix
86 lines
1.9 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, pkg-config
|
|
, makeWrapper
|
|
, bzip2
|
|
, fontconfig
|
|
, freetype
|
|
, libGL
|
|
, libX11
|
|
, libXcursor
|
|
, libXrandr
|
|
, libXi
|
|
, gnome
|
|
, libsForQt5
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "ludusavi";
|
|
version = "0.19.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mtkennerly";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-1Na+xGcb15/ZRbuy96qJwPg6Zo7FsGwCUXD3XgzWXo0=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-JjeOODm5xsRM5cJgCDb89cN60SuEeDzTVe6siKVDdcU=";
|
|
|
|
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"
|
|
wrapProgram $out/bin/$pname --prefix PATH : ${lib.makeBinPath [ gnome.zenity libsForQt5.kdialog ]}
|
|
'';
|
|
|
|
|
|
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 ];
|
|
};
|
|
}
|