1 { lib, stdenv, fetchurl, autoconf, automake, libtool }:
3 stdenv.mkDerivation rec {
4 pname = "libatomic_ops";
9 "http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${version}.tar.gz"
10 "https://github.com/ivmai/libatomic_ops/releases/download/v${version}/libatomic_ops-${version}.tar.gz"
12 sha256 = "sha256-OQ8kTUJHFHNbcFDQVlZ2FbO48pAIpmPCYvtUjxgC0pI=";
15 outputs = [ "out" "dev" "doc" ];
17 nativeBuildInputs = lib.optionals stdenv.isCygwin [ autoconf automake libtool ];
19 preConfigure = lib.optionalString stdenv.isCygwin ''
20 sed -i -e "/libatomic_ops_gpl_la_SOURCES/a libatomic_ops_gpl_la_LIBADD = libatomic_ops.la" src/Makefile.am
25 description = "A library for semi-portable access to hardware-provided atomic memory update operations";
26 license = lib.licenses.gpl2Plus ;
27 maintainers = [lib.maintainers.raskin];
28 platforms = with lib.platforms; unix ++ windows;