Skip to content

Commit 9cc9962

Browse files
committed
flake/dev: use nix-shell shebangs for scripts
Allow running the scripts directly without entering the devshell.
1 parent c39f5f3 commit 9cc9962

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

flake/dev/diff-plugins.py

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env nix-shell
2+
#!nix-shell -i python3 -p python3
23

34
import json
45
import re

flake/dev/list-plugins/default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
package = pkgs.writers.writePython3Bin "list-plugins" {
1111
# Disable flake8 checks that are incompatible with the ruff ones
1212
flakeIgnore = [
13+
# Thinks shebang is a block comment
14+
"E265"
1315
# line too long
1416
"E501"
1517
# line break before binary operator

flake/dev/list-plugins/list-plugins.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#!/usr/bin/env nix-shell
2+
#!nix-shell -i python3 -p python3
3+
14
import glob
25
import os
36
import re

flake/dev/locate-lsp-packages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#!/usr/bin/env python3
2-
# This script requires nix-locate
1+
#!/usr/bin/env nix-shell
2+
#!nix-shell -i python3 -p python3 nix-index
33

44
import json
55
import os

flake/dev/new-plugin.py

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env nix-shell
2+
#!nix-shell -i python3 -p python3
23

34
import os
45
import re

0 commit comments

Comments
 (0)