571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{ stdenvNoCC
|
|
, lib
|
|
, fetchFromGitHub
|
|
, discordAlias ? false
|
|
, discord
|
|
, makeWrapper
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "discocss";
|
|
version = "0.2.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mlvzk";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-of7OMgbuwebnFmbefGD1/dOhyTX1Hy7TccnWSRCweW0=";
|
|
};
|
|
|
|
dontBuild = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
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; {
|
|
description = "Tiny Discord css-injector";
|
|
changelog = "https://github.com/mlvzk/discocss/releases/tag/v${version}";
|
|
homepage = "https://github.com/mlvzk/discocss";
|
|
license = licenses.mpl20;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ mlvzk ];
|
|
mainProgram = "discocss";
|
|
};
|
|
}
|