-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
92 lines (92 loc) · 2.25 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11";
nixpkgs-old.url = "github:NixOS/nixpkgs/nixos-21.11"; # For Node.js 12
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
mk.url = "github:x0k/mk";
};
outputs =
{
self,
nixpkgs,
nixpkgs-old,
mk,
fenix,
}:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = {
permittedInsecurePackages = [ "python-2.7.18.8" ];
};
};
pkgs-old = import nixpkgs-old {
inherit system;
config = {
permittedInsecurePackages = [ "nodejs-12.22.12" ];
};
};
# pkgs-very-old = import (pkgs.fetchFromGitHub {
# owner = "NixOS";
# repo = "nixpkgs";
# rev = "19.09";
# sha256 = "0mhqhq21y5vrr1f30qd2bvydv4bbbslvyzclhw0kdxmkgg3z4c92";
# }) { inherit system; };
f =
with fenix.packages.${system};
combine [
stable.toolchain
targets.wasm32-unknown-unknown.stable.rust-std
];
in
{
devShells.${system} = {
default = pkgs.mkShell {
buildInputs = [
mk.packages.${system}.default
pkgs.nodejs
pkgs.bun
pkgs.pnpm
pkgs.go_1_23
pkgs.python3
f
pkgs.wasm-pack
pkgs.gleam
pkgs.dotnet-sdk_9
];
shellHook = ''
source <(COMPLETE=bash mk)
'';
};
rust = pkgs.mkShell {
buildInputs = [
pkgs.gcc
pkgs.ninja
pkgs.cmake
pkgs.llvmPackages.bintools
pkgs.libiconv
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc
pkgs.xz
pkgs.zlib
];
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld";
};
java = pkgs.mkShell {
buildInputs = [
pkgs-old.nodejs-12_x
pkgs.jdk8
];
shellHook = ''
export NPM_CONFIG_PREFIX=~/.npm-global
export PATH=$NPM_CONFIG_PREFIX/bin:$PATH
'';
};
};
};
}