1{ stdenv, fetchgit, python3 }:
2
3stdenv.mkDerivation {
4 name = "cortex-2014-08-01";
5
6 src = fetchgit {
7 url = "https://github.com/gglucas/cortex";
8 rev = "e749de6c21aae02386f006fd0401d22b9dcca424";
9 sha256 = "d5d59c5257107344122c701eb370f3740f9957b6b898ac798d797a4f152f614c";
10 };
11
12 buildInputs = [ stdenv python3 ];
13
14 prePatch = ''
15 substituteInPlace cortex --replace "/usr/bin/env python3" "${python3}/bin/python3"
16 '';
17
18 installPhase = ''
19 mkdir -p $out/bin
20 cp cortex $out/bin/
21 chmod +x $out/bin/cortex
22 '';
23
24 meta = with stdenv.lib; {
25 homepage = "http://cortex.glacicle.org";
26 description = "An ncurses reddit browser and monitor";
27 license = licenses.mit;
28 maintainers = with maintainers; [ matthiasbeyer ];
29 };
30
31}