about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/as/asciiquarium-transparent/package.nix
blob: b0b476e12bd985139fcded9d2272884b5ac44745 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
  lib,
  stdenv,
  fetchFromGitHub,
  makeWrapper,
  perl,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "asciiquarium-transparent";
  version = "1.3";

  src = fetchFromGitHub {
    owner = "nothub";
    repo = "asciiquarium";
    rev = "${finalAttrs.version}";
    hash = "sha256-zQyVIfwmhF3WsCeIZLwjDufvKzAfjLxaK2s7WTedqCg=";
  };

  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [ perl ];
  installPhase = ''
    runHook preInstall
    install -Dm555 asciiquarium -t $out/bin
    wrapProgram $out/bin/asciiquarium \
      --set PERL5LIB ${with perl.pkgs; makeFullPerlPath [ TermAnimation ]}
    runHook postInstall
  '';

  meta = {
    description = "An aquarium/sea animation in ASCII art (with option of transparent background)";
    homepage = "https://github.com/nothub/asciiquarium";
    license = lib.licenses.gpl2Only;
    mainProgram = "asciiquarium";
    maintainers = with lib.maintainers; [ quantenzitrone ];
    platforms = perl.meta.platforms;
  };
})