summary refs log tree commit diff
path: root/pkgs/applications/terminal-emulators/darktile/default.nix
blob: 17af8457cb1038a6fbe2d8e240f2dc594582ab36 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{ stdenv
, buildGoModule
, fetchFromGitHub
, lib
, go
, pkg-config
, libX11
, libXcursor
, libXrandr
, libXinerama
, libXi
, libXext
, libXxf86vm
, libGL
, nixosTests
}:

stdenv.mkDerivation rec {
  pname = "darktile";
  version = "0.0.10";

  src = fetchFromGitHub {
    owner = "liamg";
    repo = "darktile";
    rev = "v${version}";
    sha256 = "0pdj4yv3qrq56gb67p85ara3g8qrzw5ha787bl2ls4vcx85q7303";
  };

  nativeBuildInputs = [ go pkg-config ];

  buildInputs = [
    libX11
    libXcursor
    libXrandr
    libXinerama
    libXi
    libXext
    libXxf86vm
    libGL
  ];

  postPatch = ''
    substituteInPlace scripts/build.sh \
      --replace "bash" "sh"
  '';

  postConfigure = ''
    export GOPATH=$TMP/go
  '';

  makeFlags = [ "HOME=$TMP" ];

  installPhase = ''
    runHook preInstall

    install -Dm755 darktile -t $out/bin

    runHook postInstall
  '';

  passthru.tests.test = nixosTests.terminal-emulators.darktile;

  meta = with lib; {
    description = "A GPU rendered terminal emulator designed for tiling window managers";
    homepage = "https://github.com/liamg/darktile";
    downloadPage = "https://github.com/liamg/darktile/releases";
    changelog = "https://github.com/liamg/darktile/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ flexagoon ];
  };
}