Commit Graph

207 Commits

Author SHA1 Message Date
Ivan Petkov
a2dd1b8ad4
Allow configuring which cargo profile is selected 2022-07-23 11:10:45 -07:00
Ivan Petkov
bce972e03b
Add cargoHelperFunctionsHook
* It will automatically capture and log all `cargo` invocations
2022-07-23 11:11:36 -07:00
Ivan Petkov
7fc1a8fec3
Remove --workspace from all default commands
* This allows for fewer assumptions about the project structure
* The old behavior can easily be brought back by setting `cargoExtraArgs
  = "--workspace";` in any derivation
2022-07-20 19:27:52 -07:00
Ivan Petkov
731a81056b
Remove nixpkgs-fmt check 2022-07-20 19:44:53 -07:00
Ivan Petkov
1239aa345d
Update CHANGELOG 2022-07-20 17:53:58 -07:00
Ivan Petkov
c91b2d3c6b
Mark reformat commit as an ignored revision 2022-07-20 17:58:04 -07:00
Ivan Petkov
9eb8357f53
Reformat nix files 2022-07-09 20:20:15 -07:00
Ivan Petkov
56e3bd715d
flake.lock: Update
Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1' (2022-05-30)
  → 'github:numtide/flake-utils/7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249' (2022-07-04)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/5643714dea562f0161529ab23058562afeff46d0' (2022-05-31)
  → 'github:NixOS/nixpkgs/cd8d1784506a7c7eb0796772b73437e0b82fad57' (2022-07-20)
2022-07-20 17:57:28 -07:00
Ivan Petkov
c850d8c935
Merge pull request #47 from ipetkov/dummy-fix
mkDummySrc: fix handling when src is already filtered
2022-06-30 15:20:17 +00:00
Ivan Petkov
7fcdce8a0f
Update CHANGELOG 2022-06-29 20:55:25 -07:00
Ivan Petkov
b9b1c322a5
mkDummySrc: fix handling when src is already filtered 2022-06-29 20:49:12 -07:00
Ivan Petkov
223aaedd36
Merge pull request #45 from ipetkov/toolchain 2022-06-26 19:18:22 +00:00
Ivan Petkov
8b57883437
ci: don't abort other jobs if one fails
* The best thing we can do is finish those jobs and cache their results
  so subsequent runs don't have to start over again
2022-06-26 11:38:51 -07:00
Ivan Petkov
baae39b7e0
Skip aarch64-darwin evaluation for cross-rust-overlay example 2022-06-26 11:38:08 -07:00
Ivan Petkov
43aab4b7d8
Add .overrideToolchain convenience method 2022-06-26 11:25:40 -07:00
Ivan Petkov
4a3f1394b2
Update CHANGELOG 2022-06-12 16:56:30 -07:00
Ivan Petkov
6c8c826f97
Merge pull request #42 from ipetkov/groupBy
Import groupBy from lib not builtins
2022-06-07 22:00:12 +00:00
Ivan Petkov
49141d2b37
Import groupBy from lib not builtins
* lib.groupBy will default to builtins.groupBy if available, so it is
  safer to use
2022-06-07 14:51:20 -07:00
Ivan Petkov
db5482bf22
Merge pull request #40 from yusdacra/fix/dont-check-cargo-lock 2022-06-05 08:55:08 -07:00
Yusuf Bera Ertan
8f0b89244f
fix(mkDummySrc): remove IFD trigger by not checking if cargo lock path exists, the build will fail if it doesnt 2022-06-05 14:04:20 +03:00
Ivan Petkov
4fe4d14281
Merge pull request #39 from ipetkov/cleanup
buildDepsOnly: remove (now unnecessary) cargoLock check
2022-06-02 21:00:09 -07:00
Ivan Petkov
6fd4d85dac
buildDepsOnly: remove (now unnecessary) cargoLock check
* Previously we would manually copy over any Cargo.lock file from the
  source to the dummified source
* Now, `mkDummySrc` will implicitly copy the file if it is present, or
  ignore it if missing, so this check is a bit overzealous now
* Loosening this check also allows callers to sneak in their own
  Cargo.lock file (e.g. through a patch phase) while still avoiding IFD
