2022-10-06 18:32:54 +00:00
|
|
|
{ stdenvNoCC
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, discordAlias ? false
|
|
|
|
, discord
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "discocss";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.2.3";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mlvzk";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-of7OMgbuwebnFmbefGD1/dOhyTX1Hy7TccnWSRCweW0=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
installPhase = ''
|
2022-10-06 18:32:54 +00:00
|
|
|
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
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A tiny Discord css-injector";
|
2021-06-28 23:13:55 +00:00
|
|
|
changelog = "https://github.com/mlvzk/discocss/releases/tag/v${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://github.com/mlvzk/discocss";
|
|
|
|
license = licenses.mpl20;
|
2021-05-20 23:08:51 +00:00
|
|
|
platforms = platforms.unix;
|
2020-09-25 04:45:31 +00:00
|
|
|
maintainers = with maintainers; [ mlvzk ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "discocss";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|