summaryrefslogtreecommitdiff
path: root/overlays/xcompose.nix
blob: 2bcd6c01a9aa5cba398052a3e7d0cdca68f44592 (plain)
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
final: prev: {
  xcompose = prev.stdenv.mkDerivation (let
    rev = "150c47fabb9f45e81138f71347dc75f69b5dd987";
  in {
    pname = "xcompose";
    version = builtins.substring 0 8 rev;
    
    src = prev.fetchFromGitHub {
      owner = "kragen";
      repo = "xcompose";
      inherit rev;
      hash = "sha256-XQ0ZuXGvDLz9fJ0yGHtgL4wl9Jx3SG30cGBM2b947iY=";
    };

    nativeBuildInputs = with final; [ perl ];

    postPatch = ''
      substituteInPlace emojitrans2.pl --replace "/usr/bin/env -S perl -p" "${final.perl}/bin/perl -p"
    '';

    installPhase = ''
      mkdir -p $out
      install -t $out \
        dotXCompose frakturcompose \
        emoji.compose modletters.compose tags.compose maths.compose parens.compose
    '';
  });
}