strongswan: refactor to load from GitHub instead of archives

Co-authored-by: Artturi <Artturin@artturin.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Noah 2021-07-21 08:32:00 -07:00 committed by nwagner
parent 077b2825cd
commit 33582ac414

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, fetchpatch { lib, stdenv, fetchpatch, fetchFromGitHub
, pkg-config, autoreconfHook , pkg-config, autoreconfHook, perl, gperf, bison, flex
, gmp, python3, iptables, ldns, unbound, openssl, pcsclite, glib , gmp, python3, iptables, ldns, unbound, openssl, pcsclite, glib
, openresolv , openresolv
, systemd, pam , systemd, pam
@ -19,14 +19,16 @@ stdenv.mkDerivation rec {
pname = "strongswan"; pname = "strongswan";
version = "5.8.1"; # Make sure to also update <nixpkgs/nixos/modules/services/networking/strongswan-swanctl/swanctl-params.nix> when upgrading! version = "5.8.1"; # Make sure to also update <nixpkgs/nixos/modules/services/networking/strongswan-swanctl/swanctl-params.nix> when upgrading!
src = fetchurl { src = fetchFromGitHub {
url = "https://download.strongswan.org/${pname}-${version}.tar.bz2"; owner = "strongswan";
sha256 = "034rd6kr1bmnvj8rg2kcxdjb0cgj3dn9310mmm94j1awxan71byr"; repo = "strongswan";
rev = version;
sha256 = "1a1hw2jsbwvkdhhxjmq87hz13ivbgvqwks1q3adz14mqgbc64snd";
}; };
dontPatchELF = true; dontPatchELF = true;
nativeBuildInputs = [ pkg-config autoreconfHook ]; nativeBuildInputs = [ pkg-config autoreconfHook perl gperf bison flex ];
buildInputs = buildInputs =
[ curl gmp python3 ldns unbound openssl pcsclite ] [ curl gmp python3 ldns unbound openssl pcsclite ]
++ optionals enableTNC [ trousers sqlite libxml2 ] ++ optionals enableTNC [ trousers sqlite libxml2 ]