-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
executable file
·172 lines (164 loc) · 5.29 KB
/
flake.nix
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
{
description = "Shopify / Node.Js NIX Flake";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-ruby.url = "github:bobvanderlinden/nixpkgs-ruby";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
# To import a flake module
# 1. Add foo to inputs
# 2. Add foo as a parameter to the outputs function
# 3. Add here: foo.flakeModule
];
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, nixpkgs-ruby, ... }:
let
shopify-cli = pkgs.callPackage
(pkgs.fetchFromGitHub {
owner = "mrhenry";
repo = "nix-shopify-cli";
rev = "5d8c3ab7ed959fbc4c2c772e2fdaffce901fb5e2";
sha256 = "sha256-RZG2XLBiXzS6NfN4m2JUIqf9K0pxUKYUK6bGpSu0Xac=";
})
{ };
in
{
packages = {
nodejs16 = pkgs.stdenv.mkDerivation {
name = "nodejs16.0.0";
src = pkgs.fetchurl {
url = "https://nodejs.org/dist/v16.0.0/node-v16.0.0-darwin-arm64.tar.gz";
sha256 = "sha256-LW1BKrz3yTdfGf3hQIamQj5buUFe7KHMrUljj/xHbqM=";
};
installPhase = ''
echo "installing nodejs"
mkdir -p $out
cp -r ./ $out/
'';
};
};
devShells = {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs
];
};
node_16 = pkgs.mkShell {
packages = with pkgs; [
nodePackages_latest.vercel
httpie
self'.packages.nodejs16
fnm
corepack
];
};
node_18 = pkgs.mkShell {
packages = with pkgs; [
nodePackages_latest.vercel
httpie
nodejs_18
(yarn.override {
nodejs = nodejs_18;
})
];
};
nodejs_20 = pkgs.mkShell {
packages = with pkgs; [
nodePackages_latest.vercel
httpie
nodejs_20
(yarn.override {
nodejs = nodejs_20;
})
];
};
liquidtheme = pkgs.mkShell {
packages = with pkgs; [
nodePackages_latest.vercel
ruby
httpie
nodejs_18
(yarn.override {
nodejs = nodejs_18;
})
shopify-cli
];
};
cue = pkgs.mkShell {
packages = with pkgs; [
corepack_21
httpie
nodejs_20
];
};
quitelike = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
playwright
playwright-driver.browsers
];
packages = with pkgs; [
nodejs_20
(yarn.override {
nodejs = nodejs_20;
})
];
PLAYWRIGHT_NODEJS_PATH = "${pkgs.nodejs}/bin/node";
PLAYWRIGHT_BROWSERS_PATH = "${pkgs.playwright-driver.browsers}";
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = 1;
shellHook = ''
echo "dev env started"
'';
};
sns = pkgs.mkShell
{
buildInputs = with pkgs; [
nodejs_18
(yarn.override {
nodejs = nodejs_18;
})
httpie
cairo
pango
pkg-config
nodePackages.node-gyp
libpng
librsvg
pixman
giflib
libjpeg
hugo
ruby
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.CoreServices
darwin.apple_sdk.frameworks.CoreText
];
shellHook = ''
LD=$CC
export LD_LIBRARY_PATH="$APPEND_LIBRARY_PATH:$LD_LIBRARY_PATH"
'';
packages = with pkgs; [
shopify-themekit
nodejs_18
(yarn.override {
nodejs = nodejs_18;
})
shopify-cli
];
};
};
# Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
# packages.default = pkgs.hello;
};
flake = {
# The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem.
};
};
}