From e45745f1f40efd1a510928c043530ab1c215762d Mon Sep 17 00:00:00 2001 From: Marko Durkovic Date: Thu, 23 Oct 2014 22:46:09 +0200 Subject: [PATCH] cygwin: libatomic_ops: add missing interlibrary dep --- .../libraries/libatomic_ops/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/libatomic_ops/default.nix b/pkgs/development/libraries/libatomic_ops/default.nix index 35ffe6d5fa59..cf74ed3b5f65 100644 --- a/pkgs/development/libraries/libatomic_ops/default.nix +++ b/pkgs/development/libraries/libatomic_ops/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{ stdenv, fetchurl, autoconf, automake, libtool }: let s = # Generated upstream information rec { @@ -9,15 +9,22 @@ let url="http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-7.4.2.tar.gz"; sha256="1pdm0h1y7bgkczr8byg20r6bq15m5072cqm5pny4f9crc9gn3yh4"; }; - buildInputs = [ - ]; -in -stdenv.mkDerivation { + + buildInputs = stdenv.lib.optionals stdenv.isCygwin [ autoconf automake libtool ]; + +in stdenv.mkDerivation { inherit (s) name version; inherit buildInputs; + src = fetchurl { inherit (s) url sha256; }; + + preConfigure = if stdenv.isCygwin then '' + sed -i -e "/libatomic_ops_gpl_la_SOURCES/a libatomic_ops_gpl_la_LIBADD = libatomic_ops.la" src/Makefile.am + ./autogen.sh + '' else null; + meta = { inherit (s) version; description = ''A library for semi-portable access to hardware-provided atomic memory update operations'';