evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / sc / scion-apps / package.nix
blobf4dfd933d24f2a869e55692306726042fd06f08b
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , openpam
5 }:
7 buildGoModule {
8   pname = "scion-apps";
9   version = "unstable-2024-04-05";
11   src = fetchFromGitHub {
12     owner = "netsec-ethz";
13     repo = "scion-apps";
14     rev = "cb0dc365082788bcc896f0b55c4807b72c2ac338";
15     hash = "sha256-RzWtnUpZfwryOfumgXHV5QMceLY51Zv3KI0K6WLz8rs=";
16   };
18   vendorHash = "sha256-bz4vtELxrDfebk+00w9AcEiK/4skO1mE3lBDU1GkOrk=";
20   postPatch = ''
21     substituteInPlace webapp/web/tests/health/scmpcheck.sh \
22       --replace-fail "hostname -I" "hostname -i"
23   '';
25   postInstall = ''
26     # Add `scion-` prefix to all binaries
27     for f in $out/bin/*; do
28       filename="$(basename "$f")"
29       mv -v $f $out/bin/scion-$filename
30     done
32     # Fix nested subpackage names
33     mv -v $out/bin/scion-server $out/bin/scion-ssh-server
34     mv -v $out/bin/scion-client $out/bin/scion-ssh-client
36     # Include static website for webapp
37     mkdir -p $out/share
38     cp -r webapp/web $out/share/scion-webapp
39   '';
41   buildInputs = [
42     openpam
43   ];
45   ldflags = [ "-s" "-w" ];
47   meta = with lib; {
48     description = "Public repository for SCION applications";
49     homepage = "https://github.com/netsec-ethz/scion-apps";
50     license = licenses.asl20;
51     maintainers = with maintainers; [ matthewcroughan sarcasticadmin ];
52   };