libation: remove outdated practices and format

- format with `nixfmt`
- substitute `${pname}` with string literal
- use `--replace-fail` over `--replace`
This commit is contained in:
TomaSajt 2024-05-03 19:48:13 +02:00
parent df2353cfdc
commit dcc5bc7447
No known key found for this signature in database
GPG Key ID: F011163C050122A1

View File

@ -1,20 +1,21 @@
{ lib
, stdenv
, buildDotnetModule
, fetchFromGitHub
, dotnetCorePackages
, wrapGAppsHook3
{
lib,
stdenv,
buildDotnetModule,
fetchFromGitHub,
dotnetCorePackages,
wrapGAppsHook3,
, libX11
, libICE
, libSM
, libXi
, libXcursor
, libXext
, libXrandr
, fontconfig
, glew
, gtk3
libX11,
libICE,
libSM,
libXi,
libXcursor,
libXext,
libXrandr,
fontconfig,
glew,
gtk3,
}:
buildDotnetModule rec {
@ -61,10 +62,10 @@ buildDotnetModule rec {
];
postInstall = ''
install -Dm644 LoadByOS/LinuxConfigApp/libation_glass.svg $out/share/icons/hicolor/scalable/apps/${pname}.svg
install -Dm644 LoadByOS/LinuxConfigApp/Libation.desktop $out/share/applications/${pname}.desktop
substituteInPlace $out/share/applications/${pname}.desktop \
--replace "/usr/bin/libation" "${meta.mainProgram}"
install -Dm644 LoadByOS/LinuxConfigApp/libation_glass.svg $out/share/icons/hicolor/scalable/apps/libation.svg
install -Dm644 LoadByOS/LinuxConfigApp/Libation.desktop $out/share/applications/libation.desktop
substituteInPlace $out/share/applications/libation.desktop \
--replace-fail "/usr/bin/libation" "${meta.mainProgram}"
'';
# wrap manually, because we need lower case excutables