From 376d265c14508d373ad5e02840efd91e7d0785f8 Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Fri, 12 Apr 2024 02:02:21 +0200 Subject: [PATCH] ci: Remove `nix flake show` diff generation --- .github/workflows/pull_request.yaml | 22 -------- pkgs/by-name/rosenpass-tools/package.nix | 42 --------------- pkgs/by-name/rosenpass/package.nix | 67 ------------------------ 3 files changed, 131 deletions(-) delete mode 100644 pkgs/by-name/rosenpass-tools/package.nix delete mode 100644 pkgs/by-name/rosenpass/package.nix diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 8041df5e..41e1addf 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -15,26 +15,4 @@ jobs: - uses: DeterminateSystems/magic-nix-cache-action@main with: upstream-cache: https://ngi.cachix.org/ - - id: flake-show-diff - name: Obtain `nix flake show` output - run: | - shopt -s expand_aliases - alias show="nix flake show --all-systems" - alias filter="nix run nixpkgs#ansifilter | tail -n +2" - alias short="git rev-parse --short" - git fetch origin ${GITHUB_BASE_REF}:${GITHUB_BASE_REF} - if diff -U 1024 \ - --label "$(short $GITHUB_BASE_REF) $GITHUB_BASE_REF" <(show ".?rev=$(git rev-parse ${GITHUB_BASE_REF})" | filter) \ - --label "$(short HEAD) $GITHUB_HEAD_REF" <(show | filter) \ - >> diff - then - echo 'output=No difference in `nix flake show`.' >> "$GITHUB_OUTPUT" - else - echo -e 'output<Difference in nix flake show.\n\n```diff' >> "$GITHUB_OUTPUT" - cat diff >> "$GITHUB_OUTPUT" - echo -e '```\n\nEOF' >> "$GITHUB_OUTPUT" - fi - - uses: thollander/actions-comment-pull-request@v2 - with: - message: ${{ steps.flake-show-diff.outputs.output }} - run: nix ${{ runner.debug && '--debug --print-build-logs' }} flake check diff --git a/pkgs/by-name/rosenpass-tools/package.nix b/pkgs/by-name/rosenpass-tools/package.nix deleted file mode 100644 index 5c728982..00000000 --- a/pkgs/by-name/rosenpass-tools/package.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - lib, - stdenv, - makeWrapper, - installShellFiles, - coreutils, - findutils, - gawk, - rosenpass, - wireguard-tools, -}: let - inherit - (lib) - makeBinPath - ; -in - stdenv.mkDerivation { - inherit (rosenpass) version src; - pname = "rosenpass-tools"; - - nativeBuildInputs = [makeWrapper installShellFiles]; - - postInstall = '' - install -D $src/rp $out/bin/rp - installManPage $src/doc/rp.1 - wrapProgram $out/bin/rp \ - --prefix PATH : ${makeBinPath [ - coreutils - findutils - gawk - rosenpass - wireguard-tools - ]} - ''; - - meta = - rosenpass.meta - // { - description = "This package contains the Rosenpass tool `rp`, which is a script that wraps the `rosenpass` binary."; - mainProgram = "rp"; - }; - } diff --git a/pkgs/by-name/rosenpass/package.nix b/pkgs/by-name/rosenpass/package.nix deleted file mode 100644 index c4945b2a..00000000 --- a/pkgs/by-name/rosenpass/package.nix +++ /dev/null @@ -1,67 +0,0 @@ -{ - lib, - fetchFromGitHub, - nixosTests, - rustPlatform, - targetPlatform, - installShellFiles, - cmake, - libsodium, - pkg-config, -}: let - inherit - (lib) - optionalString - licenses - maintainers - ; -in - rustPlatform.buildRustPackage rec { - pname = "rosenpass"; - version = "unstable-2023-09-28"; - - src = fetchFromGitHub { - owner = pname; - repo = pname; - rev = "b15f17133f8b5c3c5175b4cfd4fc10039a4e203f"; - hash = "sha256-UXAkmt4VY0irLK2k4t6SW+SEodFE3CbX5cFbsPG0ZCo="; - }; - - cargoHash = "sha256-N1DQHkgKgkDQ6DbgQJlpZkZ7AMTqX3P8R/cWr14jK2I="; - - nativeBuildInputs = [ - cmake # for oqs build in the oqs-sys crate - pkg-config - rustPlatform.bindgenHook # for C-bindings in the crypto libs - installShellFiles - ]; - - buildInputs = [libsodium]; - - # nix defaults to building for aarch64 _without_ the armv8-a - # crypto extensions, but liboqs depends on these - preBuild = optionalString targetPlatform.isAarch64 '' - NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -march=armv8-a+crypto" - ''; - - postInstall = '' - installManPage doc/rosenpass.1 - ''; - - passthru.tests.rosenpass = nixosTests.rosenpass; - - meta = { - description = "Build post-quantum-secure VPNs with WireGuard!"; - homepage = "https://rosenpass.eu/"; - license = with licenses; [ - mit - /* - or - */ - asl20 - ]; - maintainers = with maintainers; [wucke13]; - platforms = ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux"]; - mainProgram = "rosenpass"; - }; - }