chore(dev): use shellHook

This commit is contained in:
Guanran Wang 2024-11-02 16:16:18 +08:00
parent c4c5c49239
commit 41e6300319
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
3 changed files with 12 additions and 14 deletions

7
.envrc
View file

@ -1,8 +1 @@
use flake
nix build nixpkgs#dbip-city-lite --no-link
nix build nixpkgs#dbip-asn-lite --no-link
export IP_CHECKER_CITY_DB=$(nix eval nixpkgs#dbip-city-lite.mmdb --raw)
export IP_CHECKER_ASN_DB=$(nix eval nixpkgs#dbip-asn-lite.mmdb --raw)
export IP_CHECKER_MODE=dev

View file

@ -22,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1729265718,
"narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=",
"lastModified": 1730272153,
"narHash": "sha256-B5WRZYsRlJgwVHIV6DvidFN7VX7Fg9uuwkRW9Ha8z+w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ccc0c2126893dd20963580b6478d1a10a4512185",
"rev": "2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53",
"type": "github"
},
"original": {
@ -66,11 +66,11 @@
]
},
"locked": {
"lastModified": 1729242555,
"narHash": "sha256-6jWSWxv2crIXmYSEb3LEVsFkCkyVHNllk61X4uhqfCs=",
"lastModified": 1730321837,
"narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "d986489c1c757f6921a48c1439f19bfb9b8ecab5",
"rev": "746901bb8dba96d154b66492a29f5db0693dbfcc",
"type": "github"
},
"original": {

View file

@ -38,13 +38,18 @@
checks.formatting = treefmtEval.config.build.check inputs.self;
### nix develop
devShells.default = pkgs.mkShell {
devShells.default = pkgs.mkShellNoCC {
nativeBuildInputs = with pkgs; [
go
nodePackages.prettier
nodejs
pnpm
];
shellHook = ''
export IP_CHECKER_CITY_DB=${pkgs.dbip-city-lite.mmdb}
export IP_CHECKER_ASN_DB=${pkgs.dbip-asn-lite.mmdb}
export IP_CHECKER_MODE=dev
'';
};
}
);