From 4c3f1dae67f5df2986fdfd5cdb97d7c5bd69f3d6 Mon Sep 17 00:00:00 2001 From: tdro Date: Thu, 8 Jun 2023 18:33:27 -0400 Subject: .config/nixpkgs: Sync to latest unstable Wrap guile bindings --- .config/.guile | 2 ++ .config/nixpkgs/config.nix | 15 ++++++++++++--- .local/bin/wrappers/guile | 2 ++ .vim/vimrc | 1 + 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 .config/.guile create mode 100755 .local/bin/wrappers/guile diff --git a/.config/.guile b/.config/.guile new file mode 100644 index 0000000..bcbc981 --- /dev/null +++ b/.config/.guile @@ -0,0 +1,2 @@ +(use-modules (ice-9 readline)) +(activate-readline) diff --git a/.config/nixpkgs/config.nix b/.config/nixpkgs/config.nix index 20e78b5..4f699e6 100644 --- a/.config/nixpkgs/config.nix +++ b/.config/nixpkgs/config.nix @@ -7,8 +7,8 @@ let sha256 = "1367bad5zz0mfm4czb6p0s0ni38f0x1ffh02z76rx4nranipqbgg"; }) { }; unstable = import (builtins.fetchTarball { - url = "https://releases.nixos.org/nixos/unstable/nixos-23.05pre472387.3fb8eedc450/nixexprs.tar.xz"; - sha256 = "1bsgq5i71zm6x6yinbyqf3spz3bayfjqq009sgmp2gbhwv89xg2m"; }) { }; + url = "https://releases.nixos.org/nixos/unstable/nixos-23.11pre491650.7409480d5c8/nixexprs.tar.xz"; + sha256 = "0csg97lkanf5zj28i5py94sldjnzk1zy0ywniv3gmkn393hiskif"; }) { }; in @@ -555,7 +555,16 @@ in Lisp = pkgs.buildEnv { name = "lisp"; - paths = [ guile sbcl ]; + paths = [ + (pkgs.writeScriptBin "guile" '' + export GUILE_LOAD_PATH="${pkgs.lib.concatStrings [ + "${unstable.guile-gnutls}/share/guile/site:" + "$GUILE_LOAD_PATH" + ]}" + ${pkgs.guile_3_0}/bin/guile "$@" + '') + sbcl + ]; }; HTTP = pkgs.buildEnv { diff --git a/.local/bin/wrappers/guile b/.local/bin/wrappers/guile new file mode 100755 index 0000000..1a5b4d8 --- /dev/null +++ b/.local/bin/wrappers/guile @@ -0,0 +1,2 @@ +#!/bin/sh -eu +HOME=$HOME/.config && $(which guile --all | grep --invert-match "local/bin" | head --lines 1) "$@"; diff --git a/.vim/vimrc b/.vim/vimrc index ee1f868..4ff20c2 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -290,6 +290,7 @@ augroup AutoCommands " Linting file type post write commands. autocmd FileType markdown autocmd! BufWritePost :only | :term ++rows=10 sh -c "cat % | vale --ext .md" + autocmd FileType scheme autocmd! BufWritePost exe 'Notify(''guile -s ' . expand('%') . ' 2>&1'')' | :e autocmd FileType css autocmd! BufWritePost exe 'Notify(''prettier --write --parser css ' . expand('%') . ' 2>&1'')' | :e autocmd FileType html autocmd! BufWritePost exe 'Notify(''prettier --write --parser html ' . expand('%') . ' 2>&1'')' | :e autocmd FileType python autocmd! BufWritePost exe 'Notify(''ruff --no-cache ' . expand('%') . ' 2>&1 && black ' . expand('%') . ' 2>&1'')' | :e -- cgit v1.2.3