2022-06-02 20:51:28 -07:00
Ivan Petkov
b2fedd23ff
Merge pull request #37 from adisbladis/unflaked
Make crane possible to use without flakes
2022-06-02 20:12:37 -07:00
Ivan Petkov
eb469e6981
Update changelog 2022-06-02 19:52:25 -07:00
Ivan Petkov
c2acd4b443
Minor cleanup 2022-06-02 19:49:44 -07:00
adisbladis
69c96f9d9e checks: Add a check that hits default.nix in the root
This is testing stable Nix (i.e. non-flakes).
2022-06-03 02:01:02 +08: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
adisbladis
26daa5a397 Add a meaningful default.nix
That can be used from classic Nix (i.e. non-Flakes) like this:
``` nix
{ lib ? pkgs.lib
, pkgs ? import <nixpkgs> { }
}:

let
  craneLib = import ../crane { inherit pkgs; };

  src = lib.cleanSource ./.;

  cargoArtifacts = craneLib.buildDepsOnly {
    inherit src;
  };

in craneLib.buildPackage {
  inherit cargoArtifacts src;
}
```
2022-06-03 02:01:02 +08:00
adisbladis
5d5803ff75 flake: Remove nix-std dependency
The only thing used from this library was the toTOML which is now
handled directly in the TOML writer.
2022-06-03 02:01:02 +08:00
adisbladis
a1e56fba69 Stop passing around fromTOML
It's a builtin that we can just use directly.
2022-06-03 02:01:02 +08:00
adisbladis
2491382d63 Remove internal dependency on toTOML 2022-06-03 02:01:02 +08:00
adisbladis
8b42ac1096 default.nix: Move to shell.nix
In it's current form the default.nix file is not useful, but a
shell.nix for classic Nix development might be.
2022-06-02 14:23:13 +08:00
Ivan Petkov
d64285699a
Merge pull request #38 from ipetkov/nix-bump
ci: bump stable Nix to use 22.05 release
2022-06-01 17:32:52 -07:00
Ivan Petkov
4035bf80da
flake.lock: Update
Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11)
  → 'github:numtide/flake-utils/1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1' (2022-05-30)
• Updated input 'nix-std':
    'github:chessai/nix-std/8b8d32582e298da2c15b4c13ca48ba7994ef96df' (2022-03-18)
  → 'github:chessai/nix-std/082f38023b68f93cd3a6e3a8ddda54d3f5487c52' (2022-05-15)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d146577610c17d7674a2d3e285fc637c520ad344' (2022-04-27)
  → 'github:NixOS/nixpkgs/5643714dea562f0161529ab23058562afeff46d0' (2022-05-31)
2022-06-01 17:17:48 -07:00
Ivan Petkov
e78d9b8370
checks: enable tarpaulin checks only on x86_64-linux 2022-06-01 17:17:02 -07:00
Ivan Petkov
57825c24da
Update all flake attributes to follow the new .default format 2022-06-01 17:09:29 -07:00
Ivan Petkov
4bd60ab128
Drop compatibility for Nix versions below 2.8.1 2022-06-01 17:05:52 -07:00
Ivan Petkov
30eadf3b3f
ci: bump nix stable version to 2.8.1 2022-06-01 17:03:31 -07:00
Ivan Petkov
4cce5fe54f
Tag v0.4.1 2022-05-29 16:10:28 -07:00
Ivan Petkov
cec8c8674c
Merge pull request #32 from ipetkov/fix-dummy-invalidation
mkDummySrc: fix cache invalidation if src is flake root
2022-05-29 16:08:44 -07:00
Ivan Petkov
aee882293f
Update CHANGELOG 2022-05-29 16:03:35 -07:00
Ivan Petkov
e0fbad205b
Add extra tests for mkDummySrc inputs 2022-05-29 15:43:58 -07:00
Ivan Petkov
8261aaeb8f quick-start: update to conditionally enable cargo-tarpaulin
* Seems like cargo-tarpaulin only officially supports x86_64 systems,
  and more recent versions are marked as broken on other systems in
  nixpkgs
2022-05-21 20:32:10 -07:00
Ivan Petkov
4f2b1c43c9
mkDummySrc: fix cache invalidation if src is flake root 2022-05-16 20:10:38 -07:00
Ivan Petkov
a233d51034
Also update README example 2 2022-05-12 16:16:21 -07:00
Ivan Petkov
8f2570a7cc
Improve README example to show how to share args between derivations
Fixes #25
2022-05-12 16:07:05 -07:00
Ivan Petkov
a3a6df2181
Merge pull request #27 from TristanCacqueray/cross-musl-path 2022-05-11 15:52:40 -07:00
Tristan Cacqueray
092dac897e flake: fix cross-musl path 2022-05-11 21:37:47 +00:00
Ivan Petkov
ca0bc628fc
Update changelog 2022-05-10 17:28:31 -07:00
Ivan Petkov
c8b8597ecb
Merge pull request #26 from firestack/fix/relative-paths
fix(nix-relative-paths): quote relative paths to allow for external sources
2022-05-10 17:21:29 -07:00