Commit graph

32 commits

Author SHA1 Message Date
Benjamin Koch d3b9c42cb7 Use different method to detect relative paths
see https://github.com/edolstra/flake-compat/pull/18
2021-01-24 05:06:18 +01:00
Benjamin Koch 43a4aaabd9 Add support for "path:../parent", as well 2021-01-24 05:06:18 +01:00
Benjamin Koch 5f989af4db Merge remote-tracking branch 'jtojnar/fresh-repos' 2021-01-20 02:50:32 +01:00
Benjamin Koch 799b174b5c Merge remote-tracking branch 'hercules-ci/pure' 2021-01-20 02:48:06 +01:00
Benjamin Koch e7e5d481a0 Add support for "path:./relative/path" 2021-01-20 01:42:58 +01:00
Eelco Dolstra 99f1c2157f Don't zero src's lastModified if it has one 2020-11-26 21:59:33 +01:00
Eelco Dolstra 8812d6d109 Don't pass rev/shortRev for dirty trees 2020-11-26 21:53:11 +01:00
Jan Tojnar d3041dbd47
Allow use on repos without commits
When starting a new repository, it does not have any branches
in `.git/refs/heads` and `.git/refs/HEAD` contains a broken
`ref: refs/heads/master` reference.

This means that cloning a repo like we do for cleaning will fail
with very unhelpful message for freshly created repo:

    fatal: bad revision 'HEAD'

This is quite confusing when you create a new repo by copying
Nix files from another, working one, make some trivial changes,
stage them and then try to test a shell.
2020-11-13 18:36:55 +01:00
Robert Hensing a2fd0358b1 Make fetchers pure 2020-10-28 12:27:16 +01:00
Eelco Dolstra 19576c2aea
Merge pull request #11 from hercules-ci/git-worktree
Support git worktrees in fetchgit logic
2020-10-27 12:08:32 +01:00
Robert Hensing 5ad681b894 Simplify rootSrc fetchGit logic 2020-10-27 11:48:33 +01:00
Robert Hensing 64de97c480 Use fetchGit on git worktrees
Git worktrees have a file for .git and can be loaded with fetchGit.
2020-10-27 11:45:18 +01:00
Eelco Dolstra 94cf59784c
Merge pull request #9 from Ma27/minor-fixes
Be more consistent with Nix itself when fetching github/gitlab inputs
2020-09-23 11:30:54 +02:00
Maximilian Bosch 0d4ab83c96
Be more consistent with Nix itself when fetching github/gitlab inputs
* `url` got renamed to `host` in Nix[1], so we have to use this key here
  as well.
* It was suggested previously[2] to use the same URL to download from a
  GitLab-server as Nix does.

[1] 56f1e0df05
[2] 0e29814f1e (commitcomment-42619895)
2020-09-22 21:20:22 +02:00
Eelco Dolstra 2f9a141d4b
Merge pull request #8 from Ma27/gitlab-fetcher
Add support for flake inputs with `type = "gitlab"`
2020-09-21 11:42:29 +02:00
Maximilian Bosch 0e29814f1e
Add support for flake inputs with type = "gitlab" 2020-09-18 14:18:10 +02:00
Eelco Dolstra 535e7c0116
Merge pull request #7 from zanculmarktum/master
Support flake inputs with type tarball
2020-09-15 10:49:11 +02:00
Azure Zanculmarktum e363cffac2 Support flake inputs with type tarball 2020-09-07 19:45:53 +07:00
Eelco Dolstra cecfd08d13
Merge pull request #6 from cole-h/path-type
Support flake inputs with type path
2020-09-03 11:01:30 +02:00
Cole Helbling f10b647d90
Support flake inputs with type path 2020-09-02 14:33:47 -07:00
Eelco Dolstra c5c3c5b56b
Merge pull request #5 from matthewbauer/lockless-flake
Allow calling flakes without a flake.lock
2020-08-21 10:47:54 +02:00
Matthew Bauer c71d063a2f Allow calling flakes without a flake.lock
If no inputs but "self" are specified, Nix will not generate a
flake.lock at all. In this case, Flakes are mostly just used to
provide a more pure Nix experience, while sources are locked through
some other means (niv, ob thunk, manually, etc.). Supporting this is a
little weird, but it ends up working for my
repo (https://github.com/matthewbauer/nixiosk).
2020-08-20 15:49:28 -05:00
Eelco Dolstra c75e76f80c Add support for lock file versions 6 and 7 2020-06-17 19:18:34 +02:00
Eelco Dolstra d3c33ef110 Style 2020-06-17 19:02:15 +02:00
Antoine Eiche 2c2a50af4d Try to fetchGit the provided src
The goal is to filter the provided src tree based on Git tracked files
to avoid unexpected rebuild. If the provided src tree is a not valid Git
repository, no filtering is applied.
2020-06-16 14:14:30 +02:00
Eelco Dolstra f012cc5092 Add support for git inputs 2020-04-29 13:06:17 +02:00
Eelco Dolstra 88dc02caca lastModified -> lastModifiedDate 2020-04-14 18:35:39 +02:00
Eelco Dolstra 6c21ad2740
Add support for lock file version 5 2020-03-31 16:05:00 +02:00
Eelco Dolstra c7b5800e53
Merge pull request #1 from zimbatm/parameterized-system
parameterize the system attribute
2020-03-29 17:59:23 +02:00
Jonas Chevalier 9ef308133d
parameterize the system attribute
Allow to instantiate flake-compat with another system
2020-03-28 18:53:45 +01:00
Eelco Dolstra 123f9a83cb
Handle non-flake inputs 2020-03-14 14:48:23 +01:00
Eelco Dolstra 59f787c31c
Initial version 2020-02-25 14:26:24 +01:00