From 88dbdc172a2aa2f8cf25e30c816148399d8147c3 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sat, 15 Jun 2024 07:15:22 -0500 Subject: [PATCH] adding shell for ags dev --- .config/ags/.direnv/bin/nix-direnv-reload | 19 +++++++++++++++++ .config/ags/.envrc | 1 + .config/ags/flake.nix | 25 +++++++++++++++++++++++ .config/ags/shell.nix | 15 ++++++++++++++ 4 files changed, 60 insertions(+) create mode 100755 .config/ags/.direnv/bin/nix-direnv-reload create mode 100644 .config/ags/.envrc create mode 100644 .config/ags/flake.nix create mode 100644 .config/ags/shell.nix diff --git a/.config/ags/.direnv/bin/nix-direnv-reload b/.config/ags/.direnv/bin/nix-direnv-reload new file mode 100755 index 0000000..e546392 --- /dev/null +++ b/.config/ags/.direnv/bin/nix-direnv-reload @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -e +if [[ ! -d "/home/chris/.dotfiles/.config/ags" ]]; then + echo "Cannot find source directory; Did you move it?" + echo "(Looking for "/home/chris/.dotfiles/.config/ags")" + echo 'Cannot force reload with this script - use "direnv reload" manually and then try again' + exit 1 +fi + +# rebuild the cache forcefully +_nix_direnv_force_reload=1 direnv exec "/home/chris/.dotfiles/.config/ags" true + +# Update the mtime for .envrc. +# This will cause direnv to reload again - but without re-building. +touch "/home/chris/.dotfiles/.config/ags/.envrc" + +# Also update the timestamp of whatever profile_rc we have. +# This makes sure that we know we are up to date. +touch -r "/home/chris/.dotfiles/.config/ags/.envrc" "/home/chris/.dotfiles/.config/ags/.direnv"/*.rc diff --git a/.config/ags/.envrc b/.config/ags/.envrc new file mode 100644 index 0000000..8392d15 --- /dev/null +++ b/.config/ags/.envrc @@ -0,0 +1 @@ +use flake \ No newline at end of file diff --git a/.config/ags/flake.nix b/.config/ags/flake.nix new file mode 100644 index 0000000..4d9f222 --- /dev/null +++ b/.config/ags/flake.nix @@ -0,0 +1,25 @@ + +{ + description = "The Flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { nixpkgs, ... }: + { + flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = import nixpkgs { + inherit system; + }; + in rec + { + devShell = import ./shell.nix { inherit pkgs; }; + defaultPackage = pkgs.libsForQt5.callPackage ./default.nix { }; + } + ); + }; +} diff --git a/.config/ags/shell.nix b/.config/ags/shell.nix new file mode 100644 index 0000000..7cdad4f --- /dev/null +++ b/.config/ags/shell.nix @@ -0,0 +1,15 @@ +{ pkgs ? import { } }: +with pkgs; +mkShell rec { + name = "ags-config"; + + nativeBuildInputs = [ + ]; + + buildInputs = [ + stdenv + clojure + clojure-lsp + clj-kondo + ]; +}