Skip to content

Commit 7e80722

Browse files
committed
🔨 Add env to shell.nix
1 parent 5797631 commit 7e80722

File tree

7 files changed

+16
-20
lines changed

7 files changed

+16
-20
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525
hooks:
2626
- id: remove-crlf
2727
- repo: https://github.com/codespell-project/codespell
28-
rev: v2.3.0
28+
rev: v2.4.1
2929
hooks:
3030
- id: codespell
3131
additional_dependencies:
@@ -37,23 +37,23 @@ repos:
3737
args:
3838
- --msg-filename
3939
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
40-
rev: 3.0.3
40+
rev: 3.2.1
4141
hooks:
4242
- id: editorconfig-checker
4343
- repo: https://github.com/jumanjihouse/pre-commit-hooks
4444
rev: 3.0.0
4545
hooks:
4646
- id: check-mailmap
4747
- repo: https://github.com/rhysd/actionlint
48-
rev: v1.7.4
48+
rev: v1.7.7
4949
hooks:
5050
- id: actionlint
5151
- repo: https://github.com/adrienverge/yamllint
52-
rev: v1.35.1
52+
rev: v1.37.1
5353
hooks:
5454
- id: yamllint
5555
- repo: https://github.com/executablebooks/mdformat
56-
rev: 0.7.19
56+
rev: 0.7.22
5757
hooks:
5858
- id: mdformat
5959
additional_dependencies:
@@ -62,12 +62,12 @@ repos:
6262
- mdformat-myst
6363
- mdformat-toc
6464
- mdformat-deflist
65-
- mdformat-beautysh
65+
# - mdformat-beautysh
6666
- mdformat-ruff
6767
- mdformat-config
6868
- mdformat-web
6969
- repo: https://github.com/DavidAnson/markdownlint-cli2
70-
rev: v0.16.0
70+
rev: v0.18.1
7171
hooks:
7272
- id: markdownlint-cli2
7373
additional_dependencies:

code-stats.nvim-scm-1.rockspec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,10 @@ end
3333

3434
build = {
3535
type = 'builtin',
36-
copy_directories = { 'plugin', 'assets' } ,
36+
copy_directories = { 'plugin', 'assets', 'scripts' } ,
3737
install = {
3838
conf = {
3939
['..'] = 'shell.nix',
40-
['../scripts/update.sh'] = 'scripts/update.sh',
41-
['../scripts/get-OPENSSL_INCDIR.nix'] = 'scripts/get-OPENSSL_INCDIR.nix',
42-
['../scripts/get-OPENSSL_LIBDIR.nix'] = 'scripts/get-OPENSSL_LIBDIR.nix',
43-
['../scripts/get-STDCPP_LIBDIR.nix'] = 'scripts/get-STDCPP_LIBDIR.nix',
4440
},
4541
},
4642
}

scripts/get-OPENSSL_INCDIR.nix

Lines changed: 0 additions & 2 deletions
This file was deleted.

scripts/get-OPENSSL_LIBDIR.nix

Lines changed: 0 additions & 2 deletions
This file was deleted.

scripts/get-STDCPP_LIBDIR.nix

Lines changed: 0 additions & 2 deletions
This file was deleted.

scripts/update.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
set -e
33
cd "$(dirname "$(dirname "$(readlink -f "$0")")")"
44

5-
eval "luarocks install --lua-version 5.1 --local --force assets/rockspecs/xml-1.1.3-1.rockspec STDCPP_LIBDIR=$(scripts/get-STDCPP_LIBDIR.nix)"
6-
eval "luarocks install --lua-version 5.1 --local --force lua-requests OPENSSL_INCDIR=$(scripts/get-OPENSSL_INCDIR.nix) OPENSSL_LIBDIR=$(scripts/get-OPENSSL_LIBDIR.nix)"
5+
nix-shell --run 'luarocks install --lua-version 5.1 --local --force assets/rockspecs/xml-1.1.3-1.rockspec STDCPP_LIBDIR=$STDCPP_LIBDIR &&
6+
luarocks install --lua-version 5.1 --local --force lua-requests OPENSSL_INCDIR=$OPENSSL_INCDIR OPENSSL_LIBDIR=$OPENSSL_LIBDIR'
7+
luarocks install --lua-version 5.1 --local --force code-stats.nvim

shell.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
with pkgs;
66
mkShell {
77
name = "code-stats.nvim";
8+
env = {
9+
STDCPP_LIBDIR = "${stdenv.cc.cc.lib}/lib";
10+
OPENSSL_INCDIR = "${openssl.dev}/include";
11+
OPENSSL_LIBDIR = "${openssl.out}/lib";
12+
};
813
buildInputs = [
914
stdenv.cc
1015
openssl

0 commit comments

Comments
 (0)