diff --git a/.envrc b/.envrc deleted file mode 100644 index 3550a30..0000000 --- a/.envrc +++ /dev/null @@ -1 +0,0 @@ -use flake diff --git a/.github/workflows/build_nix.yml b/.github/workflows/build_nix.yml deleted file mode 100644 index a79a9fc..0000000 --- a/.github/workflows/build_nix.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: "Build project with Nix" - -on: - push: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 - - uses: cachix/cachix-action@v12 - with: - name: elxreno-rust - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - name: Building package - run: nix build - - name: Check package - run: nix flake check diff --git a/.github/workflows/build.yml b/.github/workflows/rust.yml similarity index 97% rename from .github/workflows/build.yml rename to .github/workflows/rust.yml index c3a240a..6719b83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/rust.yml @@ -1,4 +1,4 @@ -name: "Build project" +name: Rust on: push: diff --git a/.gitignore b/.gitignore index 233be64..da6d173 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ .idea .directory /target -/result -/.direnv **/*.rs.bk output.jpg diff --git a/default.nix b/default.nix deleted file mode 100644 index 39bacff..0000000 --- a/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -(import ( - fetchTarball { - url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; - sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; } -) { - src = ./.; -}).defaultNix diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 8e71cf1..0000000 --- a/flake.lock +++ /dev/null @@ -1,170 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "naersk": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1679567394, - "narHash": "sha256-ZvLuzPeARDLiQUt6zSZFGOs+HZmE+3g4QURc8mkBsfM=", - "owner": "nix-community", - "repo": "naersk", - "rev": "88cd22380154a2c36799fe8098888f0f59861a15", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "master", - "repo": "naersk", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1682067461, - "narHash": "sha256-E7ulmcilqeLzYkcPB8iS1hW9Hc5IZGuDvuLIEbla3eQ=", - "path": "/nix/store/k34j4f9a5l0zkd3zp3810qs31aqayvda-source", - "rev": "33ec638a51e5f06ad0753e47c27924e9fd9d2c39", - "type": "path" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1682018913, - "narHash": "sha256-Eo2ZkWB8+qy8fnmxtJUNJl6HHYYAgXDR29+OwDIzm1Q=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7048a48bc79b4361f77740420000d2b5454b0df7", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "gitignore": "gitignore", - "naersk": "naersk", - "nixpkgs": "nixpkgs_2", - "rust-overlay": "rust-overlay", - "utils": "utils" - } - }, - "rust-overlay": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1682043560, - "narHash": "sha256-ZsF4Yee9pQbvLtwSVGgYux+az4yFSLXrxPyGHm3ptJM=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "48037a6f8faeee138ede96bf607bc95c9dab9aec", - "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" - } - }, - "utils": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 3ac27bc..0000000 --- a/flake.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - inputs = { - naersk.url = "github:nix-community/naersk/master"; - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - rust-overlay = { - url = "github:oxalica/rust-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - utils.url = "github:numtide/flake-utils"; - gitignore = { - url = "github:hercules-ci/gitignore.nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = { self, nixpkgs, utils, naersk, rust-overlay, gitignore }: - utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { - inherit system; - overlays = [ (import rust-overlay) ]; - }; - - rust-toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; - - naersk-lib = pkgs.callPackage naersk { - cargo = rust-toolchain; - rustc = rust-toolchain; - }; - - escl-scan-cli = naersk-lib.buildPackage { - inherit nativeBuildInputs buildInputs; - pname = "escl-scan-cli"; - src = gitignore.lib.gitignoreSource ./.; - }; - - nativeBuildInputs = with pkgs; [ pkg-config ]; - buildInputs = with pkgs; [ openssl ]; - in - { - packages.escl-scan-cli = escl-scan-cli; - packages.default = self.packages.${system}.escl-scan-cli; - - devShells.default = with pkgs; mkShell { - inherit nativeBuildInputs; - buildInputs = buildInputs ++ [ (rust-toolchain.override { extensions = [ "rust-src" ]; }) ]; - }; - - checks = { - escl-scan-cli = self.packages.${system}.default.overrideAttrs (super: { doCheck = true; }); - }; - }); - - nixConfig = { - extra-experimental-features = "nix-command flakes"; - extra-substituters = [ "https://elxreno-rust.cachix.org" ]; - extra-trusted-public-keys = [ "elxreno-rust.cachix.org-1:cfUElkBCai6A6hqku/tOCrYt9qF+vQtAV8+8MF16gf8=" ]; - }; -} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 77db547..0000000 --- a/shell.nix +++ /dev/null @@ -1,7 +0,0 @@ -(import ( - fetchTarball { - url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; - sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; } -) { - src = ./.; -}).shellNix