From faf44ff2dc888af8e4f9f3fd9153f18dcc8b384d Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Mon, 2 Jul 2018 00:40:37 -0700 Subject: [PATCH] livepeer: init at 0.2.4 --- pkgs/servers/livepeer/default.nix | 35 +++++++++++++++++++++++++++++++ pkgs/servers/livepeer/deps.nix | 20 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 57 insertions(+) create mode 100644 pkgs/servers/livepeer/default.nix create mode 100644 pkgs/servers/livepeer/deps.nix diff --git a/pkgs/servers/livepeer/default.nix b/pkgs/servers/livepeer/default.nix new file mode 100644 index 000000000000..105223f31a5b --- /dev/null +++ b/pkgs/servers/livepeer/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, buildGoPackage +, pkgconfig, ffmpeg +}: + +buildGoPackage rec { + name = "livepeer-${version}"; + version = "0.2.4"; + + goPackagePath = "github.com/livepeer/go-livepeer"; + goDeps = ./deps.nix; + + src = fetchFromGitHub { + owner = "livepeer"; + repo = "go-livepeer"; + rev = version; + sha256 = "07vhw787wq5q4xm7zvswjdsmr20pwfa39wfkgamb7hkrffn3k2ia"; + }; + + buildInputs = [ pkgconfig ffmpeg ]; + + # XXX This removes the -O2 flag, to avoid errors like: + # cgo-dwarf-inference:2:8: error: enumerator value for '__cgo_enum__0' is not an integer constant + # This is a workaround for nixpkgs+golang BUG https://github.com/NixOS/nixpkgs/issues/25959 + hardeningDisable = [ "fortify" ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Official Go implementation of the Livepeer protocol"; + homepage = http://livepeer.org; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ elitak ]; + }; +} diff --git a/pkgs/servers/livepeer/deps.nix b/pkgs/servers/livepeer/deps.nix new file mode 100644 index 000000000000..297d0724a496 --- /dev/null +++ b/pkgs/servers/livepeer/deps.nix @@ -0,0 +1,20 @@ +[ + { + goPackagePath = "github.com/golang/glog"; + fetch = { + type = "git"; + url = "https://github.com/golang/glog"; + rev = "23def4e6c14b4da8ac2ed8007337bc5eb5007998"; + sha256 = "0jb2834rw5sykfr937fxi8hxi2zy80sj2bdn9b3jb4b26ksqng30"; + }; + } + { + goPackagePath = "github.com/ericxtang/m3u8"; + fetch = { + type = "git"; + url = "https://github.com/ericxtang/m3u8"; + rev = "575aeb9f754a5dabcc03d4aa0ed05ecaee26499e"; + sha256 = "08811y4kg6rgj40v80cwjcwhy094qrfigdwjsgr8d6bn64cf9fz2"; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6b1219690d7f..29a972bd1819 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12752,6 +12752,8 @@ with pkgs; lighttpd = callPackage ../servers/http/lighttpd { }; + livepeer = callPackage ../servers/livepeer { ffmpeg = ffmpeg_3; }; + lwan = callPackage ../servers/http/lwan { }; labelImg = callPackage ../applications/science/machine-learning/labelimg { };