1
1
mirror of https://github.com/nmattia/niv.git synced 2024-11-29 09:42:35 +03:00
Commit Graph

387 Commits

Author SHA1 Message Date
Nicolas Mattia
dd13098d01 Release 0.2.17 2020-09-08 11:48:42 +02:00
Nicolas Mattia
5c2b920526 Update changelog 2020-09-08 11:45:00 +02:00
Nicolas Mattia
b50a010769 Show version with --version 2020-09-07 16:14:10 +02:00
Nicolas Mattia
6ae4c7700b Don't push drv files to cachix 2020-09-07 16:13:30 +02:00
Nicolas Mattia
fad2a6cbfb Update netlify deploy 2020-08-29 09:42:20 +02:00
Nicolas Mattia
89ae775e9d Add --rev and -r
This should hopefully clarify that `--version` shouldn't be used for
GitHub repositories; moreover setting a particular revision is used much
more often than changing the repo name.
2020-08-21 16:17:27 +02:00
zimbatm
de84001689 sources.nix: bootstrap with a custom system
When combining Nix Flakes with niv, `builtins.currentSystem` is
disabled. This allows to bootstrap nixpkgs by passing the system from
the flake evaluation.
2020-08-21 15:22:14 +02:00
Nicolas Mattia
d13bf5ff11 Add information about ref handling
This adds some warnings when users with existing `ref`-laden sources try
to `niv update`.
2020-08-20 16:54:40 +02:00
Nicolas Mattia
1294b321c8 Stop using ref in builtins.fetchGit fetcher
Instead, sources now record either `branch` or `tag`. The fetcher
specifies the correct ref (`/refs/heads/...` or `/refs/tags/...`) which
works in the newest version of Nix. The `ref` attribute can still be set
to override the logic.
2020-08-20 16:54:40 +02:00
Nicolas Mattia
f0be4cea7d Steal sanitizeDrvName 2020-08-20 11:31:41 +02:00
Nicolas Mattia
5c966856bc Sanitize source name
The `type` sources didn't get their name sanitized. This also fixes a
bug where builtins_fetchTarball would fail if because no name was given.
2020-08-20 11:31:41 +02:00
Nicolas Mattia
13c88bfcc3 Add source name sanitization test 2020-08-20 11:31:41 +02:00
Nicolas Mattia
7abb350a10 Refactor eval tests 2020-08-20 11:31:41 +02:00
Nicolas Mattia
e82eb322ea Release 0.2.16 2020-08-14 09:42:09 +02:00
Nicolas Mattia
84827485e2 Make sources.nix remote friendly
The file can now be imported even if there is no sources.json in the
same directory.
2020-08-13 21:06:40 +02:00
Nicolas Mattia
bee0b4ca51 Release 0.2.15 2020-08-13 16:41:08 +02:00
Nicolas Mattia
45c4ed5af1 Document NIV_OVERRIDE and add FAQ TOC 2020-08-13 16:26:28 +02:00
Nicolas Mattia
38a536e59e Add NIV_OVERRIDE_{...}
This updates the sources.nix to replace the `outPath` field of package
`foo` with the content of envionment variable `NIV_OVERRIDE_foo`. In the
environment variable name, all characters outside of `[a-zA-Z0-9_]` are
escaped to `_`.
2020-08-13 16:26:28 +02:00
Nicolas Mattia
24eabfbfaa Remove script/update 2020-08-13 15:26:41 +02:00
Nicolas Mattia
303f442c43 Cache Box results
Some results were fetched _way_ too many times. All IO operations run in
updates are now cached. This makes `niv` effectively twice as fast.

*before:*

```
~/niv$ time niv add git git@github.com:nmattia/niv
Adding package niv
  Writing new sources file
Done: Adding package niv

real    0m3.603s
user    0m0.079s
sys     0m0.031s
```

