1
1
mirror of https://github.com/nmattia/niv.git synced 2024-09-16 01:47:08 +03:00
Commit Graph

31 Commits

Author SHA1 Message Date
Nicolas Mattia
de5a4e7d01
Update devshell (#367)
* Update devshell

Update nixpkgs and simplify devshell

* Run ormolu

* Fixups

* Format nix files

* Update sources
2023-03-11 22:16:53 +01:00
Troels Henriksen
2998a663d0 Make tests work with newest Nix. 2022-03-29 13:05:18 +02:00
Nicolas Mattia
527494090f Speed up initialization
This speeds up the `niv init` command by getting rid of
`nix-prefetch-url` calls (by default). In particular:
* `niv` itself is not added anymore
* `nixpkgs` is fetched from a "known" version
2021-06-07 18:03:50 +02:00
Nicolas Mattia
48dee993d2 Prepend environment variables with NIV_
Here we make sure that some environment variables are prepended
(GITHUB_PATH, GITHUB_INSECURE). For consistency's sake, other
environment variables (GITHUB_TOKEN, etc) _can_ also be prepended with
NIV_. This also issues a warning if `GITHUB_PATH` or `GITHUB_INSECURE`
is set.
2020-09-17 13:29:09 +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
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
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
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
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
zimbatm
2f2ee45a08
nixpkgs-fmt 2020-01-03 10:41:22 +01:00
Christian Kampka
ec254c6853
init at 19.09 2019-12-16 14:44:29 +01:00
Nicolas Mattia
424662b47f Switch to CI to GitHub Actions 2019-12-08 17:18:59 +01:00
Nicolas Mattia
3377472122 Actually update git specs 2019-12-01 12:41:31 +01:00
Nicolas Mattia
45a6020028 Add experimental (working) implementation of git specs 2019-11-30 12:22:27 +01:00
Nicolas Mattia
507d759e9c Add dummy git test 2019-11-30 11:55:35 +01:00
Nicolas Mattia
0a8b4f0ffd Move github tests: tests -> tests/github 2019-11-30 11:42:58 +01:00
zimbatm
1cb695fe7e
format with nixpkgs-fmt
I also couldn't help myself to change the `with { ... }` blocks
 to `let ... in` blocks.
2019-11-16 16:08:44 +00:00
Nicolas Mattia
03016df47f Drop 'nivForTest' 2019-09-21 23:12:09 +02:00
Nicolas Mattia
366d7476d7 Use custom GitHub client 2019-09-21 22:09:11 +02:00
Yorick van Pelt
f7688ef5d9
update default nixpkgs to 19.03 2019-08-27 13:52:00 +02:00
Nicolas Mattia
53aaaba6a2 Fix tests 2019-06-18 17:35:48 +00:00
Nicolas Mattia
d65639549a
Merge pull request #94 from kubek2k/github-token-support
GITHUB_TOKEN env variable support for github fetcher
2019-06-16 16:06:01 +02:00
Jakub Janczak
1f0fbc49f3 Making the sed expression work with current code shape 2019-06-16 14:03:00 +02:00
Michael Peyton Jones
dc9103623a
Encode keys in sorted order
This reduces diffs, which is always good!
2019-06-15 15:29:51 +01:00
Nicolas Mattia
8349f3e55e Don't drop nulls 2019-06-15 13:14:38 +00:00
Nicolas Mattia
cd066313ca Drop null elements in sources.json 2019-06-12 15:39:43 +02:00
Nicolas Mattia
7789b95124 New update mechanism 2019-06-09 23:04:10 +02:00
Nicolas Mattia
f29f7883d3 Test massage 2019-05-09 12:35:09 +02:00
Antoine Eiche
b1f3365c5a Add a trailing new line to the sources.json file
Just because VCS and editors can emit warnings on files without a
trailing new line.
2019-04-30 09:33:00 +02:00
Antoine Eiche
64f8845e51 Add tests by mocking GitHub API
The following scenario is tested:
1. niv init
2. niv drop niv
3. niv add nmattia/niv
4. niv update niv
5. niv add foo -v 1 -t 'localhost:3333/foo-v<version>'
2019-04-29 12:06:41 +02:00