From d245554429ad3b8abb15abc603a127b90c71b854 Mon Sep 17 00:00:00 2001 From: "Sergey \"Shnatsel\" Davidoff" Date: Wed, 17 Jul 2024 09:39:52 +0100 Subject: [PATCH 1/2] Drop the in-tree nix flake Signed-off-by: Sergey "Shnatsel" Davidoff --- .github/workflows/nix.yml | 27 ------ flake.lock | 183 -------------------------------------- flake.nix | 107 ---------------------- 3 files changed, 317 deletions(-) delete mode 100644 .github/workflows/nix.yml delete mode 100644 flake.lock delete mode 100644 flake.nix diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml deleted file mode 100644 index 36e610fc..00000000 --- a/.github/workflows/nix.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: "Nix Flake CI" - -on: - pull_request: - push: - branches: - - 'main' - -jobs: - tests: - name: Nix Flake Build & Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v9 - - name: Run the Magic Nix Cache - uses: DeterminateSystems/magic-nix-cache-action@v3 - - - name: Build the default flake output - run: nix build - - - name: Check the flake outputs - run: nix flake check - - - name: Check the flake's formatting - run: nix develop --command nixpkgs-fmt --check flake.nix diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 0a0dd880..00000000 --- a/flake.lock +++ /dev/null @@ -1,183 +0,0 @@ -{ - "nodes": { - "crane": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1687310026, - "narHash": "sha256-20RHFbrnC+hsG4Hyeg/58LvQAK7JWfFItTPFAFamu8E=", - "owner": "ipetkov", - "repo": "crane", - "rev": "116b32c30b5ff28e49f4fcbeeb1bbe3544593204", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1685518550, - "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1687898314, - "narHash": "sha256-B4BHon3uMXQw8ZdbwxRK1BmxVOGBV4viipKpGaIlGwk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e18dc963075ed115afb3e312b64643bf8fd4b474", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "crane": "crane", - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay_2" - } - }, - "rust-overlay": { - "inputs": { - "flake-utils": [ - "crane", - "flake-utils" - ], - "nixpkgs": [ - "crane", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1685759304, - "narHash": "sha256-I3YBH6MS3G5kGzNuc1G0f9uYfTcNY9NYoRc3QsykLk4=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "c535b4f3327910c96dcf21851bbdd074d0760290", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1687919622, - "narHash": "sha256-cJwMwVcx+3wW3QYPj5g/fwzrULRUYnGXH9TBv7JwBGk=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "fc57a011f1c20d2b24f75a79ab669430a221b220", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index d8261666..00000000 --- a/flake.nix +++ /dev/null @@ -1,107 +0,0 @@ -{ - description = "A framework for developing the Rust CycloneDX implementation"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - flake-utils.url = "github:numtide/flake-utils"; - - crane = { - url = "github:ipetkov/crane"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - rust-overlay = { - url = "github:oxalica/rust-overlay"; - inputs = { - nixpkgs.follows = "nixpkgs"; - flake-utils.follows = "flake-utils"; - }; - }; - }; - - outputs = { self, nixpkgs, flake-utils, crane, rust-overlay, ... }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { - inherit system; - overlays = [ (import rust-overlay) ]; - }; - - rustToolchain = pkgs.rust-bin.stable.latest.default.override { - extensions = [ "rust-analyzer" "rust-src" ]; - }; - - craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain; - - xmlFilter = path: _type: builtins.match ".*xml$" path != null; - jsonFilter = path: _type: builtins.match ".*json$" path != null; - snapshotTestFilter = path: _type: builtins.match ".*snap" path != null; - stderrFilter = path: _type: builtins.match ".*stderr" path != null; - - srcFilter = path: type: - (xmlFilter path type) || (jsonFilter path type) || (snapshotTestFilter path type) || (stderrFilter path type) || (craneLib.filterCargoSources path type); - - src = pkgs.lib.cleanSourceWith { - src = craneLib.path ./.; - filter = srcFilter; - }; - - commonArgs = { - inherit src; - - pname = "cyclonedx-rust-cargo"; - version = "0.1.0"; - - nativeBuildInputs = with pkgs; [ pkg-config ]; - }; - - cargoArtifacts = craneLib.buildDepsOnly commonArgs; - - cyclonedx-rust-cargo = craneLib.buildPackage (commonArgs // { - inherit cargoArtifacts; - }); - in - rec { - checks = { - inherit cyclonedx-rust-cargo; - - clippy = craneLib.cargoClippy (commonArgs // { - inherit cargoArtifacts; - }); - - doc = craneLib.cargoDoc (commonArgs // { - inherit cargoArtifacts; - }); - - fmt = craneLib.cargoFmt (commonArgs // { - inherit src; - }); - }; - - packages.cyclonedx-rust-cargo = cyclonedx-rust-cargo; - packages.default = packages.cyclonedx-rust-cargo; - - apps.cargo-cyclonedx = flake-utils.lib.mkApp { - drv = packages.cyclonedx-rust-cargo; - name = "cargo-cyclonedx"; - }; - apps.default = apps.cargo-cyclonedx; - - devShells.default = pkgs.mkShell { - inputsFrom = builtins.attrValues self.checks.${system}; - - packages = with pkgs; [ - rustToolchain - cargo-edit - cargo-msrv - cargo-outdated - - # GitHub tooling - gh - - # Nix tooling - nixpkgs-fmt - ]; - }; - }); -} From 52bea2221a5e1c82ee0aeb8355b1bfca6a798ce7 Mon Sep 17 00:00:00 2001 From: "Sergey \"Shnatsel\" Davidoff" Date: Wed, 17 Jul 2024 10:50:10 +0100 Subject: [PATCH 2/2] drop nix .envrc Signed-off-by: Sergey "Shnatsel" Davidoff --- .envrc | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .envrc diff --git a/.envrc b/.envrc deleted file mode 100644 index 8392d159..00000000 --- a/.envrc +++ /dev/null @@ -1 +0,0 @@ -use flake \ No newline at end of file