From aa5f12a5a2365a35f17becc66cf7a67fa86a4440 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 8 Apr 2024 16:02:03 -0400 Subject: Reorganize and update nixpkgs upstreams This patch does a few things: 1. Switches from nixpkgs-unstable to nixos-unstable{,-small}, simply because nixpkgs-unstable is not in cache.nixos.org, but nixos-unstable is, and -small is the same but requires all tests to pass. So we should prefer nixos-unstable-small, whenever possible. 2. Reorganizes the nixpkgs import code such that Nixpkgs.nix returns an attrset of all the nixpkgs that I want to use, rather than putting other nixpkgs branches into the main one as an overlay. This is much simpler and explicit, but it meant I had to change a lot of usages throughtout the nix codebase. 3. As a consequence of 2, moves the overlays into separate files so they can be re-used across nixpkgs branches. --- Biz/Ide/repl.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Biz/Ide/repl.sh') diff --git a/Biz/Ide/repl.sh b/Biz/Ide/repl.sh index 1aca862..ceedb71 100755 --- a/Biz/Ide/repl.sh +++ b/Biz/Ide/repl.sh @@ -33,23 +33,23 @@ fi packageSet=$(jq --raw-output '.[].packageSet' <<< "$json") module=$(jq --raw-output '.[].mainModule' <<< "$json") BILD="(import ${CODEROOT:?}/Biz/Bild.nix {})" - declare -a flags=(--packages "$BILD.bild.pkgs.pkg-config") + declare -a flags=(--packages "$BILD.pkgs.pkg-config") for lib in "${sysdeps[@]}"; do - flags+=(--packages "$BILD.bild.pkgs.${lib}") + flags+=(--packages "$BILD.pkgs.${lib}") done for lib in "${rundeps[@]}"; do - flags+=(--packages "$BILD.bild.pkgs.${lib}") + flags+=(--packages "$BILD.pkgs.${lib}") done case $exts in C) - flags+=(--packages "$BILD.bild.pkgs.gcc") + flags+=(--packages "$BILD.pkgs.gcc") command="bash" ;; Hs) if [ -z ${var+PORT} ]; then echo "warn: repl: ghci does not support binding to a port" fi - flags+=(--packages "$BILD.bild.haskell.ghcWith (h: with h; [${langdeps[*]}])") + flags+=(--packages "$BILD.haskell.ghcWith (h: with h; [${langdeps[*]}])") command=${CMD:-"ghci -i${CODEROOT:?} -ghci-script ${CODEROOT:?}/.ghci ${targets[@]}"} ;; Scm) @@ -60,16 +60,16 @@ fi command=${CMD:-"guile -L ${CODEROOT:?} -C ${CODEROOT:?}/_/int --r7rs --listen=${PORT:-37146}"} ;; Lisp) - flags+=(--packages "$BILD.bild.$packageSet (p: with p; [asdf swank ${langdeps[*]}])") + flags+=(--packages "$BILD.$packageSet (p: with p; [asdf swank ${langdeps[*]}])") command=${CMD:-"sbcl --eval '(require :asdf)' --eval '(require :swank)' --eval '(swank:create-server :port ${PORT:-4005})' --load $targets"} ;; Rs) - flags+=(--packages "$BILD.nixpkgs.rustc") + flags+=(--packages "$BILD.pkgs.rustc") command=bash ;; Py) langdeps+=("mypy") - flags+=(--packages "$BILD.bild.python.pythonWith (p: with p; [${langdeps[*]}])") + flags+=(--packages "$BILD.python.pythonWith (p: with p; [${langdeps[*]}])") PYTHONPATH=$CODEROOT:$PYTHONPATH pycommand="python -i $CODEROOT/Biz/Repl.py $module ${targets[*]}" command=${CMD:-"$pycommand"} @@ -80,5 +80,5 @@ fi ;; esac ## - nix-shell "${flags[@]}" --command "$command" + nix-shell "${flags[@]}" --command "$command" --show-trace ## -- cgit v1.2.3