nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv
2, fetchFromGitHub
3, lib
4, go
5, pkg-config
6, libX11
7, libXcursor
8, libXrandr
9, libXinerama
10, libXi
11, libXext
12, libXxf86vm
13, libGL
14, nixosTests
15}:
16
17stdenv.mkDerivation rec {
18 pname = "darktile";
19 version = "0.0.10";
20
21 src = fetchFromGitHub {
22 owner = "liamg";
23 repo = "darktile";
24 rev = "v${version}";
25 sha256 = "0pdj4yv3qrq56gb67p85ara3g8qrzw5ha787bl2ls4vcx85q7303";
26 };
27
28 nativeBuildInputs = [ go pkg-config ];
29
30 buildInputs = [
31 libX11
32 libXcursor
33 libXrandr
34 libXinerama
35 libXi
36 libXext
37 libXxf86vm
38 libGL
39 ];
40
41 postPatch = ''
42 substituteInPlace scripts/build.sh \
43 --replace "bash" "sh"
44 '';
45
46 postConfigure = ''
47 export GOPATH=$TMP/go
48 '';
49
50 makeFlags = [ "HOME=$TMP" ];
51
52 installPhase = ''
53 runHook preInstall
54
55 install -Dm755 darktile -t $out/bin
56
57 runHook postInstall
58 '';
59
60 passthru.tests.test = nixosTests.terminal-emulators.darktile;
61
62 meta = with lib; {
63 description = "A GPU rendered terminal emulator designed for tiling window managers";
64 homepage = "https://github.com/liamg/darktile";
65 downloadPage = "https://github.com/liamg/darktile/releases";
66 changelog = "https://github.com/liamg/darktile/releases/tag/v${version}";
67 license = licenses.mit;
68 maintainers = with maintainers; [ flexagoon ];
69 };
70}