about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/sc/scion/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/sc/scion/package.nix')
-rw-r--r--nixpkgs/pkgs/by-name/sc/scion/package.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/sc/scion/package.nix b/nixpkgs/pkgs/by-name/sc/scion/package.nix
index 100fe1746c70..67321aaa01ff 100644
--- a/nixpkgs/pkgs/by-name/sc/scion/package.nix
+++ b/nixpkgs/pkgs/by-name/sc/scion/package.nix
@@ -1,6 +1,8 @@
 { lib
 , buildGoModule
 , fetchFromGitHub
+, fetchpatch2
+, nixosTests
 }:
 let
   version = "0.10.0";
@@ -41,8 +43,29 @@ buildGoModule {
     ${skipTest 1 "TestOpensslCompatible" "scion-pki/trcs/sign_test.go"}
   '';
 
+  postInstall = ''
+    set +e
+    mv $out/bin/gateway $out/bin/scion-ip-gateway
+    mv $out/bin/dispatcher $out/bin/scion-dispatcher
+    mv $out/bin/router $out/bin/scion-router
+    mv $out/bin/control $out/bin/scion-control
+    mv $out/bin/daemon $out/bin/scion-daemon
+    set -e
+  '';
+
   doCheck = true;
 
+  patches = [
+    (fetchpatch2 {
+      url = "https://github.com/scionproto/scion/commit/cb7fa6d6aab55c9eb90556c2b996b87539f8aa02.patch";
+      hash = "sha256-mMGJMPB6T7KeDXjEXffdrhzyKwaFmhuisK6PjHOJIdU=";
+    })
+  ];
+
+  passthru.tests = {
+    inherit (nixosTests) scion-freestanding-deployment;
+  };
+
   meta = with lib; {
     description = "A future Internet architecture utilizing path-aware networking";
     homepage = "https://scion-architecture.net/";