1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-14 11:47:31 +00:00
Commit graph

336 commits

Author SHA1 Message Date
Hercules CI Effects
59fc6f4221 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/58a1abdbae3217ca6b702f03d3b35125d88a2994?dir=lib' (2024-04-27)
  → '50eb7ecf4c.tar.gz?narHash=sha256-QBx10%2Bk6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94%3D' (2024-05-02)
2024-05-02 09:00:52 +00:00
Hercules CI Effects
288fa518e2 flake.nix: Update nixpkgs-lib tree 2024-05-02 09:00:51 +00:00
hercules-ci[bot]
4d34ce6412
Merge pull request #225 from hercules-ci/flake-update
`flake.lock`: Update
2024-05-01 23:39:37 +00:00
Hercules CI Effects
ffe9d8eb04 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/d8fe5e6c92d0d190646fb9f1056741a229980089?dir=lib' (2024-03-29)
  → 'github:NixOS/nixpkgs/58a1abdbae3217ca6b702f03d3b35125d88a2994?dir=lib' (2024-04-27)
2024-05-01 23:35:45 +00:00
hercules-ci[bot]
9126214d0a
Merge pull request #219 from hercules-ci/flake-update
`flake.lock`: Update
2024-04-01 23:40:58 +00:00
Hercules CI Effects
c4c5c95859 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/1536926ef5621b09bba54035ae2bb6d806d72ac8?dir=lib' (2024-02-29)
  → 'github:NixOS/nixpkgs/d8fe5e6c92d0d190646fb9f1056741a229980089?dir=lib' (2024-03-29)
2024-04-01 23:36:10 +00:00
hercules-ci[bot]
f7b3c975cf
Merge pull request #216 from hercules-ci/flake-update
`flake.lock`: Update
2024-03-01 23:36:56 +00:00
Hercules CI Effects
c325169fbe flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/97b17f32362e475016f942bbdfda4a4a72a8a652?dir=lib' (2024-01-29)
  → 'github:NixOS/nixpkgs/1536926ef5621b09bba54035ae2bb6d806d72ac8?dir=lib' (2024-02-29)
2024-03-01 23:35:39 +00:00
hercules-ci[bot]
b253292d9c
Merge pull request #211 from hercules-ci/flake-update
`flake.lock`: Update
2024-02-01 23:40:56 +00:00
Hercules CI Effects
8a09934875 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/b0d36bd0a420ecee3bc916c91886caca87c894e9?dir=lib' (2023-12-30)
  → 'github:NixOS/nixpkgs/97b17f32362e475016f942bbdfda4a4a72a8a652?dir=lib' (2024-01-29)
2024-02-01 23:36:20 +00:00
Robert Hensing
60c614008e
Merge pull request #210 from MatthewCroughan/mc/explicit-inputs
templates: make flake-parts input explicit
2024-01-30 00:04:57 +01:00
Robert Hensing
b60b914ac6 dev: Make the test slightly more sensible 2024-01-30 00:00:55 +01:00
matthewcroughan
14114c563a templates: make flake-parts input explicit 2024-01-29 22:41:55 +00:00
Robert Hensing
bffc4be17f
Merge pull request #209 from hercules-ci/getexe
Getexe
2024-01-29 19:03:35 +01:00
Robert Hensing
238b0dc94b apps: Add polyfill 2024-01-29 18:57:52 +01:00
Robert Hensing
562a6b5e54 dev: Test apps 2024-01-29 18:57:10 +01:00
Robert Hensing
07f6395285
Merge pull request #206 from hercules-ci/transposition-errors
Transposition errors
2024-01-11 15:18:32 +01:00
Robert Hensing
528a7d0cb9 transposition: Explain incomplete usage of transposition
Abort because this is a clear programming error, that should never
be caught.
2024-01-11 12:59:37 +01:00
Robert Hensing
3a0408e3ac perSystem: Check that inputs'.<name> is a flake, for better error message
The alternative would have been to try and make this not an evaluation error,
but that would cause problems.

