Commit graph

35 commits

Author SHA1 Message Date
jade 5adafc5bfb fix wrong comment 2024-05-02 20:09:04 -07:00
Rebecca Turner baa7aa7bd0
Check for pure eval mode before calling builtins.storePath 2024-03-08 16:32:20 -08:00
Eelco Dolstra 0f9255e01c Force root sources like "./." into the Nix store 2023-10-04 15:37:54 +02:00
Eelco Dolstra 5a16547d46 Prevent double copying and work around an apparent Nix bug
Fixes #60.
2023-10-04 12:49:46 +02:00
Eelco Dolstra e1262c7073
Merge pull request #59 from hercules-ci/port-nix-7796-flake-outPath
nix#7796: Ensure that `self.outPath == ./.`
2023-10-02 19:10:16 +02:00
Robert Hensing bc5e257a8d nix#7796: Ensure that self.outPath == ./.
Ported from https://github.com/NixOS/nix/pull/7796
First released in Nix 2.14
2023-10-02 18:57:55 +02:00
Alper Çelik bcb80df051
add support for sourcehut 2023-04-26 10:33:29 +03:00
Eelco Dolstra 35bb57c0c8
Merge pull request #50 from hercules-ci/nix-7207-_type-is-flake
Apply nix#7207 `_type = "flake";`
2023-01-17 12:47:33 +01:00
Robert Hensing 43bfa87aa2 Apply nix#7207 _type = "flake";
https://github.com/NixOS/nix/pull/7207 adds this attribute in order
to help identify flake outputs for the purpose of type checking.
2023-01-16 19:59:47 +01:00
David Arnold 6f56392cc4
fix: top level functors break legacy nix commands
see: https://github.com/divnix/std/issues/186
2022-11-14 20:28:19 -05:00
Eelco Dolstra 64a525ee38
Merge pull request #37 from Artturin/addsupportfornewshcmea
add support for new style of defaults
2022-03-25 10:10:09 +01:00
Artturin aee797a673 add support for new style of defaults 2022-03-25 04:47:29 +02:00
Charles Baynham 3b935d922d
Pass along submodules flag to fetchGit 2022-03-19 23:30:58 +00:00
Robert Hensing 4112a081ef Revert "Revert unlicensed contribution"
The last contributor has agreed after all. Maybe I acted one day
too soon? In that case, apologies for the drama.

This reverts commit 14dbada01f.
2021-08-02 13:43:28 +02:00
Robert Hensing 14dbada01f Revert unlicensed contribution
Some explanation is in order:

I have tried to contact Zanculmarktum three times in the last
25 days, but I have not received any response.
Meanwhile, others are waiting to be able to use flake-compat, so
I have decided that it is best to move forward with the licensing
effort, considering that everyone else except Eelco has already
agreed, and quickly as well.

I have no hard feelings towards Zanculmarktum and I really do not
like having to make this commit.

This reverts commit e363cffac2 and
subsequent improvements.

I should note that it could be argued that their contribution was
not a creative work in the sense of most copyright law, but I'd
prefer to avoid any confusion by choosing to reimplement their
contribution in a "clean room" manner.
2021-08-01 14:12:05 +02:00
Eelco Dolstra c6f3b63532
Merge pull request #12 from hercules-ci/pure
Make tarball fetchers pure
2021-07-29 13:15:37 +02: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
Robert Hensing a2fd0358b1 Make fetchers pure 2020-10-28 12:27:16 +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
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
Maximilian Bosch 0e29814f1e
Add support for flake inputs with type = "gitlab" 2020-09-18 14:18:10 +02:00
Azure Zanculmarktum e363cffac2 Support flake inputs with type tarball 2020-09-07 19:45:53 +07:00
Cole Helbling f10b647d90
Support flake inputs with type path 2020-09-02 14:33:47 -07: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
zimbatm 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