alps: fix handling of themes and plugins

This commit is contained in:
Nick Cao 2022-07-08 19:43:23 +08:00
parent 80ffac4097
commit 350faa4484
No known key found for this signature in database
GPG Key ID: 068A56CEF48FA2C1

View File

@ -13,6 +13,20 @@ buildGoModule rec {
vendorSha256 = "sha256-cpY+lYM/nAX3nUaFknrRAavxDk8UDzJkoqFjJ1/KWeg=";
ldflags = [
"-X main.themesPath=${placeholder "out"}/share/alps/themes"
"-X git.sr.ht/~migadu/alps.PluginDir=${placeholder "out"}/share/alps/plugins"
];
postPatch = ''
substituteInPlace plugin.go --replace "const PluginDir" "var PluginDir"
'';
postInstall = ''
mkdir -p "$out/share/alps"
cp -r themes plugins "$out/share/alps/"
'';
proxyVendor = true;
meta = with lib; {