Idea: use filterAttrs to construct an attrset "inputFlakes". This would be
bad because it requires that we evaluate all inputs, just to see whether
they're flakes or not.

If Nix were to provide this metadata independently, which it could do
very efficiently, we still ought to wonder what's the purpose of
eliding those attributes. The only ways you'll encounter this
exception in `inputs'.<broken>` is by either
 - making a mistake, in which case the error message is great
 - or traversing all inputs, which nobody should do.

See https://flake.parts/best-practices-for-module-writing#do-not-traverse-inputs

Other idea: return *something empty*. This avoids the strictness
problem above, but still optimizes for the wrong use case.

Ultimately though, attribute transposition should not be needed at all,
but this project is largely dependent on the implicit schema imposed by Nix.
2024-01-11 12:46:03 +01:00
Robert Hensing
ac5d0b2d4d transposition: Improve perInput error message 2024-01-11 12:17:33 +01:00
hercules-ci[bot]
88a2cd8166
Merge pull request #204 from hercules-ci/flake-update
`flake.lock`: Update
2024-01-01 23:40:58 +00:00
Hercules CI Effects
a92a54c1b6 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/e92039b55bcd58469325ded85d4f58dd5a4eaf58?dir=lib' (2023-11-29)
  → 'github:NixOS/nixpkgs/b0d36bd0a420ecee3bc916c91886caca87c894e9?dir=lib' (2023-12-30)
2024-01-01 23:36:22 +00:00
DavHau
7de0c651b7 raise error when flake attribute doesn't exist
Currently when trying to access packages from input flakes for a system that isn't supported by that flake, the error is not very conclusive.
It costed me at least an hour to grasp this. Now putting in this error message to prevent others from falling into the same trap.
2023-12-10 20:07:51 +07:00
hercules-ci[bot]
34fed993f1
Merge pull request #199 from hercules-ci/flake-update
`flake.lock`: Update
2023-12-01 23:39:28 +00:00
Hercules CI Effects
f643cbabe3 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/0cbe9f69c234a7700596e943bfae7ef27a31b735?dir=lib' (2023-10-29)
  → 'github:NixOS/nixpkgs/e92039b55bcd58469325ded85d4f58dd5a4eaf58?dir=lib' (2023-11-29)
2023-12-01 23:36:19 +00:00
hercules-ci[bot]
8c9fa25450
Merge pull request #196 from hercules-ci/flake-update
`flake.lock`: Update
2023-11-01 23:41:02 +00:00
Hercules CI Effects
216e40a3f8 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/f5892ddac112a1e9b3612c39af1b72987ee5783a?dir=lib' (2023-09-29)
  → 'github:NixOS/nixpkgs/0cbe9f69c234a7700596e943bfae7ef27a31b735?dir=lib' (2023-10-29)
2023-11-01 23:36:20 +00:00
Robert Hensing
f76e870d64
Merge pull request #194 from hercules-ci/error-location
Fix default error location
2023-10-29 12:33:47 +01:00
Robert Hensing
e21f594423 Fix error location
The path didn't make it into the message because of a silly coding
mistake and overlooking the actual location in manual testing.
2023-10-29 12:30:12 +01:00
Robert Hensing
25abf6caa8
Merge pull request #192 from hercules-ci/moduleLocation
moduleLocation, but also automatic
2023-10-29 12:23:28 +01:00
Robert Hensing
c8c8e5661e Remove errorLocation from the tests
As mentioned in the previous commit, we don't have a use case for
this in flake-parts yet, as far as I'm aware. It can be exposed
when we do have a concrete use case where it is needed.
2023-10-14 00:06:42 +02:00
Robert Hensing
f427ecf1a0 Repurpose moduleLocation impl for new errorLocation
The difference is that moduleLocation is "guaranteed" reliable data,
whereas errorLocation is the best choice for error messages in the core.

moduleLocation is suitable for the module key attribute.
errorLocation is best for the *ROOT* module _file attribute.

