nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 95 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 gcc_meta, 5 release_version, 6 version, 7 getVersionFile, 8 monorepoSrc ? null, 9 fetchpatch, 10 autoreconfHook269, 11 runCommand, 12}: 13stdenv.mkDerivation (finalAttrs: { 14 pname = "libatomic"; 15 inherit version; 16 17 src = runCommand "libatomic-src-${version}" { src = monorepoSrc; } '' 18 runPhase unpackPhase 19 20 mkdir -p "$out/gcc" 21 cp gcc/BASE-VER "$out/gcc" 22 cp gcc/DATESTAMP "$out/gcc" 23 24 cp -r libatomic "$out" 25 26 cp -r config "$out" 27 cp -r multilib.am "$out" 28 cp -r libtool.m4 "$out" 29 30 cp config.guess "$out" 31 cp config.rpath "$out" 32 cp config.sub "$out" 33 cp config-ml.in "$out" 34 cp ltmain.sh "$out" 35 cp install-sh "$out" 36 cp mkinstalldirs "$out" 37 38 [[ -f MD5SUMS ]]; cp MD5SUMS "$out" 39 ''; 40 41 patches = [ 42 (fetchpatch { 43 name = "custom-threading-model.patch"; 44 url = "https://github.com/gcc-mirror/gcc/commit/e5d853bbe9b05d6a00d98ad236f01937303e40c4.diff"; 45 hash = "sha256-U1Eh6ByhmseHQigfHIyO4MlAQB3fECmpPEP/M00DOg0="; 46 includes = [ 47 "config/*" 48 "libatomic/configure.ac" 49 ]; 50 }) 51 (getVersionFile "libatomic/gthr-include.patch") 52 ]; 53 54 postUnpack = '' 55 mkdir -p ./build 56 buildRoot=$(readlink -e "./build") 57 ''; 58 59 preAutoreconf = '' 60 sourceRoot=$(readlink -e "./libatomic") 61 cd $sourceRoot 62 ''; 63 64 enableParallelBuilding = true; 65 66 nativeBuildInputs = [ 67 autoreconfHook269 68 ]; 69 70 configurePlatforms = [ 71 "build" 72 "host" 73 ]; 74 75 configureFlags = [ 76 "--disable-dependency-tracking" 77 "cross_compiling=true" 78 "--disable-multilib" 79 ]; 80 81 preConfigure = '' 82 cd "$buildRoot" 83 configureScript=$sourceRoot/configure 84 ''; 85 86 doCheck = true; 87 88 passthru = { 89 isGNU = true; 90 }; 91 92 meta = gcc_meta // { 93 homepage = "https://gcc.gnu.org/"; 94 }; 95})