Unverified Commit 1b0cedb1 authored by 7c6f434c's avatar 7c6f434c Committed by GitHub
Browse files

Merge pull request #193754 from Uthar/master

lisp-modules-new: bring over changes from recent nix-cl
parents 16014fea 3185bc70
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -130,5 +130,7 @@ in {")
                                           (:symbol "pkgs")))
                                       (remove "asdf"
                                               (str:split-omit-nulls #\, deps)
                                               :test #'string=))))))))))
                                               :test #'string=))))
                ,@(when (find #\/ name)
                    '(("meta" (:attrs ("broken" (:symbol "true"))))))))))))
      (format f "~%}~%"))))
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
  (make-instance
   'quicklisp-repository
   :dist-url
   "https://beta.quicklisp.org/dist/quicklisp/2021-12-30/"))
   "https://beta.quicklisp.org/dist/quicklisp/2022-07-08/"))

(defun run-importers ()
  (import-lisp-packages *quicklisp* *sqlite*)
+9172 −4013

File changed.

Preview size limit exceeded, changes collapsed.

+16 −24
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ let
    optionalString
    makeLibraryPath
    makeSearchPath
    recurseIntoAttrs
    dontRecurseIntoAttrs
  ;

  inherit (builtins)
@@ -55,11 +57,13 @@ let
  # This is probably causing performance problems...
  flattenedDeps = lispLibs:
    let
      toSet = list: builtins.listToAttrs (map (d: { name = d.pname; value = d; }) list);
      toList = attrValues;
      walk = acc: node:
        if length node.lispLibs == 0
        then acc
        else foldl walk (acc ++ node.lispLibs) node.lispLibs;
    in unique (walk [] { inherit lispLibs; });
        else builtins.foldl' walk (acc // toSet node.lispLibs) node.lispLibs;
    in toList (walk {} { inherit lispLibs; });

  # Stolen from python-packages.nix
  # Actually no idea how this works
@@ -207,11 +211,12 @@ let
        # from storeDir. Otherwise it could try to recompile lisp deps.
        export ASDF_OUTPUT_TRANSLATIONS="${src}:$(pwd):${storeDir}:${storeDir}"

        # Make Nix track the dependencies so that graphs can be generated with
        # nix-store -q --graph
        echo "$lispLibs" >> nix-drvs
        echo "$nativeLibs" >> nix-drvs
        echo "$javaLibs" >> nix-drvs
        # track lisp dependencies for graph generation
        # TODO: Do the propagation like for lisp, native and java like this:
        # https://github.com/teu5us/nix-lisp-overlay/blob/e30dafafa5c1b9a5b0ccc9aaaef9d285d9f0c46b/pkgs/development/lisp-modules/setup-hook.sh
        # Then remove the "echo >> nix-drvs" from buildScript
        echo $lispLibs >> __nix-drvs


        # Finally, compile the systems
        ${lisp} $buildScript
@@ -389,19 +394,6 @@ let
      lispPackagesFor
      lispWithPackages;

    # Uncomment for debugging/development
    # inherit
    #   flattenedDeps
    #   concatMap
    #   attrNames
    #   getAttr
    #   filterAttrs
    #   filter
    #   elem
    #   unique
    #   makeAttrName
    #   length;

    # TODO: uncomment clasp when clasp 1.0.0 is packaged

    # There's got to be a better way than this...
@@ -416,10 +408,10 @@ let

    # Manually defined packages shadow the ones imported from quicklisp

    sbclPackages  = lispPackagesFor sbcl;
    eclPackages   = lispPackagesFor ecl;
    abclPackages  = lispPackagesFor abcl;
    cclPackages   = lispPackagesFor ccl;
    sbclPackages  = recurseIntoAttrs (lispPackagesFor sbcl);
    eclPackages   = dontRecurseIntoAttrs (lispPackagesFor ecl);
    abclPackages  = dontRecurseIntoAttrs (lispPackagesFor abcl);
    cclPackages   = dontRecurseIntoAttrs (lispPackagesFor ccl);
    # claspPackages = lispPackagesFor clasp;

    sbclWithPackages  = lispWithPackages sbcl;
+38 −69
Original line number Diff line number Diff line
@@ -110,34 +110,6 @@ let
    ];
  };

  quri = build-asdf-system {
    src = pkgs.stdenv.mkDerivation {
      pname = "patched";
      version = "source";
      src =  pkgs.fetchzip {
        url = "http://beta.quicklisp.org/archive/quri/2021-04-11/quri-20210411-git.tgz";
        sha256 = "1pkvpiwwhx2fcknr7x47h7036ypkg8xzsskqbl5z315ipfmi8s2m";
      };

      # fix build with ABCL
      buildPhase = ''
        sed -i "s,[#][.](asdf.*,#P\"$out/data/effective_tld_names.dat\")," src/etld.lisp
      '';
      installPhase = ''
        mkdir -pv $out
        cp -r * $out
      '';
    };
    version = "20210411";
    pname = "quri";
    lispLibs = with ql; [
      alexandria
      babel
      cl-utilities
      split-sequence
    ];
  };

  jzon = build-asdf-system {
    src = pkgs.fetchzip {
      url = "https://github.com/Zulu-Inuoe/jzon/archive/6b201d4208ac3f9721c461105b282c94139bed29.tar.gz";
@@ -166,6 +138,15 @@ let
    ];
  };

  cl-liballegro-nuklear = build-with-compile-into-pwd {
    inherit (ql.cl-liballegro-nuklear) pname version src;
    nativeBuildInputs = [ pkgs.allegro5 ];
    nativeLibs = [ pkgs.allegro5 ];
    lispLibs = ql.cl-liballegro-nuklear.lispLibs ++ [ ql.cl-liballegro ];
    patches = [ ./patches/cl-liballegro-nuklear-missing-dll.patch ];
  };


  tuple = build-asdf-system {
    pname = "tuple";
    version = "b74bd067d";
@@ -229,6 +210,35 @@ let
    ];
  };

  lessp = build-asdf-system {
    pname = "lessp";
    version = "0.2-f8a9e4664";
    src = pkgs.fetchzip {
      url = "https://github.com/facts-db/cl-lessp/archive/632217602b85b679e8d420654a0aa39e798ca3b5.tar.gz";
      sha256 = "0i3ia14dzqwjpygd0zn785ff5vqnnmkn75psfpyx0ni3jr71lkq9";
    };
  };

  rollback = build-asdf-system {
    pname = "rollback";
    version = "0.1-5d3f21fda";
    src = pkgs.fetchzip {
      url = "https://github.com/facts-db/cl-rollback/archive/5d3f21fda8f04f35c5e9d20ee3b87db767915d15.tar.gz";
      sha256 = "12dpxsbm2al633y87i8p784k2dn4bbskz6sl40v9f5ljjmjqjzxf";
    };
  };

  facts = build-asdf-system {
    pname = "facts";
    version = "0.1-632217602";
    src = pkgs.fetchzip {
      url = "https://github.com/facts-db/cl-lessp/archive/632217602b85b679e8d420654a0aa39e798ca3b5.tar.gz";
      sha256 = "09z1vwzjm7hlb529jl3hcjnfd11gh128lmdg51im7ar4jv4746iw";
    };
    lispLibs = [ lessp rollback ] ++ [ ql.local-time ];
  };


  cl-fuse = build-with-compile-into-pwd {
    inherit (ql.cl-fuse) pname version src lispLibs;
    nativeBuildInputs = [ pkgs.fuse ];
@@ -262,35 +272,6 @@ let
    ];
  };

  mgl = build-asdf-system {
    pname = "mgl";
    version = "2021-10-07";
    src = pkgs.fetchzip {
      url = "https://github.com/melisgl/mgl/archive/e697791a9bcad3b6e7b3845246a2aa55238cfef7.tar.gz";
      sha256 = "09sf7nq7nmf9q7bh3a5ygl2i2n0nhrx5fk2kv5ili0ckv7g9x72s";
    };
    lispLibs = with ql; [
      alexandria closer-mop array-operations lla cl-reexport mgl-pax
      named-readtables pythonic-string-reader
    ] ++ [ mgl-mat ];
    systems = [ "mgl" "mgl/test" ];
  };

  mgl-mat = build-asdf-system {
    pname = "mgl-mat";
    version = "2021-10-11";
    src = pkgs.fetchzip {
      url = "https://github.com/melisgl/mgl-mat/archive/3710858bc876b1b86e50f1db2abe719e92d810e7.tar.gz";
      sha256 = "1aa2382mi55rp8pd31dz4d94yhfzh30vkggcvmvdfrr4ngffj0dx";
    };
    lispLibs = with ql; [
      alexandria bordeaux-threads cffi cffi-grovel cl-cuda
      flexi-streams ieee-floats lla mgl-pax static-vectors
      trivial-garbage cl-fad
    ];
    systems = [ "mgl-mat" "mgl-mat/test" ];
  };

  mathkit = build-asdf-system {
    inherit (ql.mathkit) pname version src asds lisp;
    lispLibs = ql.mathkit.lispLibs ++ [ ql.sb-cga ];
@@ -351,18 +332,6 @@ let
    version = "f19162e76";
  });

  s-sql_slash_tests = ql.s-sql_slash_tests.overrideLispAttrs (o: {
    lispLibs = o.lispLibs ++ [
      ql.cl-postgres_slash_tests
    ];
  });

  simple-date_slash_postgres-glue = ql.simple-date_slash_postgres-glue.overrideLispAttrs (o: {
    lispLibs = o.lispLibs ++ [
      ql.cl-postgres_slash_tests
    ];
  });

  };

in packages
Loading