Skip to content

Commit

Permalink
initial replit module
Browse files Browse the repository at this point in the history
  • Loading branch information
cdmistman committed Dec 11, 2023
1 parent 9c9bb04 commit 105bd60
Show file tree
Hide file tree
Showing 4 changed files with 706 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ rec {
bundle-image-tarball = pkgs.callPackage ./bundle-image-tarball { inherit bundle-image revstring; };

bundle-squashfs = bundle-squashfs-fn {
moduleIds = [ "python-3.10" "nodejs-18" "nodejs-20" "docker" ];
moduleIds = [ "python-3.10" "nodejs-18" "nodejs-20" "docker" "replit" ];
diskName = "disk.sqsh";
};

Expand All @@ -75,7 +75,7 @@ rec {
# publish your feature branch first and make sure modules.json is current, then
# in goval dir (next to nixmodules), run `make custom-nixmodules-disk` to use this disk in conman
# There is no need to check in changes to this.
moduleIds = [ "python-3.10" "nodejs-18" "nodejs-20" "docker" ];
moduleIds = [ "python-3.10" "nodejs-18" "nodejs-20" "docker" "replit" ];
diskName = "disk.sqsh";
};

Expand Down
1 change: 1 addition & 0 deletions pkgs/modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ let
(import ./php)
(import ./qbasic)
(import ./R)
(import ./replit)
(import ./ruby {
ruby = pkgs.ruby_3_1;
rubyPackages = pkgs.rubyPackages_3_1;
Expand Down
42 changes: 42 additions & 0 deletions pkgs/modules/replit/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{ lib, pkgs, ... }:

let
# taplo = pkgs.taplo.overrideAttrs (_: prev: {
#
# cargoSha256 = null;
# cargoHash = lib.fakeHash;
# });
taplo = pkgs.rustPlatform.buildRustPackage rec {
pname = "taplo";
version = "0.patched";
src = pkgs.fetchFromGitHub {
owner = "cdmistman";
repo = "taplo";
rev = "22eff1f7775e48eee8b50518c67f992b4595ab61";
hash = "sha256-63fm8pH03TJd4QBuhIxtttoEAaBnc9TuHGKCMK4YGP0=";
};

cargoHash = "sha256-4OSCN2zCrlBHihZn7TCNZp4mCREpvrpKsfMSNP95GNc=";
buildFeatures = [ "lsp" ];
};

taplo-config = pkgs.writeText "taplo-config.toml" ''
include = ["**/.replit"]
[schema]
enabled = true
path = "${./dotreplit-schema.json}"
'';
in

{
id = "replit";
name = "Base Replit Tools";

replit.dev.languageServers.dotreplit-lsp = {
name = ".replit LSP";
language = "dotreplit";
start = "${taplo}/bin/taplo lsp -c ${taplo-config} stdio";
};
}

Loading

0 comments on commit 105bd60

Please sign in to comment.