flake/dev: use nix-shell shebangs for scripts

Allow running the scripts directly without entering the devshell.
This commit is contained in:
Austin Horstman 2025-06-28 12:05:14 -05:00
parent c39f5f39c3
commit 9cc99629f3
5 changed files with 11 additions and 4 deletions

3
flake/dev/diff-plugins.py Normal file → Executable file
View file

@ -1,4 +1,5 @@
#!/usr/bin/env python3
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3
import json
import re

View file

@ -10,6 +10,8 @@
package = pkgs.writers.writePython3Bin "list-plugins" {
# Disable flake8 checks that are incompatible with the ruff ones
flakeIgnore = [
# Thinks shebang is a block comment
"E265"
# line too long
"E501"
# line break before binary operator

View file

@ -1,3 +1,6 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3
import glob
import os
import re

View file

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# This script requires nix-locate
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3 nix-index
import json
import os

3
flake/dev/new-plugin.py Normal file → Executable file
View file

@ -1,4 +1,5 @@
#!/usr/bin/env python3
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3
import os
import re