Commit graph

82 commits

Author SHA1 Message Date
Léo Gaspard
bc1069f52a expose copySource for dealing with path-based dependencies 2021-01-18 14:39:52 +01:00
Nicolas Mattia
22b96210b2 Make top-level override easier
This adds `overrideMain f` which is equivalent to calling
`drv.overrideAttrs f`.
2020-10-08 18:05:41 +02:00
Nicolas Mattia
a82fd7dc31 Light cleanup 2020-04-16 15:45:40 +02:00
Tony Olagbaiye
c55558b630 Parse lockfile for expanded revision 2020-03-23 14:05:17 +01:00
Nicolas Mattia
d6ba33f942 Forward extra arguments to mkDerivation 2020-02-18 15:55:26 +01:00
Bas van Dijk
1b6b98d74f Fix too big environment variable paths in symlinkJoin
When there are too many crate dependencies the `crates.io` derivation will fail with:

```
while setting up the build environment: executing '/nix/store/rm1hz1lybxangc8sdl7xvzs5dcvigvf7-bash-4.4-p23/bin/bash': Argument list too long
builder for '/nix/store/pbbnw6y6zggqddy244ix5nyysamcgm0j-crates-io.drv' failed with exit code 1
```

This is caused by the [`paths` environment variable of `symlinkJoin`](fc592a52ca/pkgs/build-support/trivial-builders.nix (L250)) exceeding the limit.

This is fixed by having our own version of `symlinkJoin` called `symlinkJoinPassViaFile` which passes `paths` via a file instead of via an environment variable.

I think this should be fixed in the upstream `symlinkJoin` so I'll provide a PR for that in `nixpkgs`. But until that lands we should have this fix here.
2020-02-18 10:08:46 +01:00
Nicolas Mattia
360a3d20eb Don't touch lib and main and build except in build.nix 2020-02-11 23:44:42 +01:00
Nicolas Mattia
206cf17e20 Add copyBinsFilter option for configuring which executables are copied 2020-02-10 14:03:08 +01:00
Nicolas Mattia
45bee2e6b5 Refactor config.nix for cargo options 2020-02-10 12:53:55 +01:00
Nicolas Mattia
81a3ad4bf9 Ensure build.rs is rebuilt if necessary 2020-02-02 13:41:23 +01:00
Nicolas Mattia
cfbaf2a6f2 Clean up git dependency code 2019-12-17 17:03:10 +01:00
Nicolas Mattia
47b22494d9 Add experimental support for git dependencies 2019-12-16 10:33:10 +01:00
Nicolas Mattia
ad0580c8d8 Split source between src and root 2019-11-21 15:46:20 +01:00
Nicolas Mattia
568c3db8f3 Don't use builtins.fetchurl 2019-11-21 10:34:16 +01:00
zimbatm
9a72012540
stylistic changes
these are not mandated by nixpkgs-fmt
2019-11-19 20:12:42 +00:00
zimbatm
d11a8a036c
format nix code with nixpkgs-fmt v0.6.1 2019-11-19 20:12:36 +00:00
Nicolas Mattia
4714fb8ac1 Allow path or attrset as arguments 2019-11-18 17:52:11 +01:00
Nicolas Mattia
79ccb516e9 Split build and build-plan configuration 2019-11-18 16:41:28 +01:00
Nicolas Mattia
9829b21bc1 Make all build.nix arguments mandatory 2019-11-18 16:16:46 +01:00
Nicolas Mattia
115b63b554 Re indent 2019-11-18 14:59:14 +01:00
Nicolas Mattia
1e4b63a406 Split config out of default 2019-11-18 14:58:25 +01:00
Nicolas Mattia
deb09d67e6 Compress target by default 2019-11-13 16:31:13 +01:00
Nicolas Mattia
2b5696830f Remove silly names and set proper package name and version 2019-10-30 17:42:44 +01:00
Nicolas Mattia
b5fa169655 Remove unused parameters 2019-10-30 15:25:41 +01:00
Nicolas Mattia
4dd9dc45bd Cleanup preBuild 2019-10-30 15:12:59 +01:00
Bas van Dijk
9ed75a8286
Merge pull request #31 from nmattia/patched-sources
Copy paths from the [patch] section into the dummy-src
2019-10-29 15:27:10 +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
0327d6a66a Fix missing name 2019-10-29 13:31:22 +01:00
Philip Patsch
3f04e344ec default.nix: improve derivation names a bit 2019-10-27 23:10:29 +01:00
Nicolas Mattia
db7b28ab9e dummySrc: only create config file when config exists 2019-10-14 12:31:46 +02:00
Nicolas Mattia
6b78252c24 Drop singleStep attr when calling build.nix 2019-10-14 10:25:48 +02:00
Nicolas Mattia
816b15c73a Simplify configuration for single step build 2019-10-10 18:50:03 +02:00
Nicolas Mattia
1a3ede8a56 Don't import src in store for pathExists 2019-10-10 14:07:19 +02:00
Nicolas Mattia
6c072bd0ed Use cargo_release arg list for --release 2019-09-11 13:45:06 +02:00
Bas van Dijk
df0c276e7a Use the cargoTestCommands specified by the user for building the deps 2019-09-09 11:21:51 +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
Bas van Dijk
21850b632a Run cargo clippy for the deps 2019-09-04 12:15:15 +02:00
Bas van Dijk
e98ef6b715 Run cargoBuild and cargoTest per crate 2019-09-04 12:14:36 +02:00
Nicolas Mattia
51e8f903c4 Fix features rebuild 2019-08-28 19:21:13 +02:00
Nicolas Mattia
fc13d3d7b8 Fix rebuild on install 2019-08-28 11:20:40 +02:00
Bas van Dijk
156328e941 Don't copy the docs to a separate doc output for the dependencies
In the deps derivation the docs are already contained in `target`
which is copied to `$out`. So in that case also copying the docs to a
separate `$doc` output wastes space. Only the final derivation should
have its docs in a separate `$doc` output.
2019-08-26 16:35:05 +02:00
Nicolas Mattia
2692cfbfc1 Avoid IFD as much as possible 2019-07-31 15:53:30 +02:00
Nicolas Mattia
104df3fe88 Fixup toTOML 2019-07-31 15:07:16 +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
Bas van Dijk
4701ae2622 Add support for cargo doc 2019-07-16 14:43:32 +02:00
Nicolas Mattia
4c2daf7ccd Fix workspaces 2019-07-11 11:39:40 +02:00
Nicolas Mattia
2432ecdd87 Implement hacky pre-building of deps for workspaces 2019-07-11 11:06:43 +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