nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

zapret: add information about commit and version

Nishimara b58ef718 41a901e4

+16 -5
+16 -5
pkgs/by-name/za/zapret/package.nix
··· 21 21 src = fetchFromGitHub { 22 22 owner = "bol-van"; 23 23 repo = "zapret"; 24 + 25 + leaveDotGit = true; 26 + postFetch = '' 27 + cd "$out" 28 + git rev-parse --short HEAD > $out/COMMIT 29 + find "$out" -name .git -print0 | xargs -0 rm -rf 30 + ''; 31 + 24 32 tag = "v${finalAttrs.version}"; 25 - hash = "sha256-OeOnzqYyRAQNRtjtPHwzDL/csuTAUgIRJKsPVr3iBac="; 33 + hash = "sha256-cwwj0xGEiR3sg2WheurtQo6Hy5JAARcZJNHEHMfAoOE="; 26 34 }; 27 35 28 36 buildInputs = [ ··· 39 31 libnetfilter_queue 40 32 libnfnetlink 41 33 ]; 34 + 42 35 nativeBuildInputs = [ 43 36 iptables 44 37 nftables 45 38 gawk 46 39 ]; 40 + 41 + preBuild = '' 42 + makeFlagsArray+=("CFLAGS=-DZAPRET_GH_VER=${finalAttrs.src.tag} -DZAPRET_GH_HASH=`cat $src/COMMIT`") 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 - changelog = "https://github.com/bol-van/zapret/releases/tag/v${finalAttrs.version}"; 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 - 109 - # probably gonna work on darwin, but untested 110 - broken = stdenv.hostPlatform.isDarwin; 95 + platforms = lib.platforms.linux; 111 96 }; 112 97 })