diff --git a/nix/.nixpkgs/config.nix b/nix/.nixpkgs/config.nix index 7fba2da..83ce115 100644 --- a/nix/.nixpkgs/config.nix +++ b/nix/.nixpkgs/config.nix @@ -95,7 +95,7 @@ }; }); - streamlink = overrideOlder pkgs.streamlink (attrs: rec { + streamlink = if builtins.hasAttr "streamlink" pkgs then (overrideOlder pkgs.streamlink (attrs: rec { version = "0.3.0"; name = "streamlink-${version}"; @@ -105,7 +105,7 @@ rev = "${version}"; sha256 = "1bjih6y21vmjmsk3xvhgc1innymryklgylyvjrskqw610niai59j"; }; - }); + })) else pkgs.callPackage ./streamlink.nix {}; yscripts = pkgs.callPackage ../dotfiles/bin {}; diff --git a/nix/.nixpkgs/streamlink.nix b/nix/.nixpkgs/streamlink.nix new file mode 100644 index 0000000..462d74c --- /dev/null +++ b/nix/.nixpkgs/streamlink.nix @@ -0,0 +1,30 @@ +{ stdenv, pythonPackages, fetchFromGitHub, rtmpdump }: + +pythonPackages.buildPythonApplication rec { + version = "0.3.0"; + name = "streamlink-${version}"; + + src = fetchFromGitHub { + owner = "streamlink"; + repo = "streamlink"; + rev = "${version}"; + sha256 = "1bjih6y21vmjmsk3xvhgc1innymryklgylyvjrskqw610niai59j"; + }; + + propagatedBuildInputs = (with pythonPackages; [ pycrypto requests2 ]) ++ [ rtmpdump ]; + + meta = with stdenv.lib; { + homepage = https://github.com/streamlink/streamlink; + description = "CLI for extracting streams from various websites to video player of your choosing"; + longDescription = '' + Streamlink is a CLI utility that pipes flash videos from online + streaming services to a variety of video players such as VLC, or + alternatively, a browser. + + Streamlink is a fork of the livestreamer project. + ''; + license = licenses.bsd2; + platforms = platforms.linux; + maintainers = [ maintainers.dezgeg ]; + }; +}