nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 576 lines 16 kB view raw
1{ 2 build-asdf-system, 3 spec, 4 quicklispPackagesFor, 5 stdenv, 6 pkgs, 7 ... 8}: 9 10let 11 12 inherit (pkgs.lib) 13 head 14 makeLibraryPath 15 makeSearchPath 16 setAttr 17 hasAttr 18 optionals 19 optionalAttrs 20 isDerivation 21 hasSuffix 22 splitString 23 remove 24 ; 25 26 # Used by builds that would otherwise attempt to write into storeDir. 27 # 28 # Will run build two times, keeping all files created during the 29 # first run, exept the FASL's. Then using that directory tree as the 30 # source of the second run. 31 # 32 # E.g. cl-unicode creating .txt files during compilation 33 build-with-compile-into-pwd = 34 args: 35 let 36 args' = if isDerivation args then args.drvAttrs else args; 37 build = (build-asdf-system (args' // { version = args'.version + "-build"; })).overrideAttrs (o: { 38 buildPhase = with builtins; '' 39 runHook preBuild 40 41 mkdir __fasls 42 export ASDF_OUTPUT_TRANSLATIONS="$(pwd):$(pwd)/__fasls:${storeDir}:${storeDir}" 43 export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$(pwd)// 44 ${o.pkg}/bin/${o.program} ${toString (o.flags or [ ])} < ${o.buildScript} 45 46 runHook postBuild 47 ''; 48 installPhase = '' 49 runHook preInstall 50 51 mkdir -pv $out 52 rm -rf __fasls 53 cp -r * $out 54 55 runHook postInstall 56 ''; 57 }); 58 in 59 build-asdf-system ( 60 args' 61 // { 62 # Patches are already applied in `build` 63 patches = [ ]; 64 postPatch = ""; 65 src = build; 66 } 67 ); 68 69 # Makes it so packages imported from Quicklisp can be re-used as 70 # lispLibs ofpackages in this file. 71 ql = quicklispPackagesFor spec; 72 73 packages = ql.overrideScope ( 74 self: super: 75 { 76 77 cl-unicode = build-with-compile-into-pwd { 78 inherit (super.cl-unicode) 79 pname 80 version 81 src 82 systems 83 ; 84 lispLibs = super.cl-unicode.lispLibs ++ [ self.flexi-streams ]; 85 }; 86 87 jzon = super.com_dot_inuoe_dot_jzon; 88 89 _40ants-routes = super._40ants-routes.overrideLispAttrs (o: { 90 systems = o.systems ++ [ "40ants-routes/handler" ]; 91 }); 92 93 reblocks-ui2 = super.reblocks-ui2.overrideLispAttrs (o: { 94 systems = o.systems ++ [ 95 "reblocks-ui2/themes/color" 96 "reblocks-ui2/themes/tailwind" 97 "reblocks-ui2/utils/padding" 98 "reblocks-ui2/utils/align" 99 "reblocks-ui2/card" 100 "reblocks-ui2/card/view" 101 ]; 102 }); 103 104 april = super.april.overrideLispAttrs (o: { 105 systems = o.systems ++ [ "cape" ]; 106 }); 107 108 cl-notify = build-asdf-system { 109 pname = "cl-notify"; 110 version = "20080904-138ca7038"; 111 src = pkgs.fetchzip { 112 url = "https://repo.or.cz/cl-notify.git/snapshot/138ca703861f4a1fbccbed557f92cf4d213668a1.tar.gz"; 113 sha256 = "0k6ns6fzvjcbpsqgx85r4g5m25fvrdw9481i9vyabwym9q8bbqwx"; 114 }; 115 lispLibs = [ 116 self.cffi 117 ]; 118 nativeLibs = [ 119 pkgs.libnotify 120 ]; 121 }; 122 123 cl-liballegro-nuklear = build-with-compile-into-pwd super.cl-liballegro-nuklear; 124 125 cl-project = super.cl-project.overrideLispAttrs { 126 # install skeleton.asd 127 postInstall = '' 128 cp -v skeleton/skeleton.asd $out/skeleton 129 ''; 130 }; 131 132 lessp = build-asdf-system { 133 pname = "lessp"; 134 version = "0.2-f8a9e4664"; 135 src = pkgs.fetchzip { 136 url = "https://github.com/facts-db/cl-lessp/archive/632217602b85b679e8d420654a0aa39e798ca3b5.tar.gz"; 137 sha256 = "0i3ia14dzqwjpygd0zn785ff5vqnnmkn75psfpyx0ni3jr71lkq9"; 138 }; 139 }; 140 141 rollback = build-asdf-system { 142 pname = "rollback"; 143 version = "0.1-5d3f21fda"; 144 src = pkgs.fetchzip { 145 url = "https://github.com/facts-db/cl-rollback/archive/5d3f21fda8f04f35c5e9d20ee3b87db767915d15.tar.gz"; 146 sha256 = "12dpxsbm2al633y87i8p784k2dn4bbskz6sl40v9f5ljjmjqjzxf"; 147 }; 148 }; 149 150 facts = build-asdf-system { 151 pname = "facts"; 152 version = "0.1-632217602"; 153 src = pkgs.fetchzip { 154 url = "https://beta.quicklisp.org/archive/cl-facts/2022-11-06/cl-facts-20221106-git.tgz"; 155 sha256 = "sha256-PBpyyJYkq1NjKK9VikSAL4TmrGRwUJlEWRSeKj/f4Sc="; 156 }; 157 lispLibs = [ 158 self.lessp 159 self.rollback 160 self.local-time 161 ]; 162 }; 163 164 cl-fuse = build-with-compile-into-pwd { 165 inherit (super.cl-fuse) 166 pname 167 version 168 src 169 lispLibs 170 ; 171 nativeBuildInputs = [ pkgs.fuse ]; 172 nativeLibs = [ pkgs.fuse ]; 173 }; 174 175 cl-containers = build-asdf-system { 176 inherit (super.cl-containers) pname version src; 177 lispLibs = super.cl-containers.lispLibs ++ [ self.moptilities ]; 178 systems = [ 179 "cl-containers" 180 "cl-containers/with-moptilities" 181 ]; 182 }; 183 184 swank = build-with-compile-into-pwd rec { 185 inherit (super.swank) pname lispLibs; 186 version = "2.29.1"; 187 src = pkgs.fetchFromGitHub { 188 owner = "slime"; 189 repo = "slime"; 190 rev = "v${version}"; 191 hash = "sha256-5hNB5XxbTER4HX3dn4umUGnw6UeiTQkczmggFz4uWoE="; 192 }; 193 systems = [ 194 "swank" 195 "swank/exts" 196 ]; 197 patches = [ ./patches/swank-pure-paths.patch ]; 198 postConfigure = '' 199 substituteAllInPlace swank-loader.lisp 200 ''; 201 }; 202 203 slynk = build-asdf-system { 204 pname = "slynk"; 205 version = "trunk"; 206 src = pkgs.fetchFromGitHub { 207 owner = "joaotavora"; 208 repo = "sly"; 209 rev = "ba40c8f054ec3b7040a6c36a1ef3e9596b936421"; 210 hash = "sha256-hoaCZtyezuXptDPnAvBTT0SZ14M9Ifrmki3beBOwFmI="; 211 }; 212 systems = [ 213 "slynk" 214 "slynk/arglists" 215 "slynk/fancy-inspector" 216 "slynk/package-fu" 217 "slynk/mrepl" 218 "slynk/trace-dialog" 219 "slynk/profiler" 220 "slynk/stickers" 221 "slynk/indentation" 222 "slynk/retro" 223 ]; 224 }; 225 226 cephes = build-with-compile-into-pwd { 227 inherit (super.cephes) 228 pname 229 version 230 src 231 lispLibs 232 ; 233 patches = [ ./patches/cephes-make.patch ]; 234 postPatch = '' 235 find \( -name '*.dll' -o -name '*.dylib' -o -name '*.so' \) -delete 236 ''; 237 postConfigure = '' 238 substituteAllInPlace cephes.asd 239 ''; 240 postInstall = '' 241 find $out -name '*.o' -delete 242 ''; 243 }; 244 245 clx-truetype = build-asdf-system { 246 pname = "clx-truetype"; 247 version = "20160825-git"; 248 src = pkgs.fetchzip { 249 url = "http://beta.quicklisp.org/archive/clx-truetype/2016-08-25/clx-truetype-20160825-git.tgz"; 250 sha256 = "079hyp92cjkdfn6bhkxsrwnibiqbz4y4af6nl31lzw6nm91j5j37"; 251 }; 252 lispLibs = with self; [ 253 alexandria 254 bordeaux-threads 255 cl-aa 256 cl-fad 257 cl-paths 258 cl-paths-ttf 259 cl-store 260 cl-vectors 261 clx 262 trivial-features 263 zpb-ttf 264 ]; 265 }; 266 267 mathkit = build-asdf-system { 268 inherit (super.mathkit) 269 pname 270 version 271 src 272 asds 273 ; 274 lispLibs = super.mathkit.lispLibs ++ [ super.sb-cga ]; 275 }; 276 277 stumpwm = super.stumpwm.overrideLispAttrs { 278 inherit (pkgs.stumpwm) src version; 279 meta = { 280 inherit (pkgs.stumpwm.meta) description license homepage; 281 }; 282 }; 283 284 clfswm = super.clfswm.overrideAttrs (o: { 285 buildScript = pkgs.writeText "build-clfswm.lisp" '' 286 (load "${o.asdfFasl}/asdf.${o.faslExt}") 287 (asdf:load-system 'clfswm) 288 (sb-ext:save-lisp-and-die 289 "clfswm" 290 :executable t 291 #+sb-core-compression :compression 292 #+sb-core-compression t 293 :toplevel #'clfswm:main) 294 ''; 295 installPhase = o.installPhase + '' 296 mkdir -p $out/bin 297 mv $out/clfswm $out/bin 298 ''; 299 }); 300 301 magicl = build-with-compile-into-pwd { 302 inherit (super.magicl) 303 pname 304 version 305 src 306 lispLibs 307 ; 308 nativeBuildInputs = [ pkgs.gfortran ]; 309 nativeLibs = [ pkgs.openblas ]; 310 }; 311 312 cl-gtk4 = build-asdf-system { 313 pname = "cl-gtk4"; 314 version = "1.0.0"; 315 src = pkgs.fetchFromGitHub { 316 owner = "bohonghuang"; 317 repo = "cl-gtk4"; 318 rev = "ff60e3495cdbba5c09d0bb8aa49f3184cc060c8e"; 319 hash = "sha256-06cyPf+5z+GE3YvZEJ67kC281nkwRz/hoaykTISsni0="; 320 }; 321 lispLibs = with self; [ 322 cl-gobject-introspection-wrapper 323 cl-glib 324 cl-gio 325 cl-gobject 326 ]; 327 nativeBuildInputs = [ 328 pkgs.gobject-introspection 329 pkgs.gtk4 330 ]; 331 nativeLibs = [ 332 pkgs.gtk4 333 ]; 334 }; 335 336 cl-gtk4_dot_adw = build-asdf-system { 337 pname = "cl-gtk4.adw"; 338 version = self.cl-gtk4.version; 339 src = self.cl-gtk4.src; 340 lispLibs = with self; [ 341 cl-gobject-introspection-wrapper 342 cl-gtk4 343 ]; 344 nativeBuildInputs = [ 345 pkgs.libadwaita 346 ]; 347 nativeLibs = [ 348 pkgs.libadwaita 349 ]; 350 }; 351 352 cl-gtk4_dot_webkit = build-asdf-system { 353 pname = "cl-gtk4.webkit"; 354 version = self.cl-gtk4.version; 355 src = self.cl-gtk4.src; 356 lispLibs = with self; [ 357 cl-gobject-introspection-wrapper 358 cl-gtk4 359 ]; 360 nativeBuildInputs = [ 361 pkgs.webkitgtk_6_0 362 ]; 363 nativeLibs = [ 364 pkgs.webkitgtk_6_0 365 ]; 366 }; 367 368 cl-avro = build-asdf-system { 369 pname = "cl-avro"; 370 version = "trunk"; 371 src = pkgs.fetchFromGitHub { 372 owner = "SahilKang"; 373 repo = "cl-avro"; 374 rev = "b8fa26320fa0ae88390215140d57f9cca937f691"; 375 hash = "sha256-acXsotvKWuffrLbrG9YJ8yZc5E6WC8N0qCFCAiX6N0Q="; 376 }; 377 lispLibs = with self; [ 378 alexandria 379 babel 380 chipz 381 closer-mop 382 ieee-floats 383 flexi-streams 384 local-time 385 local-time-duration 386 md5 387 salza2 388 st-json 389 time-interval 390 trivial-extensible-sequences 391 ]; 392 }; 393 394 frugal-uuid = super.frugal-uuid.overrideLispAttrs (o: { 395 systems = [ 396 "frugal-uuid" 397 "frugal-uuid/non-frugal" 398 "frugal-uuid/benchmark" 399 "frugal-uuid/test" 400 ]; 401 lispLibs = 402 o.lispLibs 403 ++ (with self; [ 404 ironclad 405 babel 406 trivial-clock 407 trivial-benchmark 408 fiveam 409 ]); 410 }); 411 412 duckdb = super.duckdb.overrideLispAttrs (o: { 413 systems = [ 414 "duckdb" 415 "duckdb/test" 416 "duckdb/benchmark" 417 ]; 418 }); 419 420 polyclot = build-asdf-system { 421 pname = "polyclot"; 422 version = "trunk"; 423 src = pkgs.fetchfossil { 424 url = "https://fossil.turtleware.eu/fossil.turtleware.eu/polyclot"; 425 rev = "18500c968b1fc1e2a915b5c70b8cddc4a2b54de51da4eedc5454e42bfea3b479"; 426 sha256 = "sha256-KgBL1QQN4iG6d8E9GlKAuxSwkrY6Zy7e1ZzEDGKad+A="; 427 }; 428 systems = [ 429 "eu.turtleware.polyclot" 430 "eu.turtleware.polyclot/demo" 431 ]; 432 lispLibs = with self; [ 433 clim 434 mcclim 435 mcclim-layouts 436 ]; 437 }; 438 439 kons-9 = build-asdf-system { 440 pname = "kons-9"; 441 version = "trunk"; 442 src = pkgs.fetchFromGitHub { 443 owner = "kaveh808"; 444 repo = "kons-9"; 445 rev = "08770e7fbb839b91fd035f1cd4a50ecc81b42d57"; 446 sha256 = "sha256-Tit/qmOU5+zp43/ecIXGbh4CtgWzltWM7tHdVWkga0k="; 447 }; 448 systems = [ 449 "kons-9" 450 "kons-9/testsuite" 451 ]; 452 patches = [ ./patches/kons-9-fix-testsuite-compilation.patch ]; 453 lispLibs = with self; [ 454 closer-mop 455 trivial-main-thread 456 trivial-backtrace 457 cffi 458 cl-opengl 459 cl-glu 460 cl-glfw3 461 cl-paths-ttf 462 zpb-ttf 463 cl-vectors 464 origin 465 clobber 466 shasht 467 org_dot_melusina_dot_confidence 468 ]; 469 }; 470 471 nsb-cga = super.nsb-cga.overrideLispAttrs (old: { 472 lispLibs = old.lispLibs ++ [ self.sb-cga ]; 473 }); 474 475 qlot-cli = build-asdf-system rec { 476 pname = "qlot"; 477 version = "1.5.2"; 478 479 src = pkgs.fetchFromGitHub { 480 owner = "fukamachi"; 481 repo = "qlot"; 482 tag = version; 483 hash = "sha256-j9iT25Yz9Z6llCKwwiHlVNKLqwuKvY194LrAzXuljsE="; 484 }; 485 486 lispLibs = with self; [ 487 archive 488 deflate 489 dexador 490 fuzzy-match 491 ironclad 492 lparallel 493 yason 494 ]; 495 496 nativeLibs = [ 497 pkgs.openssl 498 ]; 499 500 nativeBuildInputs = [ 501 pkgs.makeWrapper 502 ]; 503 504 buildScript = pkgs.writeText "build-qlot-cli" '' 505 (load "${self.qlot-cli.asdfFasl}/asdf.${self.qlot-cli.faslExt}") 506 (asdf:load-system :qlot/command) 507 (asdf:load-system :qlot/subcommands) 508 509 ;; Use uiop:dump-image instead of sb-ext:dump-image for the image restore hooks 510 (setf uiop:*image-entry-point* #'qlot/cli:main) 511 (uiop:dump-image "qlot" 512 :executable t 513 #+sb-core-compression :compression 514 #+sb-core-compression t) 515 ''; 516 517 installPhase = '' 518 runHook preInstall 519 520 mkdir -p $out/bin 521 cp qlot.asd $out 522 rm *.asd 523 cp -r * $out 524 525 mv $out/qlot $out/bin 526 wrapProgram $out/bin/qlot \ 527 --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH 528 529 runHook postInstall 530 ''; 531 532 meta.mainProgram = "qlot"; 533 }; 534 535 fset = super.fset.overrideLispAttrs (old: { 536 systems = [ 537 "fset" 538 "fset/test" 539 ]; 540 meta = { 541 description = "Functional collections library"; 542 homepage = "https://gitlab.common-lisp.net/fset/fset/-/wikis/home"; 543 license = pkgs.lib.licenses.llgpl21; 544 }; 545 }); 546 547 thih-coalton = self.coalton; 548 quil-coalton = self.coalton; 549 coalton = super.coalton.overrideLispAttrs (old: { 550 systems = [ 551 "coalton" 552 "thih-coalton" 553 "quil-coalton" 554 "thih-coalton/tests" 555 "quil-coalton/tests" 556 "coalton/tests" 557 ]; 558 lispLibs = old.lispLibs ++ [ self.fiasco ]; 559 nativeLibs = [ pkgs.mpfr ]; 560 meta = { 561 description = "Statically typed functional programming language that supercharges Common Lisp"; 562 homepage = "https://coalton-lang.github.io"; 563 license = pkgs.lib.licenses.mit; 564 }; 565 }); 566 567 } 568 // optionalAttrs pkgs.config.allowAliases { 569 cl-glib_dot_gio = throw "cl-glib_dot_gio was replaced by cl-gio"; 570 cl-gtk4_dot_webkit2 = throw "cl-gtk4_dot_webkit2 was replaced by cl-gtk4_dot_webkit"; 571 stumpwm-unwrapped = throw "stumpwm-unwrapped is now just stumpwm"; 572 } 573 ); 574 575in 576packages