Merge pull request #174811 from emmabastas/master

spectre-cli: init at unstable-2022-02-05

authored by Sandro and committed by GitHub 7b2f132a 0a382c5c

+82
+7
maintainers/maintainer-list.nix
··· 3765 githubId = 11006031; 3766 name = "Leo Maroni"; 3767 }; 3768 emmanuelrosa = { 3769 email = "emmanuelrosa@protonmail.com"; 3770 matrix = "@emmanuelrosa:matrix.org";
··· 3765 githubId = 11006031; 3766 name = "Leo Maroni"; 3767 }; 3768 + emmabastas = { 3769 + email = "emma.bastas@protonmail.com"; 3770 + matrix = "@emmabastas:matrix.org"; 3771 + github = "emmabastas"; 3772 + githubId = 22533224; 3773 + name = "Emma Bastås"; 3774 + }; 3775 emmanuelrosa = { 3776 email = "emmanuelrosa@protonmail.com"; 3777 matrix = "@emmanuelrosa:matrix.org";
+73
pkgs/tools/security/spectre-cli/default.nix
···
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitLab 4 + , cmake 5 + , libsodium 6 + , json_c 7 + , ncurses 8 + , libxml2 9 + , jq 10 + }: 11 + 12 + stdenv.mkDerivation rec { 13 + pname = "spectre-cli"; 14 + version = "unstable-2022-02-05"; 15 + 16 + src = fetchFromGitLab { 17 + owner = "spectre.app"; 18 + repo = "cli"; 19 + rev = "a5e7aab28f44b90e5bd1204126339a81f64942d2"; 20 + sha256 = "1hp4l1rhg7bzgx0hcai08rvcy6l9645sfngy2cr96l1bpypcld5i"; 21 + fetchSubmodules = true; 22 + }; 23 + 24 + nativeBuildInputs = [ 25 + cmake 26 + libxml2 27 + jq 28 + ]; 29 + 30 + buildInputs = [ 31 + libsodium 32 + json_c 33 + ncurses 34 + ]; 35 + 36 + cmakeFlags = [ 37 + "-DBUILD_SPECTRE_TESTS=ON" 38 + ]; 39 + 40 + preConfigure = '' 41 + echo "${version}" > VERSION 42 + 43 + # The default buildPhase wants to create a ´build´ dir so we rename the build script to stop conflicts. 44 + mv build build.sh 45 + ''; 46 + 47 + # Some tests are expected to fail on ARM64 48 + # See: https://gitlab.com/spectre.app/cli/-/issues/27#note_962950844 49 + doCheck = !(stdenv.isLinux && stdenv.isAarch64); 50 + 51 + checkPhase = '' 52 + mv ../spectre-cli-tests ../spectre_tests.xml ./ 53 + patchShebangs spectre-cli-tests 54 + export HOME=$(mktemp -d) 55 + 56 + ./spectre-tests 57 + ./spectre-cli-tests 58 + ''; 59 + 60 + installPhase = '' 61 + mkdir -p $out/bin 62 + mv spectre $out/bin 63 + ''; 64 + 65 + meta = with lib; { 66 + description = "A stateless cryptographic identity algorithm"; 67 + homepage = "https://spectre.app"; 68 + license = licenses.gpl3Plus; 69 + maintainers = with maintainers; [ emmabastas ]; 70 + mainProgram = "spectre"; 71 + platforms = platforms.all; 72 + }; 73 + }
+2
pkgs/top-level/all-packages.nix
··· 1188 1189 sdlookup = callPackage ../tools/security/sdlookup { }; 1190 1191 sx-go = callPackage ../tools/security/sx-go { }; 1192 1193 systeroid = callPackage ../tools/system/systeroid { };
··· 1188 1189 sdlookup = callPackage ../tools/security/sdlookup { }; 1190 1191 + spectre-cli = callPackage ../tools/security/spectre-cli { }; 1192 + 1193 sx-go = callPackage ../tools/security/sx-go { }; 1194 1195 systeroid = callPackage ../tools/system/systeroid { };