nixpkgs/pkgs/by-name/me/meme-bingo-web/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

43 lines
1.1 KiB
Nix

{ lib
, fetchFromGitea
, rustPlatform
, makeWrapper
, nix-update-script
}:
rustPlatform.buildRustPackage rec {
pname = "meme-bingo-web";
version = "1.1.0";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "annaaurora";
repo = "meme-bingo-web";
rev = "v${version}";
hash = "sha256-AKY0EjeoOnliRN3XSnlCgzCvnWOkZPQz/9QIcr8+hQM=";
};
cargoHash = "sha256-/+9fxIk3EQxG3PzQLRsYcwBHDZaOtWUsAYGa7t1jLHY=";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
mkdir -p $out/share/meme-bingo-web
cp -r {templates,static} $out/share/meme-bingo-web/
wrapProgram $out/bin/meme-bingo-web \
--set MEME_BINGO_TEMPLATES $out/share/meme-bingo-web/templates \
--set MEME_BINGO_STATIC $out/share/meme-bingo-web/static
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Play meme bingo using this neat web app";
mainProgram = "meme-bingo-web";
homepage = "https://codeberg.org/annaaurora/meme-bingo-web";
license = licenses.unlicense;
maintainers = with maintainers; [ annaaurora ];
};
}