*after:*
```
~/niv$ time niv add git git@github.com:nmattia/niv
Adding package niv
  Writing new sources file
Done: Adding package niv

real    0m1.387s
user    0m0.049s
sys     0m0.007s
```
2020-08-03 16:03:49 +02:00
Nicolas Mattia
ab9cc41caf Add CI check for formatting 2020-07-24 13:28:11 +02:00
Nicolas Mattia
15c82fd184 Add NixOS module example 2020-07-24 12:43:51 +02:00
Nicolas Mattia
fcfd1111c6 Update README.tpl.md
Co-authored-by: Andreas Fuchs <asf@boinkor.net>
2020-07-24 12:43:51 +02:00
Nicolas Mattia
c0a61e6283 Add subpath handling to FAQ 2020-07-24 12:43:51 +02:00
Nicolas Mattia
0d30bfd7b0 Use a single GitHub workflow 2020-07-23 16:34:50 +02:00
Nicolas Mattia
e0bfb5d007 Run Ormolu 2020-07-23 16:34:50 +02:00
Nicolas Mattia
1edb6856ad Run Ormolu on all files instead of changed 2020-07-23 16:34:50 +02:00
Nicolas Mattia
fc2cd34b83 Use ormolu from nixpkgs 2020-07-23 16:34:50 +02:00
Nicolas Mattia
8e0e8017c5 Replace default.nix with-rec with let 2020-07-23 16:34:50 +02:00
Ben Sima
b0e3ca55a9 ci: run script/fmt in the nix environment 2020-07-23 16:34:50 +02:00
Ben Sima
b066716ced Add script/fmt to GitHub CI job 2020-07-23 16:34:50 +02:00
Ben Sima
7572ac8ddb Add a formatting script
This way you can just do `script/fmt -i` during development, or use -c
in a CI job for the PR.

The help message is from: https://samizdat.dev/help-message-for-shell-scripts/
2020-07-23 16:34:50 +02:00
Ben Sima
6bb2a97db7 Add ormolu to dev environment
Closes #221
2020-07-23 16:34:50 +02:00
Nicolas Mattia
3c7cecd8e6 Show command when nix-prefetch-url fails 2020-07-23 15:34:31 +02:00
Nicolas Mattia
5f35efd949 Fix logline 2020-07-23 15:34:31 +02:00
Nicolas Mattia
febd3530f0 Update installation instructions
Now that niv is part of nixpkgs, the installation is much simpler.
2020-07-15 15:22:39 +02:00
Nicolas Mattia
e5f7c0a4d3 Release 0.2.14 2020-07-15 14:34:14 +02:00
Nicolas Mattia
99771dd10d Use release-20.03 by default 2020-07-15 14:05:45 +02:00
Nicolas Mattia
a78983cd55 Explain YesNixpkgs argument 2020-07-15 14:05:45 +02:00
Nicolas Mattia
79b6cc4d76 Factor out default nixpkgs branch 2020-07-15 14:05:45 +02:00
Sarah Brofeldt
0f50051d3c Drop nixpkgs-channels in README, usage and examples 2020-07-13 21:59:11 +02:00
Sarah Brofeldt
2521c74b8b Change default repo to NixOS/nixpkgs
Also use defaultNixpkgsUser and defaultNixpkgsRepo in the options parser
2020-07-13 21:59:11 +02:00
Nicolas Mattia
c27f5a6c57 Allow custom nixpkgs
This adds a few configuration options to `niv init`:

* `--no-nixpkgs`: skips the import of nixpkgs
* `--nixpkgs-branch`: specifies the branch to use for nixpkgs
* `--nixpkgs`: specifies the repo to use for nixpkgs

NOTE: this changes the default nixpkgs branch from nixos-19.09 to
release-19.09.
2020-07-07 17:36:52 +02:00
Nicolas Mattia
fb1716a9c8 Update to nixpkgs 20.03 2020-07-07 17:07:02 +02:00
Nicolas Mattia
dd17834c49 Add FAQ section to README
... and answer how to add a private repository.
2020-07-06 14:57:17 +02:00
Nicolas Mattia
0fe342db13 Update nix GitHub action 2020-07-06 14:46:34 +02:00
Nicolas Mattia
66e79bc38a Define Cachix signing key in action 2020-07-06 14:46:34 +02:00
Nicolas Mattia
2818ce648c Fix macOS build 2020-07-06 14:46:34 +02:00
Nicolas Mattia
f73bf8d584 Add niv add local for local sources 2020-03-31 19:58:43 +02:00
Nicolas Mattia
5b5508f855 Consider .tgz as .tar.gz 2020-03-30 21:38:55 +02:00