summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs/chapter-marker/default.nix
blob: 5ffb63ae98e57308acb8888590ba061987b2de56 (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
29
30
31
{ coreutils, fetchFromGitHub, makeWrapper, xclip, libnotify, stdenv, ... }:

stdenv.mkDerivation rec {
  name = "chapter-marker-${version}";
  version = "master";
  src = fetchFromGitHub {
    owner = "makefu";
    repo = "chapter-marker";
    rev = "71b9bb8bc4d6fa87de6bea8f42d5486d05cf5443";
    sha256 = "13cvk24pwwyv9i21h57690s5niwkcrcvn8l24zfxwbgq0wwzw38x";
  };

  buildInputs = [ makeWrapper ];

  installPhase =
    let
      path = stdenv.lib.makeBinPath [
        coreutils
        libnotify
        xclip
      ];
    in
    ''
      mkdir -p $out/bin
      cp chapter-mark chapter-start $out/bin/
      wrapProgram $out/bin/chapter-mark \
        --prefix PATH : ${path}
      wrapProgram $out/bin/chapter-start \
        --prefix PATH : ${path}
    '';
}