diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2017-04-20 20:17:43 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2017-04-20 20:17:43 -0500 |
commit | b68882707290ccafdf315fc617842e81d99faf47 (patch) | |
tree | ec100f5532cdc34f6829e995126025e87a3c6bd3 /pkgs/development/libraries/libbsd/default.nix | |
parent | 8316eb5a5f889bcc859ef4e684df62c368e7b4e2 (diff) |
libbsd: use patch instead of fork
Diffstat (limited to 'pkgs/development/libraries/libbsd/default.nix')
-rw-r--r-- | pkgs/development/libraries/libbsd/default.nix | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/pkgs/development/libraries/libbsd/default.nix b/pkgs/development/libraries/libbsd/default.nix index 9cef18471abec..013fea3e9fc44 100644 --- a/pkgs/development/libraries/libbsd/default.nix +++ b/pkgs/development/libraries/libbsd/default.nix @@ -1,28 +1,19 @@ -{ stdenv, fetchFromGitHub, autoreconfHook }: +{ stdenv, fetchurl, autoreconfHook }: stdenv.mkDerivation rec { name = "libbsd-${version}"; version = "0.8.3"; - nativeBuildInputs = [ autoreconfHook ]; - - preAutoreconf = "mkdir m4"; + src = fetchurl { + url = "http://libbsd.freedesktop.org/releases/${name}.tar.xz"; + sha256 = "1a1l7afchlvvj2zfi7ajcg26bbkh5i98y2v5h9j5p1px9m7n6jwk"; + }; - patchPhase = '' - substituteInPlace configure.ac \ - --replace "m4_esyscmd([./get-version])" "${version}" - sed -i '38i#undef strlcpy' include/bsd/string.h - sed -i '38i#undef strlcat' include/bsd/string.h - substituteInPlace src/setproctitle.c \ - --replace 'extern typeof(setproctitle_impl) setproctitle_stub __attribute__((weak, alias("setproctitle_impl")));' "" - ''; + # darwin changes configure.ac which means we need to regenerate + # the configure scripts + nativeBuildInputs = [ autoreconfHook ]; - src = fetchFromGitHub { - owner = "JackieXie168"; - repo = "libbsd"; - rev = "macosx-${version}"; - sha256 = "1g5h6d7i297m0hs2l0dxvsx6p0z96959pzgp75drbb7mkrf32p2z"; - }; + patches = stdenv.lib.optionals stdenv.isDarwin [ ./darwin.patch ]; meta = with stdenv.lib; { description = "Common functions found on BSD systems"; |