Merge pull request #189164 from Kranzes/discocss

This commit is contained in:
Sandro 2022-10-03 22:23:35 +02:00 committed by GitHub
commit 7f644bc323
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,10 @@
{ stdenvNoCC, lib, fetchFromGitHub }:
{ stdenvNoCC
, lib
, fetchFromGitHub
, discordAlias ? false
, discord
, makeWrapper
}:
stdenvNoCC.mkDerivation rec {
pname = "discocss";
@ -13,8 +19,16 @@ stdenvNoCC.mkDerivation rec {
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
install -Dm755 ./discocss $out/bin/discocss
install -Dm755 discocss $out/bin/discocss
'' + lib.optionalString discordAlias ''
wrapProgram $out/bin/discocss --set DISCOCSS_DISCORD_BIN ${discord}/bin/Discord
ln -s $out/bin/discocss $out/bin/Discord
ln -s $out/bin/discocss $out/bin/discord
mkdir -p $out/share
ln -s ${discord}/share/* $out/share
'';
meta = with lib; {