Commit graph

39 commits

Author SHA1 Message Date
Nicolas Mattia
a3f40fe42c Make sure patched dependencies are left intact
Fixes #170
2021-05-06 17:48:50 +02:00
Nicolas Mattia
b3b099d669 Fix picking wrong git dep
We were using the first encountered dependency _by name_ from the
lockfile, although the revision may not have been correct.
2021-04-10 17:29:01 +02:00
Jörg Thalheim
e0fe990b47 Revert "make fetchgit work when not fetching from master"
This reverts commit 79129b5c16.

This fixes https://github.com/nmattia/naersk/issues/149
2021-03-03 16:30:51 +01:00
oxalica
a2a4b60a9e Avoid accidentally pulling std for no-std crates 2021-02-26 11:01:05 +01:00
jD91mZM2
6e149bfd72 Support flake-based workspaces
Flake sources are nix derivations, which means they automatically get
made read-only. This causes overwriting Cargo.toml and potentially
build.rs fail. The cure to this is to either chmod the sources after
copy, or in this case copy without preserving the file's original mode.
2021-02-01 16:19:24 +01:00
Léo Gaspard
79129b5c16 make fetchgit work when not fetching from master
This is required so that fetching dependencies from a feature branch is
possible.

See also https://github.com/NixOS/nix/pull/3408
2021-01-26 15:37:44 +01:00
Yusuf Bera Ertan
79a613f3b5 fix: renamed dependencies breaking matchByName 2021-01-18 14:48:59 +01:00
Yusuf Bera Ertan
4615814c20 fix: no rev found 2021-01-18 14:48:59 +01:00
Léo Gaspard
bc1069f52a expose copySource for dealing with path-based dependencies 2021-01-18 14:39:52 +01:00
Nicolas Mattia
ce273fa593 Remove default-run in package for dep build 2020-11-13 12:33:04 +01:00
Tony Olagbaiye
c55558b630 Parse lockfile for expanded revision 2020-03-23 14:05:17 +01:00
Bas van Dijk
3e1f71f453 Support branch and tag attributes in git sources 2020-03-16 13:08:01 +01:00
Nicolas Mattia
4225dfaff9 Add support for new lockfile format 2020-02-07 17:35:30 +01:00
Nicolas Mattia
6eea568200 Ensure build-dependencies are built
This adds a dummy `build.rs` in `dummy-src` to ensure build dependencies are built.
2020-01-21 14:14:31 +01:00
Nicolas Mattia
cfbaf2a6f2 Clean up git dependency code 2019-12-17 17:03:10 +01:00
Nicolas Mattia
e994e8692f Improve git dependency support 2019-12-17 16:55:52 +01:00
Nicolas Mattia
47b22494d9 Add experimental support for git dependencies 2019-12-16 10:33:10 +01:00
Nicolas Mattia
dc21c17d58 Remove useless functions 2019-12-13 17:57:23 +01:00
zimbatm
d11a8a036c
format nix code with nixpkgs-fmt v0.6.1 2019-11-19 20:12:36 +00:00
zimbatm
4f1f9a0a94
use let .. in instead of with blocks
A personal stylistic preference
2019-11-19 19:35:30 +00:00
Nicolas Mattia
2b5696830f Remove silly names and set proper package name and version 2019-10-30 17:42:44 +01:00
Nicolas Mattia
4dd9dc45bd Cleanup preBuild 2019-10-30 15:12:59 +01:00
Bas van Dijk
59921aa707 Copy paths from the [patch] section into the dummy-src
This allows users to override the source of crates using:

```
[patch.crates-io]
bar = { path = 'my/local/bar' }
```
2019-10-29 14:57:28 +01:00
Nicolas Mattia
afcccb2f63 Fix typo when copying config 2019-10-16 14:47:47 +02:00
Nicolas Mattia
db7b28ab9e dummySrc: only create config file when config exists 2019-10-14 12:31:46 +02:00
Bas van Dijk
a9cade2ca2 Remove build scripts during dummyfication
Otherwise builds fail with an error like:

Compiling simple-dep v0.1.0 (/private/var/folders/5h/b11m6fxj2tqgbxwz5bgjy42c0000gn/T/nix-build-some-name.drv-0/dummy-src)
error: couldn't read build.rs: No such file or directory (os error 2)
2019-10-09 16:33:27 +02:00
Nicolas Mattia
566c70a395 Properly fixup cargo tomls for dep build 2019-10-09 10:37:22 +02:00
Nicolas Mattia
0b89694709 Cleanup 2019-10-09 10:34:16 +02:00
Bas van Dijk
2791c3bd52 Use cargo build --out-dir instead of cargo install
Since we don't use cargo install anymore we go back to building the
workspace instead of building each crate separately.
2019-09-04 17:36:40 +02:00
Nicolas Mattia
51e8f903c4 Fix features rebuild 2019-08-28 19:21:13 +02:00
Nicolas Mattia
bdf64f6034 wip 2019-07-31 13:41:34 +02:00
Nicolas Mattia
7387010557 Improve incremental builds 2019-07-30 12:41:32 +02:00
Nicolas Mattia
4022afd8b9 Add support for prebuilt dependencies 2019-07-11 11:06:43 +02:00
Nicolas Mattia
9787ccbeee Clean up unused argument 2019-07-11 11:06:43 +02:00
Nicolas Mattia
0068df8a99 Cleanup 2019-07-02 12:50:32 +02:00
Nicolas Mattia
a6d78f986f Add semi-generic incremental build 2019-06-28 18:16:08 +02:00
Nicolas Mattia
85a5d5399c Clean up incremental build 2019-06-28 16:45:41 +02:00
Nicolas Mattia
80a0a147aa break-all-the-things 2019-06-27 17:49:59 +02:00
Nicolas Mattia
58c2afc80e Factor out build and lib code 2019-06-25 17:36:22 +02:00