Skip to content

Commit

Permalink
Merge pull request NixOS#328959 from fpletz/pkgs/jool-4.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz authored Jul 23, 2024
2 parents 13d3588 + de3c22d commit ddc5898
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 21 deletions.
42 changes: 29 additions & 13 deletions pkgs/os-specific/linux/jool/cli.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{ lib, stdenv, fetchFromGitHub, nixosTests
, autoreconfHook, pkg-config, libnl, iptables
{
lib,
stdenv,
fetchFromGitHub,
nixosTests,
autoreconfHook,
pkg-config,
libnl,
iptables,
}:

let
Expand All @@ -12,31 +19,40 @@ stdenv.mkDerivation {

src = sourceAttrs.src;

patches = [
./validate-config.patch
];
patches = [ ./validate-config.patch ];

outputs = [
"out"
"man"
];

nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ libnl iptables ];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
libnl
iptables
];

makeFlags = [ "-C" "src/usr" ];
makeFlags = [
"-C"
"src/usr"
];

prePatch = ''
sed -e 's%^XTABLES_SO_DIR = .*%XTABLES_SO_DIR = '"$out"'/lib/xtables%g' -i src/usr/iptables/Makefile
'';

passthru.tests = { inherit (nixosTests) jool; };
passthru.tests = {
inherit (nixosTests) jool;
};

meta = with lib; {
meta = {
homepage = "https://www.jool.mx/";
description = "Fairly compliant SIIT and Stateful NAT64 for Linux - CLI tools";
platforms = platforms.linux;
license = licenses.gpl2Only;
maintainers = with maintainers; [ fpletz ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ fpletz ];
};
}
20 changes: 14 additions & 6 deletions pkgs/os-specific/linux/jool/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{ lib, stdenv, fetchFromGitHub, kernel, nixosTests }:
{
lib,
stdenv,
fetchFromGitHub,
kernel,
nixosTests,
}:

let
sourceAttrs = (import ./source.nix) { inherit fetchFromGitHub; };
Expand All @@ -23,13 +29,15 @@ stdenv.mkDerivation {

installTargets = "modules_install";

passthru.tests = { inherit (nixosTests) jool; };
passthru.tests = {
inherit (nixosTests) jool;
};

meta = with lib; {
meta = {
homepage = "https://www.jool.mx/";
description = "Fairly compliant SIIT and Stateful NAT64 for Linux - kernel modules";
platforms = platforms.linux;
license = licenses.gpl2Only;
maintainers = with maintainers; [ fpletz ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ fpletz ];
};
}
4 changes: 2 additions & 2 deletions pkgs/os-specific/linux/jool/source.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{ fetchFromGitHub }:

rec {
version = "4.1.11";
version = "4.1.12";
src = fetchFromGitHub {
owner = "NICMx";
repo = "Jool";
rev = "refs/tags/v${version}";
hash = "sha256-fTYUdtU51/zOBbd568QtfUYnqWl+ZN9uSbE29tJC6UM=";
hash = "sha256-NJitXmWWEEglg4jag0mRZlmbf5+0sT08/pCssry5zD0=";
};
}

0 comments on commit ddc5898

Please sign in to comment.