-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepl.nix
More file actions
38 lines (36 loc) · 863 Bytes
/
repl.nix
File metadata and controls
38 lines (36 loc) · 863 Bytes
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
# Use this as a playground to test nix expressions
# export NIXPKGS_ALLOW_UNFREE=1 && nix repl -f ./repl.nix --impure
{
pkgs ? let
lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
nixpkgs = fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
sha256 = lock.narHash;
};
in
import nixpkgs {overlays = [];},
...
}: let
mkArrIf = condition: content:
if condition
then content
else [];
# Packages that are not aarch64 compatible
aarch64-packages =
mkArrIf
pkgs.stdenv.hostPlatform.isAarch64
[
pkgs.discord
];
packages =
# Stable packages
(with pkgs; [
telegram-desktop
])
# Unstable packages
++ (with pkgs.unstable; [])
# Aarch64 only packages
++ aarch64-packages;
in {
inherit packages;
}