aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/x509-info/.envrc1
-rw-r--r--src/x509-info/.github/dependabot.yml10
-rw-r--r--src/x509-info/.github/workflows/ci.yml47
-rw-r--r--src/x509-info/.github/workflows/update.yml29
-rw-r--r--src/x509-info/.gitignore3
-rw-r--r--src/x509-info/LICENSE20
-rw-r--r--src/x509-info/flake.lock174
-rw-r--r--src/x509-info/flake.nix167
-rw-r--r--src/x509-info/nix/check.nix44
-rw-r--r--src/x509-info/rust-toolchain.toml3
-rw-r--r--src/x509-info/rustfmt.toml1
11 files changed, 0 insertions, 499 deletions
diff --git a/src/x509-info/.envrc b/src/x509-info/.envrc
deleted file mode 100644
index a5dbbcb..0000000
--- a/src/x509-info/.envrc
+++ /dev/null
@@ -1 +0,0 @@
-use flake .
diff --git a/src/x509-info/.github/dependabot.yml b/src/x509-info/.github/dependabot.yml
deleted file mode 100644
index d062b44..0000000
--- a/src/x509-info/.github/dependabot.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-version: 2
-updates:
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: "weekly"
- - package-ecosystem: "cargo"
- directory: "/"
- schedule:
- interval: "weekly"
diff --git a/src/x509-info/.github/workflows/ci.yml b/src/x509-info/.github/workflows/ci.yml
deleted file mode 100644
index ba21a0a..0000000
--- a/src/x509-info/.github/workflows/ci.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-name: CI checks
-
-on: [push, pull_request]
-
-jobs:
- test:
- name: Test
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Run tests
- run: cargo test
- - name: Verify working directory is clean
- run: git diff --exit-code
-
- build:
- name: Build
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - run: cargo fetch
- - name: Build for target
- run: cargo build --verbose
-
- bitrot:
- name: Bitrot
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Check unused code
- run: cargo check --all-targets --all-features
-
- clippy:
- name: Clippy
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Check clippy
- run: cargo clippy -- -Dwarnings
-
- fmt:
- name: Rustfmt
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Check formatting
- run: cargo fmt --all -- --check
diff --git a/src/x509-info/.github/workflows/update.yml b/src/x509-info/.github/workflows/update.yml
deleted file mode 100644
index fab8d59..0000000
--- a/src/x509-info/.github/workflows/update.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-name: 'Update flake.lock'
-on:
- workflow_dispatch:
- schedule:
- - cron: '30 5 * * 0'
-
-# you need to grant permissions to create PR:
-# https://github.com/DeterminateSystems/update-flake-lock/issues/75
-jobs:
- update-flake-lock:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Install Nix
- uses: cachix/install-nix-action@v26
- with:
- extra_nix_config: |
- access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- - name: Update flake.lock
- id: update-flake-lock
- uses: DeterminateSystems/update-flake-lock@v23
- with:
- pr-title: "Update flake.lock"
- commit-msg: "chore: update flake"
- pr-assignees: fcuny
- pr-labels: |
- dependencies
- automated
diff --git a/src/x509-info/.gitignore b/src/x509-info/.gitignore
deleted file mode 100644
index 53e2c1a..0000000
--- a/src/x509-info/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/target
-/result
-/.pre-commit-config.yaml
diff --git a/src/x509-info/LICENSE b/src/x509-info/LICENSE
deleted file mode 100644
index ac375e1..0000000
--- a/src/x509-info/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2022 Franck Cuny
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/src/x509-info/flake.lock b/src/x509-info/flake.lock
deleted file mode 100644
index db7ada2..0000000
--- a/src/x509-info/flake.lock
+++ /dev/null
@@ -1,174 +0,0 @@
-{
- "nodes": {
- "fenix": {
- "inputs": {
- "nixpkgs": [
- "nixpkgs"
- ],
- "rust-analyzer-src": "rust-analyzer-src"
- },
- "locked": {
- "lastModified": 1719037638,
- "narHash": "sha256-+x7sc7OPYwi8OPebZ4Pqtzo9XyRcG5Sx7UZSGdj7HVs=",
- "owner": "nix-community",
- "repo": "fenix",
- "rev": "bedf55efd03d4796a3ddb267d7e081cc6b34483d",
- "type": "github"
- },
- "original": {
- "owner": "nix-community",
- "repo": "fenix",
- "type": "github"
- }
- },
- "flake-compat": {
- "flake": false,
- "locked": {
- "lastModified": 1696426674,
- "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
- "owner": "edolstra",
- "repo": "flake-compat",
- "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
- "type": "github"
- },
- "original": {
- "owner": "edolstra",
- "repo": "flake-compat",
- "type": "github"
- }
- },
- "lowdown-src": {
- "flake": false,
- "locked": {
- "lastModified": 1633514407,
- "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
- "owner": "kristapsdz",
- "repo": "lowdown",
- "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
- "type": "github"
- },
- "original": {
- "owner": "kristapsdz",
- "repo": "lowdown",
- "type": "github"
- }
- },
- "naersk": {
- "inputs": {
- "nixpkgs": [
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1718727675,
- "narHash": "sha256-uFsCwWYI2pUpt0awahSBorDUrUfBhaAiyz+BPTS2MHk=",
- "owner": "nix-community",
- "repo": "naersk",
- "rev": "941ce6dc38762a7cfb90b5add223d584feed299b",
- "type": "github"
- },
- "original": {
- "owner": "nix-community",
- "repo": "naersk",
- "type": "github"
- }
- },
- "nix": {
- "inputs": {
- "lowdown-src": "lowdown-src",
- "nixpkgs": "nixpkgs",
- "nixpkgs-regression": "nixpkgs-regression"
- },
- "locked": {
- "lastModified": 1674678482,
- "narHash": "sha256-MtVatZVsV+dtjdD4AC4bztrnDFas+WZYHzQMt41FwzU=",
- "owner": "nixos",
- "repo": "nix",
- "rev": "435a16b5556f4171b4204a3f65c9dedf215f168c",
- "type": "github"
- },
- "original": {
- "owner": "nixos",
- "ref": "2.13.2",
- "repo": "nix",
- "type": "github"
- }
- },
- "nixpkgs": {
- "locked": {
- "lastModified": 1670461440,
- "narHash": "sha256-jy1LB8HOMKGJEGXgzFRLDU1CBGL0/LlkolgnqIsF0D8=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "04a75b2eecc0acf6239acf9dd04485ff8d14f425",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "ref": "nixos-22.11-small",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
- "nixpkgs-regression": {
- "locked": {
- "lastModified": 1643052045,
- "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
- "type": "github"
- }
- },
- "nixpkgs_2": {
- "locked": {
- "lastModified": 1718983919,
- "narHash": "sha256-+1xgeIow4gJeiwo4ETvMRvWoircnvb0JOt7NS9kUhoM=",
- "owner": "nixos",
- "repo": "nixpkgs",
- "rev": "90338afd6177fc683a04d934199d693708c85a3b",
- "type": "github"
- },
- "original": {
- "owner": "nixos",
- "ref": "nixpkgs-unstable",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
- "root": {
- "inputs": {
- "fenix": "fenix",
- "flake-compat": "flake-compat",
- "naersk": "naersk",
- "nix": "nix",
- "nixpkgs": "nixpkgs_2"
- }
- },
- "rust-analyzer-src": {
- "flake": false,
- "locked": {
- "lastModified": 1718992362,
- "narHash": "sha256-Roaz1CckctannQVyhfwJ7sqmCGmU3hfTo/7Nmms06WM=",
- "owner": "rust-lang",
- "repo": "rust-analyzer",
- "rev": "c4681ea2cc1f2d1e1a0568ad03069c57bdcd7a88",
- "type": "github"
- },
- "original": {
- "owner": "rust-lang",
- "ref": "nightly",
- "repo": "rust-analyzer",
- "type": "github"
- }
- }
- },
- "root": "root",
- "version": 7
-}
diff --git a/src/x509-info/flake.nix b/src/x509-info/flake.nix
deleted file mode 100644
index 4b95c2e..0000000
--- a/src/x509-info/flake.nix
+++ /dev/null
@@ -1,167 +0,0 @@
-{
- description = "A CLI to display information about x509 certificates.";
-
- inputs = {
- nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
-
- fenix = {
- url = "github:nix-community/fenix";
- inputs.nixpkgs.follows = "nixpkgs";
- };
-
- naersk = {
- url = "github:nix-community/naersk";
- inputs.nixpkgs.follows = "nixpkgs";
- };
-
- nix = {
- url = "github:nixos/nix/2.13.2";
- };
-
- flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
- };
-
- outputs =
- { self
- , nixpkgs
- , fenix
- , naersk
- , nix
- , ...
- } @ inputs:
- let
- supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
-
- forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: (forSystem system f));
-
- forSystem = system: f: f rec {
- inherit system;
- pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; };
- lib = pkgs.lib;
- };
-
- fenixToolchain = system: with fenix.packages.${system};
- combine ([
- stable.clippy
- stable.rustc
- stable.cargo
- stable.rustfmt
- stable.rust-src
- ] ++ nixpkgs.lib.optionals (system == "x86_64-linux") [
- targets.x86_64-unknown-linux-musl.stable.rust-std
- ]);
- in
- {
- overlays.default = final: prev:
- let
- toolchain = fenixToolchain final.stdenv.system;
- naerskLib = final.callPackage naersk {
- cargo = toolchain;
- rustc = toolchain;
- };
- sharedAttrs = {
- pname = "x509-info";
- version = "0.1.0";
- src = builtins.path {
- name = "x509-info";
- path = self;
- };
-
- nativeBuildInputs = with final; [ ];
- buildInputs = with final; [ ] ++ lib.optionals (final.stdenv.isDarwin) (with final.darwin.apple_sdk.frameworks; [
- SystemConfiguration
- ]);
-
- copyBins = true;
- copyDocsToSeparateOutput = true;
-
- doCheck = true;
- doDoc = true;
- doDocFail = true;
- cargoTestOptions = f: f ++ [ "--all" ];
-
- override = { preBuild ? "", ... }: {
- preBuild = preBuild + ''
- # logRun "cargo clippy --all-targets --all-features -- -D warnings"
- '';
- };
- };
- in
- rec {
- x509-info = naerskLib.buildPackage sharedAttrs;
- } // nixpkgs.lib.optionalAttrs (prev.stdenv.system == "x86_64-linux") rec {
- default = x509-info-static;
- x509-info-static = naerskLib.buildPackage
- (sharedAttrs // {
- CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
- });
- };
-
- devShells = forAllSystems ({ system, pkgs, ... }:
- let
- toolchain = fenixToolchain system;
- check = import ./nix/check.nix { inherit pkgs toolchain; };
- in
- {
- default = pkgs.mkShell {
- name = "x509-info-shell";
-
- RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
-
- nativeBuildInputs = with pkgs; [ ];
- buildInputs = with pkgs; [
- toolchain
- rust-analyzer
- cargo-outdated
- cacert
- cargo-audit
- nixpkgs-fmt
- check.check-rustfmt
- check.check-spelling
- check.check-nixpkgs-fmt
- check.check-semver
- ]
- ++ lib.optionals (pkgs.stdenv.isDarwin) (with pkgs; [
- libiconv
- darwin.apple_sdk.frameworks.Security
- ])
- ++ lib.optionals (pkgs.stdenv.isLinux) (with pkgs; [
- checkpolicy
- ]);
- };
- });
-
- checks = forAllSystems ({ system, pkgs, ... }:
- let
- toolchain = fenixToolchain system;
- check = import ./nix/check.nix { inherit pkgs toolchain; };
- in
- {
- check-rustfmt = pkgs.runCommand "check-rustfmt" { buildInputs = [ check.check-rustfmt ]; } ''
- cd ${./.}
- check-rustfmt
- touch $out
- '';
- check-spelling = pkgs.runCommand "check-spelling" { buildInputs = [ check.check-spelling ]; } ''
- cd ${./.}
- check-spelling
- touch $out
- '';
- check-nixpkgs-fmt = pkgs.runCommand "check-nixpkgs-fmt" { buildInputs = [ check.check-nixpkgs-fmt ]; } ''
- cd ${./.}
- check-nixpkgs-fmt
- touch $out
- '';
- });
-
- packages = forAllSystems ({ system, pkgs, ... }:
- {
- inherit (pkgs) x509-info;
- } // nixpkgs.lib.optionalAttrs (system == "x86_64-linux") {
- inherit (pkgs) x509-info-static;
- default = pkgs.x509-info-static;
- } // nixpkgs.lib.optionalAttrs (pkgs.stdenv.isDarwin) {
- default = pkgs.x509-info;
- });
- };
-}
diff --git a/src/x509-info/nix/check.nix b/src/x509-info/nix/check.nix
deleted file mode 100644
index 4d7743c..0000000
--- a/src/x509-info/nix/check.nix
+++ /dev/null
@@ -1,44 +0,0 @@
-{ pkgs, toolchain }:
-
-let
- inherit (pkgs) writeShellApplication;
-in
-{
-
- # Format
- check-rustfmt = (writeShellApplication {
- name = "check-rustfmt";
- runtimeInputs = [ toolchain ];
- text = "cargo fmt --check";
- });
-
- # Spelling
- check-spelling = (writeShellApplication {
- name = "check-spelling";
- runtimeInputs = with pkgs; [ git codespell ];
- text = ''
- codespell \
- --ignore-words-list="crate" \
- --skip="./target,.git" \
- .
- '';
- });
-
- # NixFormatting
- check-nixpkgs-fmt = (writeShellApplication {
- name = "check-nixpkgs-fmt";
- runtimeInputs = with pkgs; [ git nixpkgs-fmt findutils ];
- text = ''
- nixpkgs-fmt --check .
- '';
- });
-
- # Semver
- check-semver = (writeShellApplication {
- name = "check-semver";
- runtimeInputs = with pkgs; [ cargo-semver-checks ];
- text = ''
- cargo-semver-checks semver-checks check-release
- '';
- });
-}
diff --git a/src/x509-info/rust-toolchain.toml b/src/x509-info/rust-toolchain.toml
deleted file mode 100644
index f4ebfd7..0000000
--- a/src/x509-info/rust-toolchain.toml
+++ /dev/null
@@ -1,3 +0,0 @@
-[toolchain]
-channel = "stable"
-components = [ "rustfmt", "clippy" ]
diff --git a/src/x509-info/rustfmt.toml b/src/x509-info/rustfmt.toml
deleted file mode 100644
index 3a26366..0000000
--- a/src/x509-info/rustfmt.toml
+++ /dev/null
@@ -1 +0,0 @@
-edition = "2021"