Commit Graph

10 Commits

Author SHA1 Message Date
Ivan Petkov
35bc915249
cleanCargoToml: also clean variants using underscores (#626) 2024-05-26 17:41:17 +00:00
Ivan Petkov
92d2b4b64a
Use resolver = 2 in all Cargo.tomls (#608) 2024-05-04 19:56:00 +00:00
Ivan Petkov
c7bb4ed1f3
cleanCargoToml: strip out [lints] definitions when cleaning (#516) 2024-02-08 03:34:33 +00:00
Ivan Petkov
66303545d7
Update flake.lock (#382)
Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/919d646de7be200f3bf08cb76ae1f09402b6f9b4' (2023-07-11)
  → 'github:numtide/flake-utils/f9e7cf818399d17d347f847525c5a5a8032e4e44' (2023-08-23)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/5068bc8fe943bde3c446326da8d0ca9c93d5a682' (2023-08-07)
  → 'github:NixOS/nixpkgs/e7f35e03abd06a2faef6684d0de813370e13bda8' (2023-09-02)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/b520a3889b24aaf909e287d19d406862ced9ffc9' (2023-08-07)
  → 'github:oxalica/rust-overlay/98ccb73e6eefc481da6039ee57ad8818d1ca8d56' (2023-09-03)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-03 12:04:55 -07:00
Antti Keränen
99de890b6e
Keep "resolver" when cleaning Cargo.toml (#327)
For projects using version != 2021 and resolver = 2, the resolver
information needs to be kept or otherwise the dependency build might
fail.

---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-05-18 21:03:02 -07:00
adisbladis
c097eedd6b checks: Regenerate expected output for failing checks
Having changed the way of writing TOML there are some differences in output ordering.
2022-06-03 02:01:02 +08:00
Kayla Firestack
e908c1afea fix(nix-relative-paths): quote relative paths to allow for external sources
when trying to use crane with a non local src (eg, not `./.`) we get the error
```
$ nix flake show
<...>
error: access to absolute path '/Cargo.toml' is forbidden in pure eval mode (use '--impure' to override)
(use '--show-trace' to show detailed location information)
```

To fix this, we quote the relative paths so to properly append them to the base path.

https://nixos.wiki/wiki/Nix_Expression_Language#Coercing_a_relative_path_with_interpolated_variables_to_an_absolute_path_.28for_imports.29

## Reproduction flake
```
{
  description = "Build a cargo project without extra checks";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

    crane = {
      url = "github:ipetkov/crane";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    external-crate-source = {
      url = "github:ray-kast/empress";
      flake = false;
    };

    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, crane, flake-utils, external-crate-source, ... }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = nixpkgs.legacyPackages.${system};

        test-crate = crane.lib.${system}.buildPackage {
          src = external-crate-source.outPath;
        };
      in
      {
        packages.default = test-crate;
      });
}
```
2022-05-10 10:00:00 -04:00
Ivan Petkov
05c8945db7
tests: switch back to runCommand from runCommandLocal
* Seems like cachix is still pushing the results up to the cache, we
  might as well get use of downloading the (empty) results rather than
  having to pull down the intermediary binaries and running them each
  time
2022-02-17 18:15:09 -08:00
Ivan Petkov
d4b5f8abe6
chore: switch to runCommandLocal to reduce network pressure 2022-01-30 16:10:41 -08:00
Ivan Petkov
daae0bac2b
Rename checks/cleanCargoToml directory for consistency 2022-01-05 20:14:45 -08:00