1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

scion-apps: init at unstable-2024-04-05

This commit is contained in:
matthewcroughan 2024-06-24 23:12:11 +01:00 committed by Valentin Gagarin
parent 23c24527dc
commit 2076935e3d

View file

@ -0,0 +1,53 @@
{ lib
, buildGoModule
, fetchFromGitHub
, openpam
}:
buildGoModule {
pname = "scion-apps";
version = "unstable-2024-04-05";
src = fetchFromGitHub {
owner = "netsec-ethz";
repo = "scion-apps";
rev = "cb0dc365082788bcc896f0b55c4807b72c2ac338";
hash = "sha256-RzWtnUpZfwryOfumgXHV5QMceLY51Zv3KI0K6WLz8rs=";
};
vendorHash = "sha256-bz4vtELxrDfebk+00w9AcEiK/4skO1mE3lBDU1GkOrk=";
postPatch = ''
substituteInPlace webapp/web/tests/health/scmpcheck.sh \
--replace-fail "hostname -I" "hostname -i"
'';
postInstall = ''
# Add `scion-` prefix to all binaries
for f in $out/bin/*; do
filename="$(basename "$f")"
mv -v $f $out/bin/scion-$filename
done
# Fix nested subpackage names
mv -v $out/bin/scion-server $out/bin/scion-ssh-server
mv -v $out/bin/scion-client $out/bin/scion-ssh-client
# Include static website for webapp
mkdir -p $out/share
cp -r webapp/web $out/share/scion-webapp
'';
buildInputs = [
openpam
];
ldflags = [ "-s" "-w" ];
meta = with lib; {
description = "Public repository for SCION applications";
homepage = "https://github.com/netsec-ethz/scion-apps";
license = licenses.asl20;
maintainers = with maintainers; [ matthewcroughan sarcasticadmin ];
};
}