Giter Club home page Giter Club logo

Comments (1)

Uthar avatar Uthar commented on August 24, 2024

Hi @evertedsphere !

Sorry for the late response,

Regarding overrides - in this code ("nix-cl"), there is a packageOverlays argument to sbcl.override, like this:

(LINK) https://github.com/Uthar/nix-cl/blob/master/doc/api.md#overlaying-packages-packageoverlays

sbcl.override { 
  packageOverlays = self: super: { 
    alexandria = pkgs.hello; 
  }; 
} 

But, in Nixpkgs, there is instead sbcl.withOverrides, like this:

(LINK) https://nixos.org/manual/nixpkgs/stable/#lisp-including-external-pkg-in-scope

let
  alexandria = sbcl.buildASDFSystem rec {
    pname = "alexandria";
    version = "1.4";
    src = fetchFromGitLab {
      domain = "gitlab.common-lisp.net";
      owner = "alexandria";
      repo = "alexandria";
      rev = "v${version}";
      hash = "sha256-1Hzxt65dZvgOFIljjjlSGgKYkj+YBLwJCACi5DZsKmQ=";
    };
  };
  sbcl' = sbcl.withOverrides (self: super: {
    inherit alexandria;
  });
in sbcl'.pkgs.alexandria

I think it's better to use the version in Nixpkgs - because it is more stable. (It contains a version adapted from this repo.)

With that in mind - here is a modified version of your flake.nix.

{
  description = "cl-dev";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = inputs@{ flake-utils, nixpkgs, ... }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
          inherit system;
          config.allowUnfree = true;
          overlays = [ ];
        };
        sbcl = pkgs.sbcl.withOverrides (self: super: {
          slynk = super.slynk.overrideLispAttrs (o: {
            systems = o.systems ++ [ "slynk/mrepl" ];
          });
          slynk-stepper = pkgs.sbcl.buildASDFSystem {
            pname = "slynk-stepper";
            version = "9999";
            src = pkgs.fetchFromGitHub {
              owner = "joaotavora";
              repo = "sly-stepper";
              rev = "da84e3bba8466c2290c2dc7c27d7f4c48c27b39e";
              sha256 = "sha256-gMbmG42gxaQrgDUVySbGGpayxDM3pKAgDvYpd9KZ4B4=";
            };
            lispLibs = [ self.slynk super.agnostic-lizard ];
          };
        });
        local-sbcl = sbcl.withPackages (ps: with ps; [
          slynk
          slynk-stepper
          hunchentoot
        ]);
      in {
        devShells.default = pkgs.mkShell rec {
          name = "cl-dev";
          packages = [ local-sbcl pkgs.nixfmt-rfc-style ];
        };
      });
}

I used the version from Nixpkgs and therefore withOverrides in combination with buildASDFSystem. You can add more packages inside (self: super:. Unfortunately it's only one function instead of a list like in nixpkgs overlays...

I don't have slynk configured - I'm using slime mostly. Maybe it's loading a contrib by default which could be disabled.

Regarding Emacs - mostly I'm using M-x slime + flake.nix + direnv-mode.

It's no problem to add slynk-stepper. Let's make a patch to the Nixpkgs repo - something like this: https://github.com/NixOS/nixpkgs/pull/225873/files .

from nix-cl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.