From cab7f72e28808c44c9b0d707348e49a4fc5a5c04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Sun, 18 Jun 2023 19:31:47 +0200 Subject: [PATCH] refactor: removed unused code from flake MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most of this was introduced during the process of getting the flake to work. Signed-off-by: Christina Sørensen --- flake.lock | 15 +-------------- flake.nix | 18 +----------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/flake.lock b/flake.lock index 1d752c4..562e4f3 100644 --- a/flake.lock +++ b/flake.lock @@ -134,8 +134,7 @@ "crane": "crane", "fenix": "fenix", "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs", - "test-directory": "test-directory" + "nixpkgs": "nixpkgs" } }, "rust-overlay": { @@ -192,18 +191,6 @@ "repo": "default", "type": "github" } - }, - "test-directory": { - "flake": false, - "locked": { - "narHash": "sha256-d6xi4mKdjkX2JFicDIv5niSzpyI0m/Hnm8GGAIU04kY=", - "type": "file", - "url": "file:///home/ces/org/src/git/gg" - }, - "original": { - "type": "file", - "url": "file:///home/ces/org/src/git/gg" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 8cdf87a..ab46ca7 100644 --- a/flake.nix +++ b/flake.nix @@ -21,14 +21,9 @@ url = "github:rustsec/advisory-db"; flake = false; }; - - test-directory = { - url = "file:///home/ces/org/src/git/gg"; - flake = false; - }; }; - outputs = { self, nixpkgs, crane, fenix, flake-utils, advisory-db, test-directory, ... }: + outputs = { self, nixpkgs, crane, fenix, flake-utils, advisory-db, ... }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { @@ -39,8 +34,6 @@ craneLib = crane.lib.${system}; - #src = craneLib.cleanCargoSource (craneLib.path ./.); - # When filtering sources, we want to allow assets other than .rs files src = lib.cleanSourceWith { src = ./.; # The original, unfiltered source @@ -54,13 +47,6 @@ ; }; - # src = pkgs.lib.cleanSourceWith { - # src = craneLib.path ./.; # original, unfiltered source - # filter = path: type: - # (builtins.match ".*yaml" path != null) # include JSONC files - # || (craneLib.filterCargoSources path type); - # }; - # Common arguments can be set here to avoid repeating them later commonArgs = { inherit src; @@ -93,7 +79,6 @@ # artifacts from above. my-crate = craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; - # doCheck = false; # NOTE remove me }); in { @@ -129,7 +114,6 @@ # Run tests with cargo-nextest # Consider setting `doCheck = false` on `my-crate` if you do not want # the tests to run twice - # NOTE enable this part my-crate-nextest = craneLib.cargoNextest (commonArgs // { inherit cargoArtifacts; partitions = 1;