forked from elpaso/qgis-feed
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathshell.nix
More file actions
43 lines (40 loc) · 1.55 KB
/
shell.nix
File metadata and controls
43 lines (40 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#let
# #
# # Note that I am using a specific version from NixOS here because of
# # https://github.com/NixOS/nixpkgs/issues/267916#issuecomment-1817481744
# #
# nixpkgs = builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-22.11.tar.gz";
# #nixpkgs = builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/51f732d86fac4693840818ad2aa4781d78be2e89.tar.gz";
# pkgs = import nixpkgs { config = { }; overlays = [ ]; };
# pythonPackages = pkgs.python311Packages;
with import <nixpkgs> {}; let
# For packages pinned to a specific version
#pinnedHash = "617579a787259b9a6419492eaac670a5f7663917";
#pinnedPkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/${pinnedHash}.tar.gz") {};
pinnedPkgs = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz";
}) {};
in
pkgs.mkShell rec {
allowUnfree = true;
buildInputs = [
vscode
pinnedPkgs.pre-commit
];
shellHook = ''
# Set up pre-commit hook if .pre-commit-config.yaml exists
if [ -f .pre-commit-config.yaml ]; then
if [ ! -d .git ]; then
echo "No .git directory found, skipping pre-commit install."
else
pre-commit install
echo "pre-commit hook installed."
fi
fi
echo "QGIS Feed"
echo "_________________________________________________________"
echo "Command : Description"
echo "_________________________________________________________"
echo "🚀 ./vscode.sh : Open VSCode"
'';
}