Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at staging-python 140 lines 3.3 kB view raw
1{ pkgs, build-asdf-system, fixup ? pkgs.lib.id, ... }: 2 3with pkgs; 4with lib; 5with lib.lists; 6with lib.strings; 7 8let 9 10 # FIXME: automatically add nativeLibs based on conditions signalled 11 12 extras = { 13 "cl+ssl" = pkg: { 14 nativeLibs = [ openssl ]; 15 }; 16 cl-cffi-gtk-glib = pkg: { 17 nativeLibs = [ glib ]; 18 }; 19 cl-cffi-gtk-cairo = pkg: { 20 nativeLibs = [ cairo ]; 21 }; 22 cl-cffi-gtk-gdk = pkg: { 23 nativeLibs = [ gtk3 ]; 24 }; 25 cl-cffi-gtk-gdk-pixbuf = pkg: { 26 nativeLibs = [ gdk-pixbuf ]; 27 }; 28 cl-cffi-gtk-pango = pkg: { 29 nativeLibs = [ pango ]; 30 }; 31 cl-gobject-introspection = pkg: { 32 nativeLibs = [ glib gobject-introspection ]; 33 }; 34 cl-mysql = pkg: { 35 nativeLibs = [ mysql-client ]; 36 }; 37 clsql-postgresql = pkg: { 38 nativeLibs = [ postgresql.lib ]; 39 }; 40 clsql-sqlite3 = pkg: { 41 nativeLibs = [ sqlite ]; 42 }; 43 cl-webkit2 = pkg: { 44 nativeLibs = [ webkitgtk ]; 45 }; 46 dbd-mysql = pkg: { 47 nativeLibs = [ mysql-client ]; 48 }; 49 lla = pkg: { 50 nativeLibs = [ openblas ]; 51 }; 52 cffi-libffi = pkg: { 53 nativeBuildInputs = [ libffi ]; 54 nativeLibs = [ libffi ]; 55 }; 56 cl-rabbit = pkg: { 57 nativeBuildInputs = [ rabbitmq-c ]; 58 nativeLibs = [ rabbitmq-c ]; 59 }; 60 trivial-ssh-libssh2 = pkg: { 61 nativeLibs = [ libssh2 ]; 62 }; 63 sqlite = pkg: { 64 nativeLibs = [ sqlite ]; 65 }; 66 cl-libuv = pkg: { 67 nativeBuildInputs = [ libuv ]; 68 nativeLibs = [ libuv ]; 69 }; 70 cl-liballegro = pkg: { 71 # build doesnt fail without this, but fails on runtime 72 # weird... 73 nativeLibs = [ allegro5 ]; 74 }; 75 classimp = pkg: { 76 nativeLibs = [ assimp ]; 77 }; 78 sdl2 = pkg: { 79 nativeLibs = [ SDL2 ]; 80 }; 81 lispbuilder-sdl-cffi = pkg: { 82 nativeLibs = [ SDL ]; 83 }; 84 cl-opengl = pkg: { 85 nativeLibs = [ libGL ]; 86 }; 87 cl-glu = pkg: { 88 nativeLibs = [ libGLU ]; 89 }; 90 cl-glut = pkg: { 91 nativeLibs = [ freeglut ]; 92 }; 93 cl-glfw = pkg: { 94 nativeLibs = [ glfw ]; 95 }; 96 cl-glfw-opengl-core = pkg: { 97 nativeLibs = [ libGL ]; 98 }; 99 cl-glfw3 = pkg: { 100 nativeLibs = [ glfw ]; 101 }; 102 lev = pkg: { 103 nativeLibs = [ libev ]; 104 }; 105 cl-rdkafka = pkg: { 106 nativeBuildInputs = [ rdkafka ]; 107 nativeLibs = [ rdkafka ]; 108 }; 109 cl-async-ssl = pkg: { 110 nativeLibs = [ openssl ]; 111 }; 112 osicat = pkg: { 113 LD_LIBRARY_PATH = "${pkg}/posix/"; 114 }; 115 iolib = pkg: { 116 nativeBuildInputs = [ libfixposix ]; 117 nativeLibs = [ libfixposix ]; 118 systems = [ "iolib" "iolib/os" "iolib/pathnames" ]; 119 }; 120 }; 121 122 qlpkgs = 123 if builtins.pathExists ./imported.nix 124 # then filterAttrs (n: v: all (check: !(check n v)) broken) (import ./imported.nix { inherit pkgs; }) 125 then import ./imported.nix { inherit (pkgs) runCommand fetchzip; pkgs = builtQlpkgs; } 126 else {}; 127 128 builtQlpkgs = mapAttrs (n: v: build v) qlpkgs; 129 130 build = pkg: 131 let 132 builtPkg = build-asdf-system pkg; 133 withExtras = pkg // 134 (optionalAttrs 135 (hasAttr pkg.pname extras) 136 (extras.${pkg.pname} builtPkg)); 137 fixedUp = fixup withExtras; 138 in build-asdf-system fixedUp; 139 140in builtQlpkgs