From 5a0b0d514f11c56de9f98799ff17e5d5f3c383f0 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Tue, 12 Sep 2023 14:09:09 +0200 Subject: [PATCH] removing nix for now until i get it working --- .github/workflows/nix.yaml | 16 -------- flake.lock | 48 ----------------------- flake.nix | 78 -------------------------------------- 3 files changed, 142 deletions(-) delete mode 100644 .github/workflows/nix.yaml delete mode 100644 flake.lock delete mode 100644 flake.nix diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml deleted file mode 100644 index f22695f..0000000 --- a/.github/workflows/nix.yaml +++ /dev/null @@ -1,16 +0,0 @@ -on: [push, pull_request] - -name: Nix CI - -jobs: - test: - name: Build and Test using Nix - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v23 - with: - extra_nix_config: | - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - run: nix build - - run: nix flake check diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 3c91b54..0000000 --- a/flake.lock +++ /dev/null @@ -1,48 +0,0 @@ -{ - "nodes": { - "naersk": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1671096816, - "narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=", - "owner": "nmattia", - "repo": "naersk", - "rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114", - "type": "github" - }, - "original": { - "owner": "nmattia", - "repo": "naersk", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1673947312, - "narHash": "sha256-xx/2nRwRy3bXrtry6TtydKpJpqHahjuDB5sFkQ/XNDE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2d38b664b4400335086a713a0036aafaa002c003", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "naersk": "naersk", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 88536a5..0000000 --- a/flake.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ - description = "snazy - a snazzy json log viewer"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - naersk.url = "github:nmattia/naersk"; - naersk.inputs.nixpkgs.follows = "nixpkgs"; - }; - - outputs = { self, nixpkgs, naersk }: - let - cargoToml = (builtins.fromTOML (builtins.readFile ./Cargo.toml)); - supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; - forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system); - in - { - overlays.default = final: prev: { - "${cargoToml.package.name}" = final.callPackage ./. { inherit naersk; }; - }; - - packages = forAllSystems (system: - let - pkgs = import nixpkgs { - inherit system; - overlays = [ - self.overlays.default - ]; - }; - in - { - "${cargoToml.package.name}" = pkgs."${cargoToml.package.name}"; - }); - - - defaultPackage = forAllSystems (system: (import nixpkgs { - inherit system; - overlays = [ self.overlays.default ]; - })."${cargoToml.package.name}"); - - checks = forAllSystems (system: - let - pkgs = import nixpkgs { - inherit system; - overlays = [ - self.overlays.default - ]; - }; - in - { - format = pkgs.runCommand "check-format" - { - buildInputs = with pkgs; [ rustfmt cargo ]; - } '' - ${pkgs.rustfmt}/bin/cargo-fmt fmt --manifest-path ${./.}/Cargo.toml -- --check - ${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt --check ${./.} - touch $out # it worked! - ''; - "${cargoToml.package.name}" = pkgs."${cargoToml.package.name}"; - }); - devShell = forAllSystems (system: - let - pkgs = import nixpkgs { - inherit system; - overlays = [ self.overlays.default ]; - }; - in - pkgs.mkShell { - inputsFrom = with pkgs; [ - pkgs."${cargoToml.package.name}" - ]; - buildInputs = with pkgs; [ - rustfmt - nixpkgs-fmt - ]; - LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib"; - }); - }; -}