Merge pull request #276618 from remexre/fix-linenoise-pkgconfig

linenoise: 1.0.10 -> 1.0-34-g93b2db9

authored by Janik and committed by GitHub 522f476e 62046f57

+45 -23
+6
maintainers/maintainer-list.nix
··· 15896 githubId = 801525; 15897 name = "rembo10"; 15898 }; 15899 renatoGarcia = { 15900 email = "fgarcia.renato@gmail.com"; 15901 github = "renatoGarcia";
··· 15896 githubId = 801525; 15897 name = "rembo10"; 15898 }; 15899 + remexre = { 15900 + email = "nathan+nixpkgs@remexre.com"; 15901 + github = "remexre"; 15902 + githubId = 4196789; 15903 + name = "Nathan Ringo"; 15904 + }; 15905 renatoGarcia = { 15906 email = "fgarcia.renato@gmail.com"; 15907 github = "renatoGarcia";
-13
pkgs/development/libraries/linenoise/create-pkg-config-file.sh
··· 1 - cat <<EOF > linenoise.pc 2 - prefix=$out 3 - exec_prefix=\${prefix} 4 - libdir=\${exec_prefix}/lib 5 - includedir=\${prefix}/include 6 - 7 - Name: linenoise 8 - Description: A minimal, zero-config, BSD licensed, readline replacement. 9 - Requires: 10 - Version: 1.0.10 11 - Cflags: -I\${includedir}/ \${prefix}/src/linenoise.c 12 - 13 - EOF
···
+29 -10
pkgs/development/libraries/linenoise/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub }: 2 3 stdenv.mkDerivation { 4 pname = "linenoise"; 5 - version = "1.0.10"; # Its version 1.0 plus 10 commits 6 7 src = fetchFromGitHub { 8 owner = "antirez"; 9 repo = "linenoise"; 10 - rev = "c894b9e59f02203dbe4e2be657572cf88c4230c3"; 11 - sha256 = "0wasql7ph5g473zxhc2z47z3pjp42q0dsn4gpijwzbxawid71b4w"; 12 }; 13 14 - buildPhase = ./create-pkg-config-file.sh; 15 16 installPhase = '' 17 - mkdir -p $out/{lib/pkgconfig,src,include} 18 - cp linenoise.c $out/src/ 19 - cp linenoise.h $out/include/ 20 - cp linenoise.pc $out/lib/pkgconfig/ 21 ''; 22 23 meta = { 24 homepage = "https://github.com/antirez/linenoise"; 25 description = "A minimal, zero-config, BSD licensed, readline replacement"; 26 - maintainers = with lib.maintainers; [ fstamour ]; 27 platforms = lib.platforms.unix; 28 license = lib.licenses.bsd2; 29 };
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , validatePkgConfig 5 + }: 6 7 stdenv.mkDerivation { 8 pname = "linenoise"; 9 + version = "1.0-34-g93b2db9"; 10 11 src = fetchFromGitHub { 12 owner = "antirez"; 13 repo = "linenoise"; 14 + rev = "1.0-34-g93b2db9"; 15 + hash = "sha256-GsrYg16gpjHkkmpCU3yGzqNS/buZl+JoWALLvwzmT4A="; 16 }; 17 18 + nativeBuildInputs = [ validatePkgConfig ]; 19 + 20 + buildPhase = '' 21 + runHook preBuild 22 + 23 + $CC -c -o linenoise.o linenoise.c 24 + $CC -shared -o liblinenoise.so linenoise.o 25 + $AR rcs liblinenoise.a linenoise.o 26 + 27 + runHook postBuild 28 + ''; 29 30 installPhase = '' 31 + runHook preInstall 32 + 33 + install -d $out/lib/pkgconfig $out/include 34 + install -m644 linenoise.h $out/include/ 35 + install -m644 liblinenoise.a $out/lib/ 36 + install -m644 liblinenoise.so $out/lib/ 37 + substituteAll ${./linenoise.pc.in} $out/lib/pkgconfig/linenoise.pc 38 + 39 + runHook postInstall 40 ''; 41 42 meta = { 43 homepage = "https://github.com/antirez/linenoise"; 44 description = "A minimal, zero-config, BSD licensed, readline replacement"; 45 + maintainers = with lib.maintainers; [ fstamour remexre ]; 46 platforms = lib.platforms.unix; 47 license = lib.licenses.bsd2; 48 };
+10
pkgs/development/libraries/linenoise/linenoise.pc.in
···
··· 1 + prefix=@out@ 2 + exec_prefix=${prefix} 3 + libdir=${exec_prefix}/lib 4 + includedir=${prefix}/include 5 + 6 + Name: linenoise 7 + Description: A minimal, zero-config, BSD licensed, readline replacement. 8 + Version: @version@ 9 + Libs: -L${libdir} -llinenoise 10 + Cflags: -I${includedir}