tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
0
fork
atom
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
0
fork
atom
overview
issues
pulls
pipelines
zapret: add information about commit and version
Nishimara
10 months ago
b58ef718
41a901e4
+16
-5
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
za
zapret
package.nix
+16
-5
pkgs/by-name/za/zapret/package.nix
reviewed
···
21
21
src = fetchFromGitHub {
22
22
owner = "bol-van";
23
23
repo = "zapret";
24
24
+
25
25
+
leaveDotGit = true;
26
26
+
postFetch = ''
27
27
+
cd "$out"
28
28
+
git rev-parse --short HEAD > $out/COMMIT
29
29
+
find "$out" -name .git -print0 | xargs -0 rm -rf
30
30
+
'';
31
31
+
24
32
tag = "v${finalAttrs.version}";
25
25
-
hash = "sha256-OeOnzqYyRAQNRtjtPHwzDL/csuTAUgIRJKsPVr3iBac=";
33
33
+
hash = "sha256-cwwj0xGEiR3sg2WheurtQo6Hy5JAARcZJNHEHMfAoOE=";
26
34
};
27
35
28
36
buildInputs = [
···
39
31
libnetfilter_queue
40
32
libnfnetlink
41
33
];
34
34
+
42
35
nativeBuildInputs = [
43
36
iptables
44
37
nftables
45
38
gawk
46
39
];
40
40
+
41
41
+
preBuild = ''
42
42
+
makeFlagsArray+=("CFLAGS=-DZAPRET_GH_VER=${finalAttrs.src.tag} -DZAPRET_GH_HASH=`cat $src/COMMIT`")
43
43
+
'';
47
44
48
45
makeFlags = [ "TGT=${placeholder "out"}/bin" ];
49
46
···
101
88
meta = {
102
89
description = "DPI bypass multi platform";
103
90
homepage = "https://github.com/bol-van/zapret";
104
104
-
changelog = "https://github.com/bol-van/zapret/releases/tag/v${finalAttrs.version}";
91
91
+
changelog = "https://github.com/bol-van/zapret/releases/tag/${finalAttrs.src.tag}";
105
92
license = lib.licenses.mit;
106
93
maintainers = with lib.maintainers; [ nishimara ];
107
94
mainProgram = "zapret";
108
108
-
109
109
-
# probably gonna work on darwin, but untested
110
110
-
broken = stdenv.hostPlatform.isDarwin;
95
95
+
platforms = lib.platforms.linux;
111
96
};
112
97
})