mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
zapret: add information about commit and version
This commit is contained in:
parent
41a901e46c
commit
b58ef718f9
1 changed files with 16 additions and 5 deletions
|
@ -21,8 +21,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bol-van";
|
owner = "bol-van";
|
||||||
repo = "zapret";
|
repo = "zapret";
|
||||||
|
|
||||||
|
leaveDotGit = true;
|
||||||
|
postFetch = ''
|
||||||
|
cd "$out"
|
||||||
|
git rev-parse --short HEAD > $out/COMMIT
|
||||||
|
find "$out" -name .git -print0 | xargs -0 rm -rf
|
||||||
|
'';
|
||||||
|
|
||||||
tag = "v${finalAttrs.version}";
|
tag = "v${finalAttrs.version}";
|
||||||
hash = "sha256-OeOnzqYyRAQNRtjtPHwzDL/csuTAUgIRJKsPVr3iBac=";
|
hash = "sha256-cwwj0xGEiR3sg2WheurtQo6Hy5JAARcZJNHEHMfAoOE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -31,12 +39,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
libnetfilter_queue
|
libnetfilter_queue
|
||||||
libnfnetlink
|
libnfnetlink
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
iptables
|
iptables
|
||||||
nftables
|
nftables
|
||||||
gawk
|
gawk
|
||||||
];
|
];
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
makeFlagsArray+=("CFLAGS=-DZAPRET_GH_VER=${finalAttrs.src.tag} -DZAPRET_GH_HASH=`cat $src/COMMIT`")
|
||||||
|
'';
|
||||||
|
|
||||||
makeFlags = [ "TGT=${placeholder "out"}/bin" ];
|
makeFlags = [ "TGT=${placeholder "out"}/bin" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -88,12 +101,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
meta = {
|
meta = {
|
||||||
description = "DPI bypass multi platform";
|
description = "DPI bypass multi platform";
|
||||||
homepage = "https://github.com/bol-van/zapret";
|
homepage = "https://github.com/bol-van/zapret";
|
||||||
changelog = "https://github.com/bol-van/zapret/releases/tag/v${finalAttrs.version}";
|
changelog = "https://github.com/bol-van/zapret/releases/tag/${finalAttrs.src.tag}";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ nishimara ];
|
maintainers = with lib.maintainers; [ nishimara ];
|
||||||
mainProgram = "zapret";
|
mainProgram = "zapret";
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
# probably gonna work on darwin, but untested
|
|
||||||
broken = stdenv.hostPlatform.isDarwin;
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue