at master 45 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 autoconf, 6 automake, 7 libtool, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "libatomic_ops"; 12 version = "7.8.4"; 13 14 src = fetchurl { 15 urls = [ 16 "http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${version}.tar.gz" 17 "https://github.com/ivmai/libatomic_ops/releases/download/v${version}/libatomic_ops-${version}.tar.gz" 18 ]; 19 sha256 = "sha256-I1bgAugO9pWHXpcdak/YxhylxvpP0b8xzOVKJpyL/NU="; 20 }; 21 22 outputs = [ 23 "out" 24 "dev" 25 "doc" 26 ]; 27 28 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isCygwin [ 29 autoconf 30 automake 31 libtool 32 ]; 33 34 preConfigure = lib.optionalString stdenv.hostPlatform.isCygwin '' 35 sed -i -e "/libatomic_ops_gpl_la_SOURCES/a libatomic_ops_gpl_la_LIBADD = libatomic_ops.la" src/Makefile.am 36 ./autogen.sh 37 ''; 38 39 meta = { 40 description = "Library for semi-portable access to hardware-provided atomic memory update operations"; 41 license = lib.licenses.gpl2Plus; 42 maintainers = [ lib.maintainers.raskin ]; 43 platforms = with lib.platforms; unix ++ windows; 44 }; 45}