From 7d537c454d8fa314c5424e59aca95446632c034b Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Mon, 26 Feb 2018 09:02:55 +0000 Subject: [PATCH 1/3] avro-c: init at 1.8.2 --- pkgs/development/libraries/avro-c/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/libraries/avro-c/default.nix diff --git a/pkgs/development/libraries/avro-c/default.nix b/pkgs/development/libraries/avro-c/default.nix new file mode 100644 index 00000000000..789bd502c86 --- /dev/null +++ b/pkgs/development/libraries/avro-c/default.nix @@ -0,0 +1,35 @@ +{ stdenv, bash, cmake, fetchurl, pkgconfig, jansson, zlib }: + +let version = "1.8.2"; in + +stdenv.mkDerivation rec { + name = "avro-c-${version}"; + + # + src = fetchurl { + url = "mirror://apache/avro/avro-${version}/c/avro-c-${version}.tar.gz"; + sha256 = "03pixl345kkpn1jds03rpdcwjabi41rgdzi8f7y93gcg5cmrhfa6"; + }; + + patchPhase = '' + substituteInPlace version.sh \ + --replace /bin/bash "$bash/bin/bash" + ''; + + buildInputs = [ + pkgconfig + cmake + jansson + zlib + ]; + + enableParallelBuilding = true; + + meta = { + description = "A C library which implements parts of the Avro Specification"; + homepage = https://avro.apache.org/; + license = stdenv.lib.licenses.asl20; + maintainers = with stdenv.lib.maintainers; [ lblasc ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 81f48f203a7..f1489d5dfa1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -725,6 +725,8 @@ with pkgs; qt4Support = config.avahi.qt4Support or false; }; + avro-c = callPackage ../development/libraries/avro-c { }; + avro-cpp = callPackage ../development/libraries/avro-c++ { boost = boost160; }; aws = callPackage ../tools/virtualization/aws { }; From f65414ea07b3ae1b2df649679d9807d0d2d7d8f6 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sun, 25 Feb 2018 20:58:15 +0000 Subject: [PATCH 2/3] maintainers: add lblasc --- lib/maintainers.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 0cc8fe522a2..d2daf244d5a 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -373,6 +373,7 @@ lasandell = "Luke Sandell "; lassulus = "Lassulus "; layus = "Guillaume Maudoux "; + lblasc = "Luka Blaskovic "; ldesgoui = "Lucas Desgouilles "; league = "Christopher League "; lebastr = "Alexander Lebedev "; From cd0d2444c60b5fe33c456d3cf1a4427c948d8f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 26 Feb 2018 22:27:41 +0000 Subject: [PATCH 3/3] avro-c: nitpicks --- pkgs/development/libraries/avro-c/default.nix | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/pkgs/development/libraries/avro-c/default.nix b/pkgs/development/libraries/avro-c/default.nix index 789bd502c86..8b787855c4d 100644 --- a/pkgs/development/libraries/avro-c/default.nix +++ b/pkgs/development/libraries/avro-c/default.nix @@ -1,35 +1,30 @@ { stdenv, bash, cmake, fetchurl, pkgconfig, jansson, zlib }: -let version = "1.8.2"; in - -stdenv.mkDerivation rec { +let + version = "1.8.2"; +in stdenv.mkDerivation rec { name = "avro-c-${version}"; - # src = fetchurl { url = "mirror://apache/avro/avro-${version}/c/avro-c-${version}.tar.gz"; sha256 = "03pixl345kkpn1jds03rpdcwjabi41rgdzi8f7y93gcg5cmrhfa6"; }; - patchPhase = '' - substituteInPlace version.sh \ - --replace /bin/bash "$bash/bin/bash" + postPatch = '' + patchShebangs . ''; - buildInputs = [ - pkgconfig - cmake - jansson - zlib - ]; + nativeBuildInputs = [ pkgconfig cmake ]; + + buildInputs = [ jansson zlib ]; enableParallelBuilding = true; - meta = { + meta = with stdenv.lib; { description = "A C library which implements parts of the Avro Specification"; homepage = https://avro.apache.org/; - license = stdenv.lib.licenses.asl20; - maintainers = with stdenv.lib.maintainers; [ lblasc ]; - platforms = stdenv.lib.platforms.all; + license = licenses.asl20; + maintainers = with maintainers; [ lblasc ]; + platforms = platforms.all; }; }