@@ -0,0 +1,35 @@
1+{ stdenv, fetchFromGitHub, buildGoPackage
2+, pkgconfig, ffmpeg
3+}:
4+
5+buildGoPackage rec {
6+ name = "livepeer-${version}";
7+ version = "0.2.4";
8+
9+ goPackagePath = "github.com/livepeer/go-livepeer";
10+ goDeps = ./deps.nix;
11+
12+ src = fetchFromGitHub {
13+ owner = "livepeer";
14+ repo = "go-livepeer";
15+ rev = version;
16+ sha256 = "07vhw787wq5q4xm7zvswjdsmr20pwfa39wfkgamb7hkrffn3k2ia";
17+ };
18+
19+ buildInputs = [ pkgconfig ffmpeg ];
20+
21+ # XXX This removes the -O2 flag, to avoid errors like:
22+ # cgo-dwarf-inference:2:8: error: enumerator value for '__cgo_enum__0' is not an integer constant
23+ # This is a workaround for nixpkgs+golang BUG https://github.com/NixOS/nixpkgs/issues/25959
24+ hardeningDisable = [ "fortify" ];
25+
26+ enableParallelBuilding = true;
27+
28+ meta = with stdenv.lib; {
29+ description = "Official Go implementation of the Livepeer protocol";
30+ homepage = http://livepeer.org;
31+ license = licenses.mit;
32+ platforms = platforms.linux;
33+ maintainers = with maintainers; [ elitak ];
34+ };
35+}