Commit graph

264 commits

Author SHA1 Message Date
Nicolas Mattia
df71f5e4ba Revert "Don't rely on unstable flags."
This reverts commit f9e6e8dd78. We should
`export CARGO_TARGET_DIR`, otherwise subsequent `cargo` calls will
rebuild everything (because they won't find the target dir).
2021-08-23 10:26:39 +02:00
Dawid Ciężarkiewicz
f9e6e8dd78 Don't rely on unstable flags. 2021-08-23 09:54:46 +02:00
figsoda
e09c320446 fix typo 2021-06-17 12:50:34 +02:00
zimbatm
4f7426c362 ci: run all tests on master
Some tests like the wasm one were never executed because they are
neither --fast, nor tested in the main CI.

This copies the fast.yml into test.yml, minus the --fast flag.
2021-06-10 13:30:58 +02:00
Jude Taylor
e8061169e1 add libiconv unconditionally 2021-06-04 14:38:02 +02:00
Nicolas Mattia
a3f40fe42c Make sure patched dependencies are left intact
Fixes #170
2021-05-06 17:48:50 +02:00
Nicolas Mattia
32e3ba39d9 Update README 2021-04-19 16:59:25 +02:00
Gregory C. Oakes
59bcaf4c47 Fix windows executables not having .exe suffix. 2021-04-19 16:49:26 +02:00
Milan Pässler
683f785848 add cargoDocOptions and cargoDocCommands 2021-04-19 16:47:23 +02:00
Gregory C. Oakes
380e143955 doc(flake): add examples and templates for cross compilation
This implements very basic examples of how to configure a project to
build mingw-w64 and static musl targets.
2021-04-19 16:45:58 +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
Cole Helbling
1a9e5ddc51 fix(builtins/to-toml): support int type
Fixes https://github.com/nmattia/naersk/issues/148.

"As of rust-lang/cargo@7dd9872, Cargo adds a new `version = 3` key to
the lockfile's top level"
2021-02-18 14:35:51 +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
Jan Tojnar
f744d2f193 treewide: pkgconfig → pkg-config
The alias is now deprecated in Nixpkgs.
2021-02-01 16:18:21 +01:00
Jan Tojnar
3e223a7401 treewide: stdenv.lib → lib
The alias has been deprecated.

https://github.com/NixOS/nixpkgs/issues/108938
2021-02-01 16:18:21 +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
d7bfbad330 FIx GitHub action
This pulls @knl's fix from https://github.com/nmattia/niv/pull/305
2021-01-11 20:11:26 +01:00
Milan Pässler
a76924cbbb add musl test 2020-12-01 14:44:03 +01:00
Milan Pässler
f65b4eac20 run tests on nixpkgs{,-20.03,-20.09} 2020-12-01 11:15:46 +01:00
Milan Pässler
b586948d0a run tests on ubuntu 20.04 2020-12-01 11:15:46 +01:00
Milan Pässler
95d9d994e8 add nixpkgs-20.09 2020-12-01 11:15:46 +01:00
Milan Pässler
310be72438 remove nixpkgs-19.09 2020-12-01 11:15:46 +01:00
Milan Pässler
48ba271596 update nixpkgs-20.03 2020-12-01 11:15:46 +01:00
Milan Pässler
56ff78fa11 update nixpkgs 2020-12-01 11:15:46 +01:00
Milan Pässler
28c2de3255 update niv sources.nix 2020-12-01 11:15:46 +01:00
Nicolas Mattia
8d562105f9 Port nix flake doc to README.tpl.md 2020-11-30 13:16:45 +01:00
jD91mZM2
76c537807c Improve nix flake templates 2020-11-30 13:16:45 +01:00
Nicolas Mattia
ce273fa593 Remove default-run in package for dep build 2020-11-13 12:33:04 +01:00
Nicolas Mattia
f5ecd757b3 Add default-run failing test 2020-11-13 12:33:04 +01:00
Jude Taylor
ff6a6c73e1 make dep resolution actually fully deterministic hopefully 2020-11-12 16:58:21 +01:00
Jude Taylor
8aab1ec641 avoid key collision in git dependencies 2020-11-12 16:58:21 +01:00
Cole Helbling
d645515b71 flake: remove edition and format
The edition attribute is deprecated:

    warning: flake 'git+file:///home/vin/workspace/vcs/naersk' has deprecated attribute 'edition'
2020-10-29 10:16:55 +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
Nikola Knezevic
529e910a3f Handle documentation for different targets
When cargo is instructed to build code for a different target, it will store the
output under `target/<host-triple>`. This means that some docs will be under
`target/<triple>/doc` and some under `target/doc`.

This change takes into the account the existence of `CARGO_BUILD_TARGET` and
uses that to discover newly created docs when copying/processing.
2020-08-11 11:38:00 +02:00
Nicolas Mattia
648f8c9cce Update README and limit concurrent builds 2020-08-10 11:24:36 +02:00
Cabia Rangris
59352d86f5 Added flakes section to README.md 2020-08-10 11:21:28 +02:00
Nicolas Mattia
dcee40445c Disable copyLibs by default
Most of the time we only want the executables.
2020-07-20 12:18:14 +02:00
Nicolas Mattia
20ec73e49b Move copyLibs documentation to code 2020-07-20 12:18:14 +02:00
Michael Bishop
f6d2cc0cfc fix lndir 2020-07-20 12:18:14 +02:00
Moritz Angermann
ab387a3384 Update README.md 2020-07-20 12:18:14 +02:00
Moritz Angermann
876c051887 Adds support for collecting libs
Using rust as library provider requires us to collect the
libraries (shared and static) to link against.

Ideally we'd also copy headers, but I didn't find those yet.

Fixes #104
2020-07-20 12:18:14 +02:00
Nicolas Mattia
caa7c289a1 Remove git-dep-by-branch
The test is not reproducible since the tip of the branch may move.
2020-07-20 11:47:36 +02:00
Nicolas Mattia
18e1206fe4 Fix GitHub actions for nix 2020-07-20 11:47:36 +02:00
zimbatm
d5a23213d5 add overlay
A convenience utility
2020-07-06 11:30:28 +02:00
Nicolas Mattia
a82fd7dc31 Light cleanup 2020-04-16 15:45:40 +02:00