Initially I applied errorLocation in too many places. It is only needed
when the flake output attribute names are strict in it.
To avoid confusion, I'm not exposing errorLocation to the modules, until
we have a concrete use case for it.
2023-10-14 00:03:28 +02:00
Robert Hensing
fc74939824 mkFlake: Prefer unsafeGetAttrPos over self.outPath for error message
This would not be advisable for anything other than error messages,
because Nix does not commit to any semantics for that function.
2023-10-13 23:03:07 +02:00
Robert Hensing
c9afaba3df
Merge pull request #190 from hercules-ci/template-package
Add template/package
2023-10-03 16:30:47 +02:00
Robert Hensing
279338e390
Merge pull request #188 from hercules-ci/doc-transposition
transposition: Improve doc
2023-10-03 16:10:38 +02:00
Robert Hensing
9551c1dbc1 transposition: Improve doc 2023-10-03 16:09:54 +02:00
Robert Hensing
6c88b31621 Add template/package 2023-10-03 16:05:44 +02:00
hercules-ci[bot]
21928e6758
Merge pull request #189 from hercules-ci/flake-update
`flake.lock`: Update
2023-10-01 23:41:30 +00:00
Hercules CI Effects
2d841c9122 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/3e52e76b70d5508f3cec70b882a29199f4d1ee85?dir=lib' (2023-08-31)
  → 'github:NixOS/nixpkgs/f5892ddac112a1e9b3612c39af1b72987ee5783a?dir=lib' (2023-09-29)
2023-10-01 23:36:24 +00:00
hercules-ci[bot]
7f53fdb7bd
Merge pull request #184 from hercules-ci/flake-update
`flake.lock`: Update
2023-09-01 23:37:41 +00:00
Hercules CI Effects
62434060bc flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/9e1960bc196baf6881340d53dccb203a951745a2?dir=lib' (2023-08-01)
  → 'github:NixOS/nixpkgs/3e52e76b70d5508f3cec70b882a29199f4d1ee85?dir=lib' (2023-08-31)
2023-09-01 23:36:21 +00:00
hercules-ci[bot]
59cf3f1447
Merge pull request #181 from hercules-ci/flake-update
`flake.lock`: Update
2023-08-01 23:38:54 +00:00
Hercules CI Effects
85c7a895eb flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/4bc72cae107788bf3f24f30db2e2f685c9298dc9?dir=lib' (2023-06-29)
  → 'github:NixOS/nixpkgs/9e1960bc196baf6881340d53dccb203a951745a2?dir=lib' (2023-08-01)
2023-08-01 23:36:20 +00:00
Patrick Jackson
acd542d16b apps: use lib.getExe to find executable 2023-07-31 08:56:50 -07:00
Yang, Bo
f359432597
Merge branch 'main' into moduleLocation 2023-07-22 18:07:20 -07:00
bors[bot]
8e8d955c22
Merge #171
171: Add more docs r=roberth a=woile

This PR adds the following:

- an examples folder
- an example for devShell
- templates are no longer marked as examples, now there are templates and examples avoiding confusion

#170 

Co-authored-by: Santiago Fraire <santiwilly@gmail.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-04 10:20:19 +00:00
Robert Hensing
7910deccec
examples/shell-environments/README: typo 2023-07-04 12:19:47 +02:00
hercules-ci[bot]
267149c58a
Merge pull request #177 from hercules-ci/flake-update
`flake.lock`: Update
2023-07-01 23:37:45 +00:00
Hercules CI Effects
8af754293a flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs-lib':
    'github:NixOS/nixpkgs/4f53efe34b3a8877ac923b9350c874e3dcd5dc0a?dir=lib' (2023-05-31)
  → 'github:NixOS/nixpkgs/4bc72cae107788bf3f24f30db2e2f685c9298dc9?dir=lib' (2023-06-29)
2023-07-01 23:35:49 +00:00
Santiago Fraire
6f53e9012c docs: update to comments 2023-06-30 09:31:36 +02:00