diff options
author | Robert James Hernandez <rob@sarcasticadmin.com> | 2024-03-04 15:57:57 +0000 |
---|---|---|
committer | Emery Hemingway <ehmry@posteo.net> | 2024-03-04 21:33:08 +0000 |
commit | 40b12aec80fce2c7b6a1e7733bff749e2940f99b (patch) | |
tree | 0d26b0881a6a1ab92cb39833da73194f95dbeec2 /pkgs/by-name/sc/scion/package.nix | |
parent | b5c49b4f86e39a1d2d0cfb0682c7ca57f5ac95bf (diff) | |
download | nixlib-40b12aec80fce2c7b6a1e7733bff749e2940f99b.tar nixlib-40b12aec80fce2c7b6a1e7733bff749e2940f99b.tar.gz nixlib-40b12aec80fce2c7b6a1e7733bff749e2940f99b.tar.bz2 nixlib-40b12aec80fce2c7b6a1e7733bff749e2940f99b.tar.lz nixlib-40b12aec80fce2c7b6a1e7733bff749e2940f99b.tar.xz nixlib-40b12aec80fce2c7b6a1e7733bff749e2940f99b.tar.zst nixlib-40b12aec80fce2c7b6a1e7733bff749e2940f99b.zip |
scion: init at 0.10.0
Diffstat (limited to 'pkgs/by-name/sc/scion/package.nix')
-rw-r--r-- | pkgs/by-name/sc/scion/package.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/by-name/sc/scion/package.nix b/pkgs/by-name/sc/scion/package.nix new file mode 100644 index 000000000000..52aae8f5cf62 --- /dev/null +++ b/pkgs/by-name/sc/scion/package.nix @@ -0,0 +1,53 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: +let + version = "0.10.0"; + + # Injects a `t.Skip()` into a given test since there's apparently no other way to skip tests here. + # ref: https://github.com/NixOS/nixpkgs/blob/047bc33866bf7004d0ce9ed0af78dab5ceddaab0/pkgs/by-name/vi/vikunja/package.nix#L96 + skipTest = lineOffset: testCase: file: + let + jumpAndAppend = lib.concatStringsSep ";" (lib.replicate (lineOffset - 1) "n" ++ [ "a" ]); + in + '' + sed -i -e '/${testCase}/{ + ${jumpAndAppend} t.Skip(); + }' ${file} + ''; +in + +buildGoModule { + pname = "scion"; + + inherit version; + + src = fetchFromGitHub { + owner = "scionproto"; + repo = "scion"; + rev = "v${version}"; + hash = "sha256-8yXjEDo1k0+7O0gx2acAZMrG/r+iePfNCG+FolCSKwI="; + }; + + vendorHash = "sha256-4nTp6vOyS7qDn8HmNO0NGCNU7wCb8ww8a15Yv3MPEq8="; + + excludedPackages = [ "acceptance" "demo" "tools" "pkg/private/xtest/graphupdater" ]; + + # This can be removed in the next release of scion since its fixed upstream + # https://github.com/scionproto/scion/pull/4476 + postConfigure = '' + # This test needs docker, so lets skip it + ${skipTest 1 "TestOpensslCompatible" "scion-pki/trcs/sign_test.go"} + ''; + + doCheck = true; + + meta = with lib; { + description = "A future Internet architecture utilizing path-aware networking"; + homepage = "https://scion-architecture.net/"; + platforms = platforms.unix; + license = licenses.asl20; + maintainers = with maintainers; [ sarcasticadmin ]; + }; +} |