-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
194 lines (168 loc) · 4.71 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# comment nix
{
description = "Random python scripts + plus something else";
# Nixpkgs / NixOS version to use.
inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable";
inputs.nixpkgs-gpu.url = "nixpkgs/nixos-24.05-small";
inputs.flake-utils.url = "github:numtide/flake-utils";
nixConfig = {
extra-substituters = [ "https://cuda-maintainers.cachix.org" "https://nix-community.cachix.org" ];
extra-trusted-public-keys = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
outputs = { self, nixpkgs, nixpkgs-gpu, flake-utils }:
let
# to work with older version of flakes
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
# Generate a user-friendly version number.
version = builtins.substring 0 8 lastModifiedDate;
overlay = final: prev: {
};
in
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs {
config.allowUnfree = true;
inherit system;
}).extend overlay;
pkgs-gpu = (import nixpkgs-gpu {
config.allowUnfree = true;
config.cudaSupport = true;
inherit system;
});
in
{
packages = rec {
default = fitet-parser;
fitet-parser = pkgs.python3.pkgs.buildPythonApplication {
pname = "fitet-parser";
src = ./.;
inherit version;
pyproject = true;
#format = "pyproject";
propagatedBuildInputs = with pkgs.python3.pkgs; [
beautifulsoup4
requests
icecream
sqlalchemy
];
nativeBuildInputs = with pkgs; [
python3.pkgs.setuptools
];
};
prog = pkgs.stdenv.mkDerivation {
pname = "prog";
src = ./.;
inherit version;
nativeBuildInputs = with pkgs; [
gcc
];
buildPhase = ''
mkdir build
g++ prog/main.cpp -o build/main
'';
installPhase = ''
mkdir -p $out/bin
find ./build -type f \
-exec mv -t "$out/bin" "{}" +
'';
};
};
apps = {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/fitet-runner";
};
};
devShells = {
default = pkgs.mkShell {
packages = with pkgs; [
php
(python3.withPackages (ps: with ps; [
beautifulsoup4
requests
icecream
pillow
tqdm
pandas
pyautogui
keyboard
sqlalchemy
]))
];
};
cpp = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
gcc
];
};
pwn = pkgs.mkShell {
packages = with pkgs; [
# misc
php
curl
git
jdk17
# ngrok
docker
docker-compose
# stego
binwalk
stegsolve
zsteg
john
# network
wireshark
tshark
# py pyshark
# web
burpsuite
# postman
# software
ht
ltrace
pwndbg
gdb
patchelf
elfutils
one_gadget
# seccomp-tools
ghidra
gdb
# crypto
# sage
z3
(python3.withPackages (ps: with ps; [
pillow
pycryptodome
pwntools
ropper
tqdm
gmpy2
sympy
pip
z3
]))
];
shellHook = ''
echo "Ready to pwn!"
'';
};
ai = pkgs-gpu.mkShell {
packages = [
(pkgs-gpu.python3.withPackages (ps: with ps; [
Keras
opencv4
jupyterlab
notebook
tqdm
ipywidgets
]))
];
};
};
}
);
}