tldr: use fetchFromGitHub; pkgconfig
pkgconfig is unrelated, but trivial (removes a harmless but distracting error message) and doesn't warrant its own commit.
This commit is contained in:
parent
907481aca8
commit
8b57eb8f17
@ -1,23 +1,25 @@
|
|||||||
{ stdenv, fetchurl, clang, curl, libzip }:
|
{ stdenv, fetchFromGitHub, clang, curl, libzip, pkgconfig }:
|
||||||
|
|
||||||
let version = "1.1.0"; in
|
let version = "1.1.0"; in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "tldr-${version}";
|
name = "tldr-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/tldr-pages/tldr-cpp-client/archive/v${version}.tar.gz";
|
sha256 = "0hxkrzp5njhy7c19v8i3svcb148f1jni7dlv36gc1nmcrz5izsiz";
|
||||||
sha256 = "0f2ijx17hv64w6zrv0vhj1j1jikzsj42657510vxcqqr8zanzlpf";
|
rev = "v${version}";
|
||||||
|
repo = "tldr-cpp-client";
|
||||||
|
owner = "tldr-pages";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ curl clang libzip ];
|
buildInputs = [ curl clang libzip ];
|
||||||
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
|
||||||
preBuild = ''
|
preConfigure = ''
|
||||||
cd src
|
cd src
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -d $prefix/bin
|
install -Dm755 {.,$out/bin}/tldr
|
||||||
install tldr $prefix/bin
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user