-
Notifications
You must be signed in to change notification settings - Fork 6
/
lwp.bash
40 lines (36 loc) · 1.13 KB
/
lwp.bash
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
# Lisp with packages
lwp () {
local lisp=$1;
shift;
local pkgs=$@;
nix build \
--impure \
--expr "with builtins; with getFlake \"$(pwd)\"; (getAttr currentSystem packages).$lisp.withPackages (ps: with ps; [ $pkgs ])"
}
# Lisp with packages in Docker
lwp+docker () {
local lisp=$1;
shift;
local pkgs=$@;
nix bundle --bundler github:NixOS/bundlers#toDockerImage \
--impure \
--expr "with builtins; with getFlake \"$(pwd)\"; (getAttr currentSystem packages).$lisp.withPackages (ps: with ps; [ $pkgs ])"
}
# Python with packages
pwp () {
local python=$1;
shift;
local pkgs=$@;
nix build \
--impure \
--expr "with builtins; with getFlake \"nixpkgs\"; (getAttr currentSystem legacyPackages).$python.withPackages (ps: with ps; [ $pkgs ])"
}
# Python with packages
pwp+docker () {
local python=$1;
shift;
local pkgs=$@;
nix bundle --bundler github:NixOS/bundlers#toDockerImage \
--impure \
--expr "with builtins; with getFlake \"nixpkgs\"; (getAttr currentSystem legacyPackages).$python.withPackages (ps: with ps; [ $pkgs ])"
}